cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple triggring events - How can you identify which one started the wf?

Former Member
0 Kudos

Hi all,

I would like to know if there is a way of identifying which triggering event started the wf.

The situation is like this: i have a workflow that can be started by one of 6 triggering events (6 different situations for vendor master data - creation needed, extension needed, change needed and so on). I have to do different steps inside the workflow function of which event actually triggered the wf.

Is there a container element that gets some sort of identification for the event that actually triggered the wf?

I found a container element that holds the name of the event but it's a multiline container element (so i guess it holds all the event names) and i can't use it in a multiple condition.

Thank you

Cristina

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Very simple. Create a Workflow Container element FLAG_EVENT of type BOOLE-BOOLE. This field should be set binded with 'X' from event to Workflow when a particular event is triggered in the binding from event to Workflow. Later on in your Workflow design check for this Flag. If this is set the event is for which you set the Flag.

Thanks

Arghadip

Former Member
0 Kudos

Hi Arghadip,

Thank you for your answer.

Please bare with me just a little bit more. So i should create 6 such wf container elements (one flag for each triggering event) and after that chack which one of the flags has the 'X', right?

thanks

Cristina

Former Member
0 Kudos

maybe a bit more work, but you could create for those events, an event parameter, where you can assing when you call your event, for example a letter. this letter you can check in you WF

Former Member
0 Kudos

Hi Kristof,

this is what i thought also...to create a parameter for each event and assign a constant to it (a letter for instance).

But i can create event parameter as object type or ABAP dictionary and i can't assign initial value...or at least, if there is a way to do this, i don't know it.

Thanks

Cristina

Former Member
0 Kudos

for those events, you can add want you want as abap dictionary

it doesn't matter, just look in SE11, where you can find any kind of data element of type char1 and use that one.

Those events, are those standard events or events that you trigger yourself with the function SWE_EVENT_CREATE?

Edited by: Kristof De Bruecker on Mar 24, 2010 2:56 PM

Former Member
0 Kudos

Kristof, Cristina,

You are on the right track but you don't even need to fill something in the event container. Just create a container element in your workflow container as advised by Arghadip, but choose a multiple value data element (i.e. one letter per even as you suggested) instead of a bollean. You can then fill that container element in the event->workflow binding by hardcoding the letter.

Rgds,

Patrick

Former Member
0 Kudos

the events are custom events, created by me in the business object type which is a subtype of a standard business object type

Former Member
0 Kudos

If there all are different events, you can use the logic of Patrick. then you don't need to assign any values.

Former Member
0 Kudos

Hi Patrick,

Thank you for your sugestion. This would do it if i could find such multiple value data element. Do you have any idea what data element i should use or how i could search for one that suits?

Thanks

Cristina

Former Member
0 Kudos

Well, personally I prefer creating my own domain and data element in SE11 for this kind of need.

Rgds,

Patrick

Former Member
0 Kudos

Patrick,

Do you think i could use CHAR03 data element for this purpose?

Thx

Former Member
0 Kudos

for example, you could use the data element VBTYP, but personally you should create one yourself.

Then you can add the short description yourself

Former Member
0 Kudos

Sure you can.

Then you have to agree on a three characters code for each of your six events.

Rgds,

Patrick

Former Member
0 Kudos

Thank you all for your help.

I will use CHAR03 and set a code for each event and then bind it as constant to the EVENT_FLAG workflow container element in the binding event -> workflow

Thanks and have a nice day

Cristina

Answers (0)