cancel
Showing results for 
Search instead for 
Did you mean: 

Is it pssble to chck if the evnt was triggered in Bckgrd or Frgrd in WF.

Former Member
0 Kudos

Hi .... i am processing an idoc which creates a sales order and standard event is fired. This event is linked to a custom worflow.

Standard event of sales order create is also fired when SO is created by the user in foreground and this triggers my workflow.

My requirement is the workflow should only be triggered when SO is created using IDOC and not when user creates it manually from foreground.

Can somebody please help me in this ... thanks.

Accepted Solutions (1)

Accepted Solutions (1)

surjith_kumar
Active Contributor
0 Kudos

Hi,

1) For the Sales Order BO is BUS2032

2) In the Idoc Configuration you have to assign this BO and the event CREATED

Then once the Sales Order Idoc Receives this event and BO will be trigger.

For this BO std. workflow are available, check it matches your requirement.

WS20000378

WS20500111

WS23000027

WS80000005

WS80000006

Regards,

Surjith

Former Member
0 Kudos

Surjit thanks for your reply .....

By IDoc configuration you mean the partner profile settings? If No please let me know in detail.

If Yes, then i see IDoc section and Application Object section. Where i need to do add the event?

I tried both the option but event in appliction section is not trigered.

Answers (3)

Answers (3)

Former Member
0 Kudos

I think you can put a check with the Evt_Creator Container element of the event. For foreground it would be the person who is creating SO from VA01 and for IDOC it would be some background user. Create a start condition or Wflow from SWB_COND accordingly.

Thanks

Arghadip

saumya_govil
Active Contributor
0 Kudos

Hi Sunny,

I am not sure if the SY-BATCH value is passed to the workflow but there are few standard fields that are passed in 'System Fields' that can be found in the Event container.

Check if any of these fields help you identify the source of the BO event. You can check them in the binding between the Event container and workflow container in Basic data -> Start Events, binding.

Hope this helps!

Regards,

Saumya

saumya_govil
Active Contributor
0 Kudos

Hi Sunny,

I think the best approach should be to trigger a custom event when a Sales Order is created using Idoc.

You can do that by delegating your standard Sales Order BO to a custom ZBO.

Now add a new Event to the ZBO. Set this event as the triggering event of the custom workflow.

Now wehn a Sales order is created, trigger this ZBO event using FM SAP_WAPI_CREATE_EVENT.

In this way you would be able to control the workfow execution.

Regards,

Saumya

Former Member
0 Kudos

Soumya,

Thanks for your reply ... i am already aware of this method. this would be my last resort. I wanted to findout if even container can pass sy-batch values to workflow container.

Thanks