Saturday, 25 May 2013

Workflow Log Analysis in SAP

Analyzing a workflow log place a very important role especially when you are in support project. Workflow log analysis helps us to find the root cause and to track the crux of any issues encountered in the workflow cycle.

In this blog we will see how to proceed when the Invoice (MIR4) related issue is faced wherein we have to track who is the agent responsible? When the agent responsible approved the invoice? Different rules to identify the Actual agent? Which IDoc is triggered? What kind of notification is set? And so on…

1. Run the T-Code MIR4 (Display Invoice Document). Input the invoice number for which you want to do the analysis and click on display document.


2. In the displayed invoice click on the GOS (Generic Object Services) object à Workflow à Workflow Overview.


3. As soon as you click on Workflow overview a popup will appear displaying the details of the Invoice workflow. Now click on display workflow log.


4. Now you will see workflow log screen. Suppose if you want to know who exactly are Actual / Possible / excluded  Agents, just click on any of the Agents button it will show you the respective agents.  One pint to remember here is that Actual Agents are mostly determined by using Rules, Positions and Expressions. An Actual agent must be one among the possible agents minus the excluded agents. You can find to which notification does the agent belongs in ‘PPOSE’ Tcode and in ‘SU01D’ Tcode you can find the agents details. Some times situation will arise where you have to debug the Rule used to determine the actual agent in order to find the actual agent.


5. If you want to know the technical details of the invoice workflow, click on table content button.


6. Now you will see Workflow Id which is nothing but task id which begins with WS followed by 8 digit number and different work items associated with workflow. In this the Container tab is just like a repository which stores the information regarding the various elements involved in Workflow.  You can find who has started the workflow, which business object is used, which IDoc is created and all the container elements. See to it that binding exists in all the container elements.


7. If you want to see the design of the workflow and insight settings of the workflow double click on the Task id WS90000117 or else execute the Tcode ‘SWDD’ and give the Task id you will see the workflow definition.


8. Now double click on any workflow step to know which business object is being used for the task, events that trigger that task and the rules defined to find the agents. In the default rules sub screen you can find the rules used. For invoice related workflows standard business object ‘BUS2081’ is used commonly.


9. Suppose if you want to execute the a particular work item of a workflow then run the ‘SWIA’ Tcode and provide the work item id and execute.


10. After executing, you will see the below screen which shows the work item status and work item type. Now you can do the administrative activities such as Replacing / Completing / Cancelling and so on for more on Cancelling work item refer my blog on Difference between logical and physical deletion of work items in SAP workflow



Talking about work item types and work item statuses,

There are basically 12 types of work items and you can see only 3 types of work items Dialog work item (W), Deadline work item (D) and Work item queue (A).
There are 11 types of work item statuses. The status SELECTED tells that the particular work item is reserved by the agent so that no other possible agents can execute that work item (Once the agent reserves the work item, that particular work item disappears from others’ agents Inbox).

The above steps are just the road map for analyzing workflow log. The concluding analysis depends on you how well you crack it and the kind of problem you encounter in the workflow.

No comments:

Post a Comment