Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to add prerequisite in a work flow for Me22n

Former Member
0 Kudos
355

Hello all

I have to add prerequisite condition  in a Workflow. My workflow for ME22N should trigger only if

Document type = 'UB' - Tech Name

(ekko-bsart = 'UB'.)

Release Indicator = 'X' Tech Name ekko-frgzu = 'X' and if we select a line item and delete it and save the workflow the indicator comes in

EKPO-loekz = 'zL'.On these conditions the workflow should trigger.Please guide and suggest how to start and where to write those prerequisites.

Regards

Aditi


1 ACCEPTED SOLUTION

Former Member
0 Kudos
233

Hey Aditi,

You can use CHECK Function module for complex business logic like this. By this was , this Check FM will be triggering first before it can allow the workflow to trigger.

got for check FM in google and you will find how to create check FM.

Thanks

Rakesh

5 REPLIES 5

Rodrigo-Giner
Active Contributor
0 Kudos
233

You could use tx SWD_COND, in this transaction you can set up conditions to filter the raising of  WF

SAP ABAP HANDY: Use of transaction SWB_COND or Check function modules.

I dont know if you will have all the field at your disposal.

Regards

Former Member
0 Kudos
234

Hey Aditi,

You can use CHECK Function module for complex business logic like this. By this was , this Check FM will be triggering first before it can allow the workflow to trigger.

got for check FM in google and you will find how to create check FM.

Thanks

Rakesh

0 Kudos
233

Hi Rakesh

I want to know after we add our logic in the function module and  want to check  after the workflow   gets triggered  its  control  comes to  the function module or not in debug.

Once I do it I want to send a mail to the concerned user. How can we do that?

In the case if I don't want to create a new workflow.

Regards

Aditi


0 Kudos
233

Hi Aditi,

You can use FM SO_NEW_DOCUMENT_SEND_API1 to send email to user.

Thanks,

Shailesh

0 Kudos
233

Hey Aditi,

Sorry your question is not very clear , but i will try to answer this. This CHECK FM is the bridge between event triggering and the creation of workflow instance.

Event triggered => Check FM Execution => Workflow triggered.

Now , if in the CHeck FM , you decide not to trigger workflow , then you can raise a exception "DO_NOT_TRIGGER" and workflow will not be getting triggered. Just before this exception , you can send email ( by FM mentioned in below reply ) and you are fine.

Do let me know if still its not clear.

Thanks

Rakesh