SAP Function SAP_WAPI_START_WORKFLOW - Workflow interfaces: Start workflow

Parameter Reference Type Length Default Optional Text
DESIRED_START_DATE SWR_DATEIN D 8 X WAPI: Date in internal format (YYYYMMDD)
DESIRED_START_TIME SWR_TIMEIN T 6 X WAPI: Time in internal format (hhmmss)
DESIRED_START_ZONLO SYSTZONLO C 6 SY-ZONLO X Date and time, time zone of user
DO_COMMIT XFLAG C 1 'X' X Execute Commit
IFS_XML_CONTAINER XSTRING y 0 X Workflow Container as XML Data Stream
LANGUAGE SWR_STRUCT-WILANGUAGE C 1 SY-LANGU X Language
START_ASYNCHRONOUS XFLAG C 1 SPACE X Start Workflow Asynchronously
TASK SWR_STRUCT-TASK C 14 Task (According to PD org.)
USER SYUNAME C 12 SY-UNAME X ABAP System, User Logon Name

Parameter Reference Type Length Text
NEW_STATUS SWR_WISTAT u 32 Workflow Interfaces: Work Item Status
RETURN_CODE SYST-SUBRC I 4 Return code (0 - 6, 999)
WORKITEM_ID SWR_STRUCT-WORKITEMID N 12 Work Item ID

Parameter Reference Length Optional Text
AGENTS SWRAGENT 14 X Agent for Task
INPUT_CONTAINER SWR_CONT 287 X Input container (name-value pairs)
MESSAGE_LINES SWR_MESSAG 274 X Message Lines
MESSAGE_STRUCT SWR_MSTRUC 224 X Message Structure

Functionality
A workflow is started for a task.
The parameter TASK specifies which task is to be started.
The event parameters are specified using the parameter INPUT_CONTAINER.A single-line event parameter is specified as a line in the parameterINPUT_CONTAINER, and a multiline event parameter as several consecutivelines. Every line is a NAME - VALUE pair.
The parameter LANGUAGE specifies the language in which the workflow isto be started.
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.
In the event of success, the parameter WORKITEM_ID is assigned the workitem number of the work item created.
INCLUDE WF_FB_RETURN_CODE OBJECT DOKU ID TX

Value range
0,,Call successful. A work item was created.
1,,The parameter TASK has an invalid value.
2,,The value assignment for the input data (table parameterCONTAINER) has errors.
3,,The task definition has errors.
4,,The start failed.
5,,Data could not be read.
6,,User not allowed to start task.
999,,An unknown error occurred.

Description
This export parameter contains the work item ID (max 12 digit number)of the work item created.

Description
Execute commit work (recommended). Only deactivate in special cases!

Description
The work item is created in this language. With work items thatrepresent workflows, the work items for the individual steps are alsocreated in this language.

Value range
The possible logon languages.

Default
The logon language of the calling user.

Description
Task key according to PD ORG, for example WS00000038, TS00007986

Description
This parameter is to be assigned the values of the input data. An itemof input data is represented by a NAME - VALUE pair (single-lineparameter) or several NAME - VALUE pairs (multiline parameter).

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, -type, -number and -variable