cancel
Showing results for 
Search instead for 
Did you mean: 

How does the PO WF trigger?

Former Member
0 Kudos

Hi Guys,

The question may seem simple, but I am looking for a tough solution.

I am aware that we have BUS2012-RELEASESTEPCREATED as the triggering event for the PO Workflow. and in SWETYPV we mantain the link between the workflow and the event. All this is working absolutely fine.

I also understand the fact that when a PO (that has only one release strategy which is released via Workflow) is created and saved, the event RELEASESTEPCREATED gets published ( i have verified this in SWEL) and hence WF triggers.

Our requirement is to stop this triggering of the workflow for a specific set of purchase orders, all of which are created via a customized transaction. We are trying not to make any changes from the workflow level to inhibit its execution (by using start conditions, etc). So we would like to know if there are any possibilities that we can add code between the saving of the PO and the triggering of the workflow so that it prevents the latter. Does any one have any clue how this can be achieved?

Any thoughts/suggestions are most welcome. Thankyou for your time!

regards,

anwar.

Accepted Solutions (1)

Accepted Solutions (1)

former_member186746
Active Contributor
0 Kudos

I don't see the added benefit of changing SAP standard code to prevent the triggering of an event, when conditions are perfectly suited for your requirement.

What is the real reason for not using conditions.

I just mentioned in another post in this forum that in extreem cases you can use check function modules to prevent the triggering of an event (goto SWE2 and double click the event-->wf linkage, for more info search this forum)

Kind regards, Rob Dielemans

Former Member
0 Kudos

Hi Rob!

Thanks for your time to looking into my post.

Well, let me write in short what our requirement is. we are creating anew transaction to release POs, in which this new transaction will use ME28 to release the POs. Our new transaction will have the ability to release POs on a mass scale, hence the usage of the new transaction as compared to the standard ME28.

When we do this 'mass release' of POs, we dont want workflows to trigger as it would generate lot of emails and workitems. Hence, we need to stop the workflow to trigger in the first place.

But, (a big BUT), when such a PO (that got created via mass release) gets its release strategy reset (say by increasing the PO amount in the future), we then would like the Workflow to trigger and proceed as usual.

So the bottom line is, when such POs get 'mass released', for the first time we do not want the WF to trigger, but the second and subsequent times we do want the WF.

any thoughts/suggestions would be greatly appreciated.

regards,

anwar.

former_member184495
Active Contributor
0 Kudos

Hi MA,

wht I cld interpret from ur thread is,

u hv a ZME21N where u create ur PO's.

now ur general WF takes u to ME28 which is for individual release of PO.

In that case,

1. create a custom WF and instead of ME28, use ME29 for mass release of PO in ur task method.

2. create a check FM which wld identify tht this PO is from ZME21N and work accordingly.

Hope it helps.

Aditya

former_member186746
Active Contributor
0 Kudos

Hi Anwar,

Before we get to the solution. do you know about the event queue. This was specifically designed by SAP to cater for monthly/yearly runs which would normally cause the system to a halt if hundreds of thousands of events were getting triggered at one moment in time.

You can activate it with transaction SWEQADM. Her you can say for example we want 50 events every 5 minnutes max, or whatever is suitable for your requirement.

Now to the solution.

I would still go with conditions.

I would use a generic user to schedule the backgoundjob for mass release of PO's. Now in swb_cond you set the condition for the workflow to evt_creator NE the generic user. This will cause to not triggering workflows when that user releases a PO.

Another option would be to find out if a BAPI (parameter) exists to release the PO but prevent the creation of an event/idoc (I don't know exactly how the wf is triggered in your system, in CRM for example you can save a transaction and say no IDOC)

Kind regards, Rob Dielemans

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Mohammad,

Yes there is a very simple solution for your proble.

Just create a rule .In that rule u check for the type of PO . IF the PO is the one for which you dont want to trigger the workflow , just dont append any data to the internal table agent_tab.

Use this rule in your task