cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Trigger Workflow using Function Modules

Former Member
0 Likes
3,765

I have created my first custom workflow, and all I need to do now is trigger the WF from a user exit. But I can't get the FM's to trigger my event.

- I have created an event (ZUPDATE) in SWO1 for my ZYD_ERRORS object.

- I have added this event to SWETYPV

- And i am using SWE_EVENT_CREATE_IN_UPD_TASK to try and trigger my WF.

- but when checking SWEL no event is triggered.

I am unsure of the parameters I should be using in SWE_EVENT_CREATE_IN_UPD_TASK . I am passing in ZUPDATE (event) and ZYD_ERRORS (object), but don't know what the objkey parameter should be.

Please help.

View Entire Topic
Former Member
0 Likes

Hi,

How about creating event with Function Module SWE_EVENT_CREATE.

You may leverage below code.

CALL FUNCTION 'SWE_EVENT_CREATE'

EXPORTING

objtype = 'BUSXXXX'

objkey = obj_key

event = 'XXXX'

start_recfb_synchron = 'X'

IMPORTING

event_id = event_id

TABLES

event_container = container

EXCEPTIONS

objtype_not_found = 1

OTHERS = 2.

Regards

Shital