on ‎2019 Jun 14 6:57 AM
caDear Experts,
Could you please provide best possible ways to cancel the workflow which was raised against quote when it is expired.
For instance, I have a Quote of 15 days validity and workflow triggered against to it and it is pending for approval. If the quote is expired(after 15 days) my workflow is no longer valid and it should be cancelled automatically. Currently it is sending reminders to approval though my quote is not valid.
I thought of creating a new report which checks for open workflows for expired quotes and cancel via FM
SAP_WAPI_ADM_WORKFLOW_CANCEL. Can you please suggest any other best way to handle this requirement?
Thanks,
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hi,
You can achieve this using deadline monitoring in same workflow, no need to have separate report for this.
Open the workflow and do the changes for necessary place
In the activity or task you need to open the tab
1.Latest End and Fill the information according to image
2. Go to outcome Tab> Give name under process obsolete
3.Now once you go to the workflow you can see obsolete item and you can create email under that
4.Next step you have to create process control -Function will be obsolete or cancel
Then it after 15 day escalate using mail and cancel the work item.

Regards,
Nawa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Nawa for the solution and the provided solution would work for the new workflow instances. But I have many old workflows currently in the production and I cannot do any changes for the existing instances and I would like to cancel all the old workflows. Could you please suggest how to cancel all those workflows?
Hi,
You can use FM SAP_WAPI_ADM_WORKFLOW_CANCEL to cancel the work item. Using SE37 Search for SAP_WAPI* and you'll find a whole bunch of other useful FM related to workflow. you have to use table SWWWIHEAD get header information before pass in to the FM. it will give you the work item ID. you can get item detail using FM SAP_WAPI_GET_CHILD_WORKITEMS
OR
Other option is use the program RSWWWIDE- but it will delete the workitem .
Regards,
Nawa
Check whether standard event triggered when Quote expires Else create custom event and use enhancement to trigger the custom event when quote expires. After this you can use wait for event(Standard or custom event ) step in parallel to approval process (Using fork) and can complete the workflow using Process control step.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.