cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger a workflow for some condition

Former Member
0 Kudos

Hi

When the status of the costing sheet has been changed to ‘Waiting for Approval’, system should trigger a workflow. The BOR which is being used is BUS2031. The events which can be used for triggering the workflow are CREATE & CHANGE. How do we maintain this starting condition for this events ?

Regards

Anik

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Do you mean that the event is not triggered at all as standard?

Or do you mean that you want to maintain starting conditions for the workflow itself? This you can do in SWB_COND. Or then you can define a check function module for the linkage between your event and workflow in SWETYPV.

Former Member
0 Kudos

Hi Karri

I mean to say my workflow will be triggered only if the Approval Status of Costing Sheet (VA22) is Waiting for approval. How can I make use of SWB_COND in this case.

Regards

Anik

Former Member
0 Kudos

First of all you have to find whether a table entry gets updated for the status. If so you can create a Virtual attribute in the custom subtype of BUS2031 which you have delegated that will determine whether the status is set or not. Accordingly if the status is set the Attribute(Boole-Boole) will be X and you can use this in your start condition of Wflow in SWB_COND.

Thanks

Arghadip

KKilhavn
Active Contributor
0 Kudos

SWB_COND is used to add restrictions, i.e. to check additional conditions when a triggering event has been created and prevent the workflow from starting unless the conditions are met. My guess is that this is why Karri responded as (s)he did.

So in your case, you must first find out which event is created when the approval status of your costing sheet is changed to "Waiting for approval". If an event is created, and this same event is used for other status changes, you add a condition in SWB_COND.

If no event is created, you have some other options. One is to use change documents, if change documents are created for the business document change. If this subject is new to you, search SDN and other sources for information about SWEC for a start.

Other options would be Business Transaction Events (BTE) or user exits of any kind (including BAdIs of course) which can be used to create an event when the approval status is changed.