How to get Workflow ID Number

Kjetil Kilhavn kjetil.kilhavn at bluec.no
Wed Apr 16 03:51:21 EDT 2008


On Tuesday 15 April 2008 16:57:32 Khatawate, Deepak N (ACCENTURE) wrote:
> Am triggering a workflow from an event using function Module
> SWE_EVENT_CREATE in my program. Once the FM triggers the event i need to
> capture the workflow ID number/workitem number of the workflow
> triggered.
That is not possible without making some assumptions. Since the workflow (or 
other workflows) can be started asynchronously (event queue) you will have to 
make the assumption that workflow event queue is not in use.
You should also use SAP_WAPI_CREATE_EVENT (if it exists in 46C, I can't recall 
right now if it does but I think it does) instead of SWE_EVENT_CREATE.

Is there not another way around your requirement? 
If you *must* start a particular workflow and don't really need the event, and 
you can't get around the need for the workflow ID, you could start the 
workflow directly using SAP_WAPI_START_WORKFLOW.

> System: 4.6C
-- 
Kjetil Kilhavn (+47 40220607)
Blue Consulting AS (http://www.bluec.no/)



More information about the SAP-WUG mailing list