Skip to Content
0

Object key issue in Workflow triggering using Class

Nov 29, 2016 at 08:15 AM

156

avatar image
Former Member

Hi All,

I am not getting object key which i passed ,when i triggered workflow using Class event.

I have triggered workflow using class event

CALL METHOD cl_swf_evt_event=>get_instance

EXPORTING im_objcateg = 'CL'

im_objtype = 'Class name'

im_event = 'Event name'

im_objkey = <Eg : ABCD123>

im_event_container = lo_event_container

RECEIVING re_event = lo_event_ref.

CALL METHOD lo_event_ref->raise.

In run time all custom workflows object type stored as this class name "CL_SWF_UTL_EVT_IDENTIFIER" instead of passing different class name in above code.

Object key stored as Instance ID <different number>in table SWW_WI2OBJ. i am not able to get object key which i have passed <Eg : ABCD123> any places and tables.

how to convert or link between Instance ID to object key which i passed ?

i want to filter particular workitem using below FM "SAP_WAPI_WORKITEMS_TO_OBJECT" object key as <Eg : ABCD123>

Please help me the same

Regards,

Venkat

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

avatar image
Former Member May 11, 2017 at 04:13 PM
1

Hi Venkat,

you have probably forgotten to implement the workflow interface IF_WORKFLOW. Important are the LPOR methods to save your ZCLASS and your IDENTIFIER to the database. After this implementation you should be able to see your entries in table SWW_WI2OBJ.

Regards,

Jens

Share
10 |10000 characters needed characters left characters exceeded
Mike Pokraka May 11, 2017 at 04:28 PM
0

Jens has given you some good advice for the class implementation.

Also, please use the SAP_WAPI functions unless you have a specific reason to do otherwise. For class and BOR events, it's FM SAP_WAPI_CREATE_EVENT_EXTENDED.

Another thing: just look in the WF container to see if your object instance works, rather than tables or using function modules. Much easier.

Share
10 |10000 characters needed characters left characters exceeded