Handling Work Items in Workflow can be quite a challenge .Below are some of the common issues I failed in SRM for which I am writing this article in place .
Problem Areas ??
1. The work item which appears in the inbox for all approver since the Agent determination did not run properly or maybe you don’t need the work item at all now and want to get rid of it .
2. Delete the Item from the approvers inbox since it is not needed anymore .
3. SC went into error in transmission and you would like to restart the workflow
4. You may want to analyse why the work item got into error ?
Below are the couple of methods 4 in total to help you solve the above queries :
OPTION 1 : LOGICALLY DELETE .This is the option called as logically delete which basically means the workflow would cease to exist in the portal though it still does exist in the backend . This is for issue 1 to 3 where we have a Work item ID as below in which the SC is awaiting approval .
However when we check the responsible agents all users can carry out the task .
(What causes the issue would constitute another Document )the work around is what I am describing here to get rid of the work item in such cases .
How to Logically delete :
To get to the below screen . Go to BBP_pd and copy the work Item ID from there .
Find the work flow ID : and go to SWIA and to the below screen where you can find the corresponding error as it lists all the agents ..
Double click on the last line “ Approve Shopping cart ..” and it will take you to the next screen as below
Here choose “ Technical work item display “
Now in the same you would get the Edit option where you can choose to Change the Work item ID .
Please note :
- Logically delete would delete the cart though its existence would still remain in the backend system .
- These workitems are then immediately removed from users’ inboxes and it also delete the child work items . So ensure you delete at the higher level before it starts causing issues .
OPTIOn 2 : Use transaction SWWL OR report RSWWWIDE
However this is not a recommended approach in production Since it not only deletes the work item from the front end and backend it also deletes all instances so it creates issue incase of audit purposes .
See the 2 options marked in yellow .
OPTION 3 : /SWW_SARA to delete
With this function you write the workitem data to an archive (a file) before you delete them, In real life you won’t import them again, but you audit trail will remain intact, and you are able to retrieve it again with transaction SWW_ARCHIV.Furthermore SWW_SARA only deletes work-items with status “Completed” or “Logical_deleted” where SWWL will delete any workitem, so with the wrong selection criteria in SWWL – you will face the risk of deleting active / live workitems accidentally. and you are able to retrieve it again with transaction SWW_ARCHIV
OPTION 4 : SWI2_DIAG For restart of Workflow
Only thing we need to enter as input is the workflow monitoring period:
This would show the over all errors and also can be used to restart any of the erroneous workflow transactions ..
You may double click further to get the new screen as below with the descriptive Error text data .
Further double clicking may help you with the possible resolution or to help you find the relevant OSS .
Hope you like this article .If you do please leave a comment and your feedback and don’t forget to rate the article . Thanks all
Useful Workflow T codes:
Other Ref articles :
Notes to Refer
SAP Note 1286336 (‘New logically delete function for mass processing’) adds the function code ADMC (Administrator Cancel) to transaction SWIA. You can check the SAP Note to see if you already have the requisite support pack; if not, you can use SNOTE to put this note in yourself.