Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to populate the CONTAINER, when calling a WorkFlow Task via FM?


I am trying to trigger an email notification to user's SAP Inbox, if Outbound IDOC got failed. I wrote the below code in the processing FM, but, i am stucked at populating the CONTAINER parameter of this Task, pls. let me know How/with What I have to populate the CONTAINER parameter of this FM?

DATA: wa_input_container    TYPE swr_cont,
            wa_swr_messag       TYPE swr_messag,
            wa_swragent             TYPE swragent.

* Fill Workflow element
      wa_input_container-element = '_WI_OBJECT_ID' .
      wa_input_container-value   = wa_idoc_control-docnum.
      APPEND wa_input_container TO itab_input_container.

* Fill Email body
      wa_swr_messag-msg_type = 'E'.
      wa_swr_messag-line = 'Error'.
      APPEND wa_swr_messag TO itab_swr_messag.

          task               = 'TS00007989'
          language           = sy-langu
          user               = sy-uname
          start_asynchronous = 'X'
          return_code        = v_sy_subrc
          input_container     = itab_input_container
          message_lines      = itab_swr_messag
          agents                   = itab_swragent.

Thank you.

Former Member
Not what you were looking for? View more on this topic or Ask a question