cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger WF based on Doc.type

karuna_gangireddy
Contributor
0 Kudos

Hi,

I am working on a new WF which should trigger on SD order creation. I know we can use BO BUS 2032 for this. But i was to trigger only upon a certain doc type say 'ZABC'.

I checked the forums post and found that we need to create a check FM in SWETYPV along with the receiver FM. Can anyone out there be more specific

put more light on this please?

Thanks,

Karuna.

Accepted Solutions (1)

Accepted Solutions (1)

bpawanchand
Active Contributor
0 Kudos

Hi,

If you can get that doc type value in the BOR BUS2032 then by defining a START_CONDITION in the start events tab of basic data of workflow you can restrict the trigger of workflow.

Regards

Pavan

karuna_gangireddy
Contributor
0 Kudos

Thank you so much Pavan. I got it. I have another question please. I want to send a mail to the partner with partner function say z1 of this customer. I have the partner details in VBPA. I see that i can get the sold-to/Customer from BUS2032 but how do i go with getting the partners and assigning Z1 to the agent? Can you please help me with this?

Thanks in advance,

Karuna.

karuna_gangireddy
Contributor
0 Kudos

HI,

I am having 3 issues with my WF:

1. I added the doc. tyoe condition under the START_CONDITION of the START_EVENTS but it is not triggering upon order

creation. I do not see any trace under SWEL but when I tested with tcode: SWUE i see the entry in SWEL.

2. For pulling the partner for the customer on the order i created a custom method to my custom BO-ZBUS2032 and called a

custom FM with the parameters. I also tested my BO and my custom method providing the parameters and it worked fine by

pulling the partner i needed.

3. When i test using tcode: SWUE i am getting the message 'Execution Interrupted - SWF_RUN611'. i also tried using SWUD but

did not find anything.

I appreciate if anyone can help me out with this.

Thanks,

Karuna.

karuna_gangireddy
Contributor
0 Kudos

Hi All,

I am down to 1 issue. The WF runs perfectly when i am executing from tcode:SWUE.But still it doesn't trigger when i create a doc. type of 'ZABC' which is the condition to trigger the WF.

As i mentioned earlier:

1. I have the START_CONDITION in the START_EVENT.

2. I can see the entry in SWETYPV for my custom BO.

I am not sure what else i am missing. Any help/suggestion are much appreciated.

Thanks,

Karuna.

bpawanchand
Active Contributor
0 Kudos

Hi,

Its good to hear... Now can you please let me know how you are trying to start the workflow I mean how you are trying to raise the event are you using any function module to raise the event like SAP_WAPI_CREATE_EVENT or SWE_EVENT_CREAET. if you are using any of the mentioned function modules then make sure that you have written the COMMIT work statement after the function module call. and event try to refresh teh buffer by using SWU_OBUF transaction and refresh the org assignment from

SBWP---> on Menu SETTINGS -> WORKFLOW SETTINGS-> REFRESG ORG Assignment.

Regards

Pavan

karuna_gangireddy
Contributor
0 Kudos

Thanks all. I managed to trigger the WF on order creation.

Thanks,

Karuna.

Answers (0)