SAP Function SAP_WAPI_SET_WORKITEM_COMPLETD - Workflow Interfaces: Set Work Item to Completed

Parameter Reference Type Length Default Optional Text
ACTUAL_AGENT SYUNAME C 12 SY-UNAME ABAP System, User Logon Name
LANGUAGE SYLANGU C 1 SY-LANGU SAP System, Current Language
WORKITEM_ID SWR_STRUCT-WORKITEMID N 12 Work Item ID

Parameter Reference Type Length Text
NEW_STATUS SWR_WISTAT u 32 New Status After Reserve
RETURN_CODE SYST-SUBRC I 4 Return Code (0, 1, 999)

Parameter Reference Length Optional Text
MESSAGE_LINES SWR_MESSAG 274 X Message Lines
MESSAGE_STRUCT SWR_MSTRUC 224 X Message Structure

Functionality
A work item is set to "completed".
If the call is successful (RETURN_CODE = 0), the parameter NEW_STATUScontains the work item status after execution. Otherwise, the parameterNEW_STATUS has no value. NEW_STATUS contains both the technical nameand the language-dependent description of the new status.
The parameters RETURN_CODE and MESSAGE_LINES show whether the call wassuccessful. RETURN_CODE has a numeric value, and MESSAGE_LINES gives atextual description for finer differentiation.
INCLUDE WF_FB_NEW_STATUS OBJECT DOKU ID TX
INCLUDE WF_LIST_OF_WI_STATUS OBJECT DOKU ID TX
INCLUDE WF_FB_RETURN_CODE OBJECT DOKU ID TX
INCLUDE WF_FB_RETURN_CODE_0_1_999 OBJECT DOKU ID TX

Description
Work item identification (numerical value)

Description
The message lines contain two fields:
- MSG_TYPE: Type of message (S: success, E: error, etc.)
- LINE: This contains a textual description of what happened: in theevent of success (RETURN_CODE = 0) a success message, in the event offailure more detailed information about the errors that occurred.

Description
Table with fields Message ID, Message type, Message number and Messagevariables