on 04-21-2010 9:46 PM
Hi Guys,
Here's my problem:
I'm triggering a WF from the Business objects BUS2032, event CHANGED (for sales orders). But the first step in the workflow is to block the order for delivery, so I'm using the BAPI BAPI_SALESORDER_CHANGE to modify the field delivery block of that sales order.
The problem is that when the BAPI is executed, the event CHANGED from the BO BUS2032 is triggered, so the WF is triggered again, and so on...it's like a loop.
So my question is, is there a way to modify the sales order inside the WF without triggering any event inside the WF?
Thanks!
I think you can create a virtual attribute that will be of type BOOLE-BOOLE and will get set when this FM
SAP_WAPI_WORKITEMS_TO_OBJECT
returns an entry in the Worklist parameter. Please provide the Business object as BUS2032 and the sales order number in the FM import parameter.
Use this attribute in order to create Start condition from SWB_COND Tcode and if this attribute is blank then it should trigger workflow.
You can also make use of Check Function module in SWE2 entry for your Workflow.
Thanks
Arghadip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi MatiasAZ,
Change standard code to not trigger the event is not recommended.
Alternatively,You can put a check in your workflow to complete itself if there is another workflow is running for the same sales order.
Or you can also put filter function module on the event linkage via transaction SWETYPV not to trigger the event if there is a workflow running for that sales order.
Transaction SWI6 can tell you that any workflow with specific object is running.
Chaiphon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.