cancel
Showing results for 
Search instead for 
Did you mean: 

SAP_WAPI_CREATE_EVENT -> sww_contob VALUES missing

former_member210252
Contributor
0 Kudos

Hi Experts,

I created a BO with key as EBELN and created method GET_PO_DETAILS also created EVENT 'CREATE'.

I using FM SAP_WAPI_CREATE_EVENT, passing OBJECT_TYPE, OBJECT_KEY and INPUT_CONTAINER passing ELEMENT = EBELN, VALUE = XXXXXXX.

When ABAP program executed Workflow is triggering successfully and could see in Work Items in SWIA Tcode.

In SWWWIHEAD I could see details of the TASK, Work Item Text (PO # XXXXXXXXXX) details. But in SWW_CONTOB table don't have any entries related to same work item id present in table SWWWIHEAD.

I would like to look for SWW_CONTOB-OBJTYPE and SWW_CONTOB-OBJKEY first then basing on the WORK ITEM ID here would like to go to SWWWIHEAD. This is needed because I would like to check if PO is already sent for approval and any one tries to edit the same po then the document has to be locked restricting editing.


Please provide your inputs why SWW_CONTOB don't have entries.

Regards,

Rafi

Accepted Solutions (0)

Answers (2)

Answers (2)

anjan_paul
Active Contributor
0 Kudos

Hi,

Please check the contianer name is exactly EBELN not in small case like ebeln or Ebeln.

Thanks

pokrakam
Active Contributor
0 Kudos

Because SWW_CONTOB is not used since 6.x, these days the default container store is XML. This is a good example of why APIs are better than direct table access, please use SAP_WAPI_READ_CONTAINER to retrieve the container for a WF and SAP_WAPI_WORKITEMS_TO_OBJECT to get the work items for an object.

By the way, if you already have the PO number as your object key, having an EBELN element is redundant. Also, it's better to call elements by their English names, makes it easier for everyone to understand.