2015 Jan 22 1:57 AM
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
2015 Jan 23 9:20 AM
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
2015 Jan 22 2:52 AM
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
2015 Jan 23 9:20 AM
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
2015 Jan 23 9:58 AM
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
2015 Jan 23 10:25 AM
Hi Aditi,
You can use FM SO_NEW_DOCUMENT_SEND_API1 to send email to user.
Thanks,
Shailesh
2015 Jan 23 12:41 PM
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