Skip to Content
avatar image
Former Member

Object key issue in Workflow triggering using Class

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

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

    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

    Add comment
    10|10000 characters needed characters exceeded

  • May 11, 2017 at 04:28 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded