on ‎2013 Sep 09 2:04 PM
Hi Experts,
I wanted to trigger a custom workflow during sales order creation/change. As I wanted to start workflow only based on some complex conditions I have decided to trigger it from user exit MV45AFZZ/USEREXIT_SAVE_DOCUMENT. Buidling this logic as workflow starting condition or @ event linkage is not possible.
I can think of two options here to start workflow from user exit.
Option1: Start the workflow directly with the FM SAP_WAPI_START_WORKFLOW'. I doubt workflow triggerd in this way is not linked to the transaction and thus I shouldnt be able to see this from VA02/03?
Option2: Link my custom workflow to an event and triggering the event using FM SAP_WAPI_CREATE_EVENT. Events CREATED/CHANGED for business object BUS2032 are triggered whenever sales order is changed/created. I am confused here about what event I need to link to my workflow and trigger? Do I need to create a subtype for 2032 and link my custom workflow and trigger CREATED & CHANGED event? As I am not changing anything for the business object my question is why should I create a subtype?
Much appriciated for any calrification on this,
Thanks,
Rams V.
Request clarification before answering.
Thanks every one for your valuable inputs. Using FM SAP_WAPI_START_WORKFLOW has any disadvantages compared to deligation with custom event?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
You should avoid using SAP_WAPI_START_WORKFLOW. Use events when you can. There are many downsides, including not being able to disable it easily and it's harder for future support to find out how the workflow gets started. Also, the workflow template has to be set to General Task.
regards
Rick Bakker
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 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.