cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong TYPEID and INSTID in table SWW_WI2OBJ

sankar_bhatta
Participant
0 Kudos

Hi Experts,

i am using below code in report to trigger a workflow ( I have hard coded everyhting for testing purpose ). I see the workflow is triggering because I can see entries in table SWW_WI2OBJ. But the problem is the INSTID and TYPE ID fields are not showing correct values. TYPE ID is always CL_SWF_UTL_EVT_IDENTIFIER and CATID is CL. INSTID has some random value other than what I am passing in "instid" paramter.

I have crated a subtype (ZBUS2015) for BUS2015 and delegation done. created a new event called POSTED in ZBUS2015. Am I missing something?

CALL FUNCTION 'SAP_WAPI_CREATE_EVENT_EXTENDED'
 EXPORTING
 catid = 'BO'
 typeid = 'BUS2015'
 instid = '0180000423'
 EVENT = 'POSTED'
* COMMIT_WORK = 'X'
* EVENT_LANGUAGE = SY-LANGU
* LANGUAGE = SY-LANGU
* USER = SY-UNAME
* IFS_XML_CONTAINER =
* IMPORTING
* RETURN_CODE =
* EVENT_ID =
* TABLES
* INPUT_CONTAINER =
* MESSAGE_LINES =
* MESSAGE_STRUCT =
sankar_bhatta
Participant
0 Kudos

Hi Team,

can anyone help me here?

Accepted Solutions (1)

Accepted Solutions (1)

sankar_bhatta
Participant
0 Kudos

HI,

I found the solution. open the workflow template from PFTC, go to "triggering events" tab. select the event linkage entry and click on binding. There we have to map "_EVT_OBJECT" to "_Adhoc_Objects" element. This will create entry in SWW_WI2OBJ table.

Answers (3)

Answers (3)

0 Kudos

Dear Sankara,

I am using ZCALSS instead of BO, in this case how the values will update in table SWW_WI2OBJ? Currently I am getting GUID in INSTD and CL_SWF_UTL_EVT_IDENTIFIER in TYPEID

anjan_paul
Active Contributor
0 Kudos

Hi,

Are you sure , the entries you showed created for your entries only.

Thanks

sankar_bhatta
Participant
0 Kudos

yes I am sure

egor_malov
Contributor
0 Kudos

Hi!

I would recommend the folowing:

- Make sure these records are really the result of your code (you can do it by turning on Event trace - transaction SWELS )

- Try to look at the workitems mentioned in these records (wi_id field) by means of Workflow Log - the records might make sense when you see them in context

- Try starting yor workflow manually ( transaction SWUS )? It is recommended to first make it work when started directly, and then proceed to more complex way of triggering (through an event)