SAP Function SAP_WAPI_FORWARD_WORKITEM - Workflow Interfaces: Forward Work Item

Parameter Reference Type Length Default Optional Text
CURRENT_USER SYUNAME C 12 SY-UNAME X Forwarding User
DO_COMMIT XFELD C 1 'X' X Execute Commit
LANGUAGE SYLANGU C 1 SY-LANGU X SAP System, Current Language
USER_ID SYST-UNAME C 12 X User ID
WORKITEM_ID SWR_STRUCT-WORKITEMID N 12 Work Item ID

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 - 2, 999)

Parameter Reference Length Optional Text
MESSAGE_LINES SWR_MESSAG 274 X Message Lines
MESSAGE_STRUCT SWR_MSTRUC 224 X Message Structure
USER_IDS SWRAGENT 14 X User

Functionality
A work item is forwarded.
The parameters RETURN_CODE and MESSAGE_LINES show whether the call wassuccessful. RETURN_CODE has a numeric value, and MESSAGE_LINES gives atextual explanation for finer differentiation.
INCLUDE WF_FB_RETURN_CODE OBJECT DOKU ID TX

Value range
0,,Call succesful. Work item is displayed.
1,,Work item cannot be reserved. (This must occur before forwarding.)
2,,Work item cannot be forwarded.
3,,No agents for forwarding specified during call
900,, System error: method must not be used in the current context
999,,An unknown error occurred.

Description
User ID (as when logging on to R/3)

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.