cancel
Showing results for 
Search instead for 
Did you mean: 

How to trigger PR workflow based on certain plant

former_member212001
Participant
0 Kudos

Hi,

Release strategy is configured for document type ZMRO in my system. So my workflow will trigger only for ZMRO.

I would like to know how to trigger workflow based on plants any configuration exists?  or making start conditions.

Using BOR BUS2105 ( Triggering event RELEASESTEPCREATED ) .

only releasecode parameter for releasestepcreated so not able to make condition.

Thanks & Regards,

Priya

Accepted Solutions (1)

Accepted Solutions (1)

anjan_paul
Active Contributor
0 Kudos

Hi,

  I feel the suitable option is to use check FM in Event linkage.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Priya,

Cant you use start condition in triggering event?

Thanks and regards

vishesh_malik
Participant
0 Kudos

Hi Priya,

I am just going to repeat the same that others have mentioned. Use Check function Module in event linkage for your requirement. In case you are not familiar with the process below are few points to help:

1) Event linkage is maintained in SWE2 or SWETYPV transaction.

2) Check function module is simply a function module in which BO is used to fetch other data related to BO using primary key.

3) Using this key, you can find the data and implement a check in the same way we do in ABAP. In case check fails raise an exception else the event linkage will trigger workflow. Just remember to activate the linkage.

Hope it helps!

Thanks,

Vishesh

0 Kudos

There are two ways to do this:

1. You create a check function module and assign it in the event linkage.  In this check function module you can check the plant details for the PR and either continue to trigger the workflow or raise an error which will prevent the workflow from triggered.

(Or)

2. If you dont want to go with the SAP standard event processing and want to go for complete customized one, you can create a sub-object for BUS2105 eg. ZBUS2105.  You can create your own custom event in this ZBUS2105 and delegate it to BUS2105.  Now you can use the BADI ME_REQ_POSTED, method IF_EX_ME_REQ_POSTED~POSTED to trigger your custom event.

But for your requirement, I would suggest to go for the first option, a check function module as you are only restricting at workflow trigger level and not wanted to change the SAP standard functionality.

Regards,

Vijay

former_member186746
Active Contributor
0 Kudos

Hi,

I would copy BUS2105 and delegate it, then add some extra attributes so that you can influence the event-->workflow triggering.

Kind regards, Rob Dielemans