There are situations in a support project, where a workflow will fail in error status. This may be due to not maintaining the required data in some table. After maintaining the data correctly you may need to restart the workflow again. Now we can see how to restart SAP Workflow. Below are the two ways on how to restart a SAP workflow.
Re-start a workflow from SWPR transaction.
A workflow can be re-started if it is in “Error” status.
Goto SWIA and get the Workflow ID
The workflow is restarted after error successfully.
Now we can see how to create a workflow with the help of SAP_WAPI_CREATE_EVENT function module. We can also restart a workflow with a different initiator with this function module. Here we can also trigger a workflow which is not in error status.
1. Go to SE37 transaction and enter the function module name and execute.
Function Module : SAP_WAPI_CREATE_EVENT
2. The below screen will be displayed.
3. To get the OBJECT_TYPE, open the workflow in SWIA transaction. Select the work item and click on “Display work item container” you can find the Object type starting with BUS*****.
4. The other details are as below,
– OBJECT_KEY is the complete key with the zeros padded ( Example: document number or customer number)
– EVENT will be the status (CREATED or STARTED etc)
– USER will be the initiators User id. Here we have the provision to change the existing initiator to a new initiator.
– Other details will be populated automatically.
5. Execute the function module.
This process will create a new workflow item.