cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Cancel Workflow

Former Member
0 Likes
2,935

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,

View Entire Topic
Nawanandana
Active Contributor

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

Former Member
0 Likes

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?

Nawanandana
Active Contributor
0 Likes

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