‎2007 Mar 13 8:21 PM
Hello,
to trigger a workflow on a specific event, i want the workflow to be a background one, that works without user intervention. In SWE2 linkage table , to which function module should i like the event ?
i was linking it to FM: sww_wi_create_via_event_ibf but this did not work, i guess this is for creating workitems and i do not want that.
i do not want my workflow to be a workitem, i want it to start executing by itself.
points are awarded,
regards
‎2007 Mar 13 8:50 PM
Hi,
You need not fiddle around with the function module for this.
Let me explain this to you with an example:
Scenario: I want the vendor to be blocked automatically once the vendor is created in the SAP system
Solution
1. Create subtype of BO LFA1 to ZLFA1.
2. Delegate the subtype to the supertype.
3. Record a BDC for transaction XK05 which blocks the vendor.(SHDB)
4. Create a function module from the recording which accepts the vendor number as the import and blocks the vendor.
5. Create a method in ZLFA1 from the function module and uncheck the Dialog checkbox in the method properties.
6. Have a workflow that starts once the vendor is created
7. Do the binding from the event to the workflow container
8. Include a step in the workflow to call this new method from ZLFA1 and pass the parameters through the binding from Workflow -> task container.
Now create the vendor and go to transaction XK05 to check te status and it will be blocked.
I might have done this workflow in different systems for about 25 times and it has worked for me forever!
Hope this helps,
Sudhi