SAP Function SAP_WAPI_WRITE_CONTAINER - Workflow Interfaces: Write Container

Parameter Reference Type Length Default Optional Text
ACTUAL_AGENT SYUNAME C 12 SY-UNAME X ABAP System, User Logon Name
DO_COMMIT XFELD C 1 'X' X Checkbox
IFS_XML_CONTAINER XSTRING y 0 X Workflow Container as XML Data Stream
LANGUAGE SYLANGU C 1 SY-LANGU X SAP System, Current Language
OVERWRITE_TABLES_SIMPLE_CONT XFELD C 1 SPACE X Checkbox
WORKITEM_ID SWR_STRUCT-WORKITEMID N 12 Work item ID

Parameter Reference Type Length Text
RETURN_CODE SYST-SUBRC I 4 Return Value (0 - 2)

Parameter Reference Length Optional Text
MESSAGE_LINES SWR_MESSAG 274 X Message Lines
MESSAGE_STRUCT SWR_MSTRUC 224 X Message Structure
SIMPLE_CONTAINER SWR_CONT 287 X Single Container (Name-Value-Pair)

Functionality
This function module writes the container of a work item.
INCLUDE WF_FB_RETURN_CODE OBJECT DOKU ID TX

Value range
0,,Call successful. Work item created.
1,,The work item or its container cannot be read for the work item IDspecified.
2,,The container data passed has errors (for example an element that isnot defined).
900,, System error: method must not be used in the current context

Description
Unlike INPUT_CONTAINER, in this case the data is transferred as XML.This representation enables complex data to be transferred. The XML mustcomply with the workflow interface format.
To get the schema, use the function SAP_WAPI_GET_TASK_CNT_SCHEMA.
The method IF_SWF_IFS_CONVERSION=> TO_IFS_XML generates the XML datastream from a parameter container.

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, and in the eventof failure more information about the errors that occurred.

Description
Table with fields message-ID, -type, -number and -variables

Description
Container element values in simplified form
A container element is represented by a NAME - VALUE pair (single-lineelement) or several NAME - VALUE pairs (multiline element). Note thatthis is not the "usual" container structure.