SAP Workflow教程.ppt
- 格式:ppt
- 大小:1.23 MB
- 文档页数:2
Rio TintoBSC Workflow Administration GuideTable of Contents1.INTRODUCTION (1)2.MONITORING (2)2.1Daily Activities (4)2.1.1SBWP – Workflow Administrator Inbox (4)2.1.2SWI2_ADM1 – Workitems Without Agents (6)2.1.3SWPR – Workflow Restart After Error (7)2.1.4SWI2_DEAD – Workitem Deadline Monitoring (9)2.1.5SWI2_DIAG – Diagnostics of Workitems Containing Errors (14)2.2Weekly Activities (17)2.2.1SWU3 – Automatic workflow customising (17)2.2.2SWEQADM – Event Queue administration (18)2.2.3RSWELOGD – Delete Event Trace (21)2.3Monthly Activities (21)2.3.1SM37 (21)3.SOLUTIONS TO WORKFLOW ERRORS (23)3.1Sales Order (26)3.2Capital Commitment Project (26)3.3Trip Approval (WS99000113) (27)3.4HSE Incident Log (WS99000081) (28)3.5LMS Cancel Training (WS99000060) (28)3.6LMS Cancel Training (WS99000071) (29)4.ALERT MANAGEMENT (31)5.WORKITEMS WITHOUT AGENTS (32)5.1Travel Work Items (32)5.2Leave Work Items (32)5.3HSE Incident Work Items (33)5.4HSE Work Area Action Workitems (35)6.TRACEABILITY MATRIX (38)7.WORK ITEM TEXT MATRIX (40)8.WORKFLOW DETAILS (41)8.1WS99000113 – Trip Approval (41)8.2WS99000114 – Trip Expenses (41)8.3WS99000121/99000151 – Leave Approval (41)8.4WS99000095 – HSE Action Monitoring (42)8.5WS90000022 – Employee Termination Notification (42)8.6WS90000055 – Contract Key Date Notification (42)8.7WS90000038 – Contract Key Date Monthly Reminder (43)8.8WS99000060 – Booking Course Participation (43)8.9WS99000090 – Purchase Requisition (43)9.ISSUES LOG (45)10.APPENDIX (49)10.1Useful SAP Transactions (49)10.2Tips and Tricks (51)1. IntroductionThe document provides an overview of monitoring and supporting workflow. This document discusses in brief, different methods of monitoring workflow, as well as SAP transactions used in workflow monitoring.This is intended for people who are providing workflow support to ABS project.The following sections will discuss resolving errors and monitoring performance•Monitoring (daily, weekly and monthly)•Solution to Errors.•Alert Management - WIP•Traceability Matrix•Issue Log•Support ContactsList of useful SAP transactions are provided in the appendix.2. MonitoringMonitoring of workflow should be done on a daily, weekly and monthly basis. The following section discusses the steps involved in each time frame.Monitoring proactively allows the administrator to identify errors in the workflows. This is done by running specific reports that identify performance and workflow errors that have an impact on the business process.In order to log as a workflow administrator please follow the instructions in the document provided below.How to log on toSAP with a firefighter roUseful transactions to assist you in daily workflow monitoring.Listed below are a number of common tasks that you will use to help you analyse and diagnose workflow errors and in daily monitoring.I have attempted to catch a generic group of tasks that can be used to analyse different workflows. When analysing a workflow, the following transactions will help you analyse errors and determine solutions for workflow monitoring. These can be used to analyse a variety of different workflows and scenarios.PA20– Display HR master data.Useful transaction to help determine if the agent in the workflow you are investigating has the following valid attributes.Infotype – 0105 communication – In the organisational assignment look for a start and finish date. This will help you determine scenarios where the correct agent is in the workflow but he/she may not be active because their start date may not be till the beginning of the month for example in relation to the execution of the workflow yet the workflow and the position they hold is active.Solution –Speak to the team leader in the relevant functional area to determine the next step to be taken. Infotype - 0105 communication – Check that the user has a valid email address. This is important as the workflow finds the agent who is the holder of a position and then determines the agents email address from their HR master data.Solution –If there is no email address in the users 0105 infotype, then a service call will need to be raised and assigned to the helpdesk to resolve.Also check this infotype for the position and also the org unit the person belongs too. Use this infotype as a check for a SAP username. You will come across scenarios that a user may be active but has no username in SAP.Solution – Raise or pass the service call on to the helpdesk so that they may process a SAP username for the user involved.Infotype 2001 Absences – Very useful for checking to see if specific leave requests dates have been posted. This will help identify when working on leave requests if they have posted correctly into PA20.PTARQ - Display leave requestCrucial transaction to be used to determine a status of leave request. This transaction allows you to look at the workflow by personnel and for each leave request for that person.PO13D –Display PositionThis transaction is very useful for determining purchasing limits to a position. When analysing a workflow in the PTP area, there will be scenarios where the purchasing limits for a PR for an agent to approve may not be sufficient.Also very useful for determining the relationships for a position. That is who the holder is of a position and and if any acting roles are assigned to this position.As the workflow is positional based with a pre determined $$ limit any queries in your analysing will then need to be discussed with the PTP functional team.PPOSE –Organisation and staffing display.A key transaction to use when identifying agents, their position and their relationship in the organisational structure.Also very useful for determining a common scenario of looking for agents in an acting role in a organisational unit.SU01D –User maintenanceVery useful for determining if a SAP username exists for a user and if they have an email address assigned to the user.SWI5– Workload analysisVery useful for looking into what work items a user has been assigned and also what the user has completed. Once in SWI5 you can drill into the workflow and go to the workflow containers.SWI6– Display workflow objectThis transaction is used to identify specific workflows for a specific workflow object.Some of the more common business objects used in this transaction to help analyse specific workflow tasks. BOR object typeBUS2009 – Purchase requestionsBUS2034 – Customer contractBUS 2089 – Employee tripABAP class/RIO/ZCL_WF_HSEC_CCIHT_IAL – HSE Incident record/RIO/ZCL_WF_ERM_TIMESHEET – ERM Timesheet/RIO/ZCL_WF_MP_ESS_LEAVE – RIO MP ESS Leave request/RIO/ZCL_WF_EMP_EXPENSES – RIO workflow employeeZ7066 –Cockpit display onlyThis is the transaction to use when identifying and analysing EBYDOS document issues.CBIH82– HSE Edit incident action logThis is the transaction to use when identifying and analysing HSE Incidents.PR05– Travel Expense managerThis is the transaction to use when identifying and analysing expense workflows.VA43– Display contractsThis is the transaction to use to when you start to analyse CTC contract workflows.CJ20N– Project builderThis is the transaction to use to investigate capital projects for MPA.2.1 Daily ActivitiesMonitoring on a daily basis ensures that any workflows that have run over a period from the night before have been checked to ensure that the business process they are related to be working as they should.Checking regularly throughout the day also ensures performance and workflow errors are kept to a minimum. Below is a list of reports and transaction that should be run on a regular/daily basis to monitor workflow.2.1.1 SBWP – Workflow Administrator InboxLog on as the workflow administrator (user ID WF-ADMIN) and check the workflow inbox. Action all tasks and notifications as required. This may involve investigating the workflow. An example of the processing that may be required for a workitem would be to forward it to the correct agent, modify data in the container, or to logically delete it.Step1Enter transaction SBWPStep2The business work place now appearsStep 3Highlight the work item you wish to process and investigate from here by taking the work item in this case it is 12976488 and go into transaction SWI1 – selection report for work items.This will now take you to investigate the workflow issue. See Below Step 4Execute transaction SWI1.Step 5Begin investigatingStep 6Go to All Errors under the Extras menu. See belowStep 7The system will display all error messages, as shown below.From this example we can see that the infotype 0105 has not been maintained. HR/MP should be notified to sort this issue out.2.1.2 SWI2_ADM1 – Workitems Without AgentsExecute this transaction to process dialog workitems that do not have an agent. Work though the list of workitems and determine who should be sent each item. Forward the item to the appropriate person, or logically delete the work item if the workflow is no longer appropriate, e.g. if the leave has been approved.See Section Workitems Without Agents for more details on how to process specific workitems without agents.Below is a step by step as to how to delete out a work item.How to delete a workflow work item.docHow to forward a work item to the correct2.1.3 SWPR – Workflow Restart After ErrorThis report is used to display a list of workflow errors and restart them. You can run this report over a date range and will allow you to perform a mass start of workflows.Step1Execute transaction SWPR.Step 2Highlight the error and display log of work item.Step 3Click onto all errors under the Extras menu.Step 4The error can be identified – in this example it is an infotype 105 meaning the reason this was in error is because workflow could not find an email to send the agent notification of approval for a course.Step5This is in error due to HR master data and investigations would proceed with MP personnel to find out why there is no email address for this agent.2.1.4 SWI2_DEAD – Workitem Deadline MonitoringThis report allows you to identify tasks with deadlines.Step1You can run this report by date range and also by workflow task if you wish.Step 2Once executed, view the notificationStep 3Click into the HSE incident and this takes you to the work item in the UWL and from you can check the HSE incident which in this case is 28308.Step 4From here we have determined that the deadline dates have been reached and that we now need to identify who the person responsible is so that we can advise them to action the workflow item. To do this we click on the log and go to the container to identify the person responsible. See below steps.This will take you to the technical workflow. From here you will then go to the container tab belowStep 6Inside the container, find the personnel object and in this case the number we find is 307271 = Xinguan Zhang.Step 7I would then advise Xinquan Zhang of the outcome of the investigations.21.4.1 – Purchase requisition no agentsIdentify the PR and work item.And work item is 28348697Also in the org structure I have found the parties involved.Stuart Hull created the purchase requisition and Greg Lyne will approve it.Solution – An interesting case where the PR value is less then $100.00 but because Stuart Hull is a contractor and also the person that created line item, he cannot approve the line item. Hence the workflow task to approve the PR in Greg’s UWL. As you can see the purchase limit for Hull is $0.An email or phone call to Greg to advise him to approve this would be proactive – that is before the workflow reaches the deadline date. When it reaches the deadline date it the task will then escalate to Greg Lynes superior.2.1.5 SWI2_DIAG – Diagnostics of Workitems Containing ErrorsStep 1Run the report for the current date.Step 22.6 SWU2 – RFC MonitoringThis transaction is to monitor the transactional RFC’s for WORKFLOW_LOCAL_500.Step 3Go into the log for the work item in questionStep 4Go to errors tab in extrasStep 5Identify error in log2.2 Weekly Activities2.2.1 SWU3 – Automatic workflow customisingCheck all workflow related background jobs are running in the production environment. This designated by a green tick against each job.Step1Go into SWU3 the next screen that will come up will have a title ‘Maintain Runtime environment’Within this list the only job that should have a X against it is schedule background job for condition evaluation. NB – If for any reason there is a red cross against any other job then notify RTSS immediately.2.2.2 SWEQADM – Event Queue administrationThis transaction is used for event queue administration. While the event queue was switched off errors with events have been identified and maintained.Go to the linkages with errors tab to view the errorsClick on the browser tab as circled belowThis will then take you through to the event queue browser or transaction SWEQBROWSERYou will need to ensure you have the correct object type, event status, meaning is it ready to be delivered or has it already been delivered, and the creation time in the event queue.Click on refresh or display work item.A list will then appear for the desired object type. You will then need to start to investigate why the error has occurred.The best way to do this would be to use transaction SWI6 – Display workflow/select an object.2.2.3 RSWELOGD – Delete Event TraceThe event trace is turned on in the production system. Each week, old event traces must be deleted from the system using transaction RSWELOGD. We only keep 1 month of event traces, so use the ‘Date Triggered’ selection field to delete any traces older then 1 month.2.3 Monthly Activities2.3.1 SM37Check that the following workflow jobs are running –SWWERRE – Initiates the re execution of failed background jobsSWWDHEX – this job evaluates work items with deadlines and initiates the deadline responseSWU3 – Automatic workflow customising. Check all jobs in run maintain environment.Step1Go to SM37 and put in the following details.Step 2Check that there are no errors for the relevant jobs that are running.3. Solutions to Workflow ErrorsThe following errors have been encountered daily.1. Redirecting and forwarding workflows to correct agents. Common errors picked up from dailymonitoring in transaction SPWR and SWI2_DIAG. HR data issue.2. Missing agents and recalculating agents from the org structure. HR data issue3. Aged workflows- Informing agents of deadlines reached for workflow in business processes4. User training – A solution that would help many workflow issues is the correct and timely use of theuniversal work list. This is currently an ongoing issue in all modules linked to processing in the universal worklist.Transactions used to solve issues in workflow1. SWI5 – Workload analysis This allows the administrator to go directly into the work items that are inthe users universal work list. I find it very useful to use as it allows me to go straight into the log of the work item to investigate particularly if I have the user on the phone and the issue needs to be resolved quickly. In select responsibility use type US and the ID of the user is always the SAP username.2. Select ‘Work Items to be Completed ‘ as the type of analysis, as this will show you what is currently inthe users UWL. You can if you wish, run by task but this will restrict you to items only relevant to thework items of the task you have selected.Step 2The next screen shot below shows you what work items are currently in the users UWL. From here you will click on the desired work item to investigate the issue further.Step 3Step 4Then click on the log icon to take you to the technical details to investigate further.3.1 Sales OrderThe following error will occur for a sales order if the sales order has been deleted or archived, i.e. it no longer exists in the system.You must confirm that the sales order does not exist, by trying to display it using transaction VA03. Only implement the following solution if you have confirmed that the sales order does not exist.SolutionWorkflows with this error can not be restarted or fixed. The solution in this case is to logically delete the workflow.3.2 Capital Commitment ProjectThere are two possible data errors that can occur in the Capital Commitment Project workflow:1. Project manager has been terminated or has no SAP user ID in info type 01052. General manager could not be determined for the project managerProject Manager ErrorThe workflow log will only display the steps shown in the screen shot below.Project Manager SolutionEmail the MPA Functional team with the ID of the project and the details of the error. They will have to contact the business to find out the correct data.IF the project manager was terminated, the MPA team will email you the correct PERNR of the project manager. Modify the container of task TS90000030 ‘User personnel number’. In this t ask container, change the element PersonnelNumber to the correct one. Then change the work item text on this task so that it displays the correct PERNR. Finally, restart the workflow.If the project manager did not have an SAP user ID, once this has been fixed you can just restart the workflow.General Manager ErrorThe workflow log will only display the steps shown in the screen shot below.General Manager SolutionEmail the MPA Functional team with the ID of the project and the details of the error. They will have to contact the business to find out the correct data.Once you have the user ID of general manager, you will need to update the workflow container with this data. Change the empty workflow container element GeneralMgrUserObject so that it contains the SAP user ID of the general manager. Then modify the container of task TS90000015 ‘Create Object Reference to User’. In this task container, update the elements User and UserObject with the general manager’s user ID.Finally, restart the workflow.3.3 Trip Approval (WS99000113)Terminated Position ErrorIf the workflow has errored because the employee who took the trip has now been terminated, the workflow log will appear as below.Terminated Position SolutionIn transaction PA20, determine the position the employee held prior to being terminated.Change the task container in step SYSTEM: Instantiate Position 99999999 (node 117). Change the value of element OBJECT_KEY from 99999999 to the employee’s previous position.Change the work item text of task SYSTEM: Instantiate Position 99999999, so that it also displays the previous position instead of 99999999. Then restart the workflow.3.4 HSE Incident Log (WS99000081)Method ADD_NOTIFIED_RECIPIENTS ErrorThe method ADD_NOTIFIED_RECIPIENTS in task TS99000341 errors with the exceptionCX_SY_OPEN_SQL_DB because the method is trying to insert a record into SAP table /RIO/ZTE_WFEXCL that already exists. The task tries to add the value in task container element IT_RECIPIENTS into table/RIO/ZTE_WFEXCL.Method ADD_NOTIFIED_RECIPIENTS SolutionChange the container data for task TS99000341. Clear the value in element IT_RECIPITENTS, then restart the task.3.5 LMS Cancel Training (WS99000060)This workflow may error with the message ‘No Email address has been maintained for staff number 9999999’. If this is the case, the workflow can be logically deleted if the Employee Subgroup = 11, 13 or 22. To check the Employee Subgroup, open the container at the main workflow level and expand the Participation container element. See screen shot below.3.6 LMS Cancel Training (WS99000071)This workflow may error with the message ‘No Email address has been maintained for staff number 9999999’. If this is the case, the workflow can be logically deleted if the Employee Subgroup = 11, 13 or 22. To check the Employee Subgroup, open the container at the main workflow level and expand the Participation container element. See screen shot below.4. Alert ManagementIn order to monitor the workflow in an effective manner, an alert management system needs to be put in place to alert the administrator. This could be done for example via Microsoft outlook or in SWBP.Conditions for alerting the workflow administrator are configured and pre defined. When an alert is triggered and the defined conditions are met then pre-determined people or parties are informed.Once an alert message is sent, it can be forwarded on to interested parties and work groups, however these categories have yet to be defined.This is still work in progress.5. Workitems Without Agents5.1 Travel Work ItemsThe US businesses have taken the decision to not populate senior positions in the org chart with holders. All senior USA based positions will therefore appear vacant in the org chart.The work practice for this situation is to email a list of the work item descriptions to the appropriate credit card administrator. The administrator then needs to send out an email to each person asking them to get the trips approved by their manager outside of the workflow process. Once a confirmation has been received, the administrator can then approve the trips in PR05. There is nothing the Workflow Administrator can do if the manager is not in the same organisation structure or the org structure is not populated.Below are examples of the types of work items for travel that can appear in the Without Agents list, and instructions on how to process them.TASK: Approve Trip 0130000624 Type Out of Pocket Expenses for Employee William ChampionCheck the org chart to see if there are holders of positions superior to the employee. If there are only vacant positions in the org chart above this employee, logically delete the workflow.NOTIFICATION: Outstanding Credit Card Transactions Not Assigned by Scott BeerForward this work item to the appropriate credit card administrator. There are different administrators in each country. Check with the PAM functional team to determine who this administrator is.NOTIFICATION: Approver not found for Trip 0010000163Open the workflow log on this item and check the LONG_TEXT container element to determine the personnel number. Execute transaction PR05 to find the trip for this employee and trip number. If this trip is not displayed in the list of trips for the employee, you can logically delete the notification workflow.If the trip is displayed in PR05, run transaction SWI6 using BOR BUS2089 to find all the workflows for this employee and trip number. Check the status of the original trip approval workflow. If the trip has been approved, this notification is no longer needed and can be logically deleted. If the trip still requires approval, find out who should approve the trip and forward the approval TASK to that position. You can then logically delete the notification workitem.5.2 Leave Work ItemsThere are two types of dialog work items for leave; the approval task and an escalation notification. These work items must be processed as described below.TASK: Please process Vacation Request for Bruce WhiteDisplay the log for this workflow. In the container, expand element REQ so that the status is displayed. If this status is NOT = SENT, then you can execute this notification and complete it because it is no longer necessary. However, if the status = SENT, then you must find the appropriate person in the org chart to forward this notification to. Look in transaction PTARQ to see whom the employee nominated as the Next Agent. This is the person that should have received the approval work item.NOTIFICATION: Leave Request for Jeff Weeding has been escalatedClick on the glasses icon to display the work item. In the work item description you will find the dates of the leave. Use this information to find the associated leave request in transaction PTARQ. If the leave request has a status NOT equal to SENT, then you can execute this notification and complete it because it is no longer necessary. However, if the status = SENT, then you must find the appropriate person in the org chart to sendthis notificationto.How to delete a workflow work item.doc5.3 HSE Incident Work ItemsThe following instructions for forwarding HSE work items should only be applied to recent work items. If the work item is over a month old, please see the HSE Functional team for directions on how to process the item. TASK: A new Incident has been recorded - Incident 30037584 Reactor R301 badly leaking oilTask TS99000232 in workflow WS99000077 often appears in the ‘Workitems Without Agents’ list. The reason for this is that the holder of one of the positions assigned to this task, moves to a new position sometime after the task has been created. For example, if the task was created on 31.08.2007 and the holder of one of the positions moves to another position on 2.09.2007, the position becomes vacant. The task then has no agent. To check that this is why the task has no agent, do the following –1. Display the log2. Display the container for the workflow step CONVERT: Position Check Valid Agent (sub workflowWS99000147). See screen shot below.3. Expand the container element ValidPositionAgents. Check the holder of each position listed intransaction PPOSE. Make sure that you set the Date and Preview Period in PPOSE to the create date of the task. See screen shot below. As you can see for this position, Richard Casparis was the holder until 16.09.2007 and the position is now vacant.The solution to this issue, is to forward the work item to the old holder of the position. In the above example, this would be Richard Casparis.CHANGE NEW: Incident 1000003393 Alumina leak from the alumina conveying vesselThis task is also TS99000232 in workflow WS99000077. It appears in the ‘Workitems Without Agents’ list for the same reason as the previous task; the holder of one of the agent positions of this task has moved to a new position sometime after the task was created. Follow the same instructions as for TASK: A new Incident has been recorded. Remember, if the task is over a month old, check with the HSE Functional team first.5.4 HSE Work Area Action WorkitemsTASK: Work Area Action 54978 has been assigned for you to performThis work item is sent to the Person Responsible agent, which is a position. It often appears in the ‘Workitems Without Agents’ list because the person responsible position i s vacant. The position may have become vacant after the workflow was kicked off, or it may have been vacant prior to the workflow being triggered. If this is the case, use the following process to re-direct the work item.The solution is to change the Person Responsible position to the new position that the holder of the original position now holds. The PERNR of the person responsible is displayed in container element PersRespEmployee of task ‘RIO Work Area Action Monitoring’ (sub workflow WS99000102). In the example below, this is PERNR 303026. Use transaction PA20 to find the position that this person now holds.。
工作流开发示例(工单服务采购申请审批流程)1 流程概述 (2)2 业务对象设计 (3)2.1 创建业务对象 (3)2.2 创建业务对象的关键字 (5)2.3 创建业务对象的属性 (7)2.4 为业务对象创建方法 (10)2.5 创建事件 (15)2.6 更改业务对象及其组件的状态 (16)3 创建任务 (20)4 根据业务流程构建工作流 (22)4.1创建一个新的工作流 (22)4.2维护工作流的基本属性 (23)4.3设置工作流的开始事件 (24)4.4 建立工作流的容器元素 (25)4.5 流程起始数据绑定 (27)4.6 工作流作业节点的创建 (28)4.6.1 采购策略及采购方式节点的创建 (28)4.6.2 创建采购申请审批的作业 (34)4.6.3 创建通知 (35)4.6.4 创建修改采购申请的作业 (37)4.6.5 创建循环节点 (38)4.6.6 调整流程走向 (43)5 事件的触发 (45)1流程概述PM工单下达后,自动产生服务采购申请,要求同时触发工作流,产生维护采购策略及采购方式的待办,发送给工单的创建人进行维护。
维护完毕后产生采购申请审批的待办发送给相关领导进行审批。
审批通过,发通知给工单创建者;不通过则返回给工单创建者进行修改。
流程示意图如下:2业务对象设计由于每张工单下达后仅产生一张采购申请单,每个采购申请产生一个审批的待办,因此使用采购申请号作为业务对象的关键字。
2.1创建业务对象事务码:SWO1输入业务对象的名称,必须以’Z’或’Y’开头,以区分系统原有的标准业务对象。
然后点击【创建】在弹出的窗口输入创建业务对象所必须的基本信息:◆超级类型如果需要继承某一个已经存在的业务对象,可在此指定其父类型的业务对象名称◆对象类型本业务对象的ID◆对象名称本业务对象的名称,命名规则同【对象类型】◆名称业务对象的描述◆说明更详细的描述◆程序存放本业务对象实现代码的程序名◆应用程序指定本业务对象的应用目录2.2创建业务对象的关键字关键字段用于唯一确定一个业务对象类型的实例,在本流程中选择采购申请号作为关键字。