Quantcast
Channel: SCN : Blog List - ABAP Development
Viewing all articles
Browse latest Browse all 943

Processing workflow messages in SAP

$
0
0

This article describes the use of function module ‘SAP_WAPI_SET_WORKITEM_COMPLETD’ in processing the workflow messages. This function module will process the workflow item and set the status as completed.

 

Calling the function module SAP_WAPI_SET_WORKITEM_COMPLETD

 

   CALL FUNCTION 'SAP_WAPI_SET_WORKITEM_COMPLETD'

 

       EXPORTING

 

         workitem_id    = v_workflow_id

         actual_agent   = v_agent

         language         = v_language

 

        IMPORTING

 

         new_status    =  x_status

         return_code    = v_returncode

 

        TABLES

 

          message_struct = t_messages.

 

Parameters used

 

  • v_workflow_id – workflow item id
  • v_agent – User’s logon name (sy-uname)
  • v_language – System language (sy-langu)
  • x_status – This structure will have the work
    item status.
  • v_returncode – Return code (sy-subrc, it will be 0, 1 or 999)

          0 – Call successful

          1 – Operation is not executable

          999 – An unknown error has occurred

  • t_messages – Returned messages. This internal table will have the following fields.

          MSGID - Message Class

          MSGTY - Message Type

          MSGNO - Message Number

          MSGV1 – Message variable

          MSGV2 - Message variable

          MSGV3 - Message variable

          MSGV4 - Message variable

 

Workflow id values are present in standard table SWWWIHEAD.


Viewing all articles
Browse latest Browse all 943

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>