cancel
Showing results for 
Search instead for 
Did you mean: 

BUS2012 (PO) swe_event_create - container

Former Member
0 Kudos
1,214

Hi All,

I'm looking for a way to trigger a workflow from ABAP code. Apparently, the FM swe_event_create will do this. But when I try it by onli giving the object-key with (ebeln), I receive an error saying that there are parameters of the container missing.

I wonder how I can give these values to the container. I tried to search the forum and google, but the answers were a bit complicated and unclear. Can anyone help me on this ?

thanks !

View Entire Topic
KjetilKilhavn
Active Contributor
0 Kudos

First I would recommend that you use SAP_WAPI_CREATE_EVENT instead of the old function module SWE_EVENT_CREATE.

If you do that, filling the event container is pretty straightforward. No need to use the macro SWC_SET_ELEMENT, because the container for SAP_WAPI_CREATE_EVENT is a simple key (element) & value list.

If you don't know which container elements to fill, check the event definition to see if it has any parameters. That should be the place to look, but if the error message comes from the workflow rather than the function module you should also check the workflow to see which container elements are required (and check how they are filled from the triggering event).