Skip to Content
0
Former Member
Jul 20, 2009 at 03:00 PM

Use SAP_WAPI_READ_CONTAINER to read all container element

2079 Views

Hi All,

I am writing an ABAP to read message texts from a workflow container. The text is stored in a container element called RejectionTexts which is a multiline container element.

When I call the Function Module SAP_WAPI_READ_CONTAINER it brings be back the "standard" container elelments but doesn't return the element RejectionTexts.

Am I doing something wrong or is there another FM for getting the other container elements?

DATA: lt_container LIKE swr_cont OCCURS 0 WITH HEADER LINE.
DATA: lt_worklist TYPE swr_wihdr OCCURS 0 WITH HEADER LINE. "PH9K008190
DATA: lt_message_lines  LIKE  swr_messag OCCURS 0 WITH HEADER LINE,
      lt_message_struct LIKE  swr_mstruc OCCURS 0 WITH HEADER LINE,
      lt_subcontainer_bor_objects LIKE  swr_cont OCCURS 0 WITH HEADER
LINE,
      lt_subcontainer_all_objects LIKE  swr_cont OCCURS 0 WITH HEADER
LINE.

lt_worklist-wi_id = '495105'.

CALL FUNCTION 'SAP_WAPI_READ_CONTAINER'
  EXPORTING
    workitem_id                    = lt_worklist-wi_id
*   LANGUAGE                       = SY-LANGU
*   USER                           = SY-UNAME
* IMPORTING
*   RETURN_CODE                    =
  TABLES
    simple_container               = lt_container
   message_lines                   = lt_message_lines
   message_struct                  = lt_message_struct
   subcontainer_bor_objects        = lt_subcontainer_bor_objects
   subcontainer_all_objects        = lt_subcontainer_all_objects.