SAP Function SAP_WAPI_GET_ATTACHMENTS - Workflow Interfaces: Read Attachment for Work Item

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

Parameter Reference Type Length Text
RETURN_CODE SYST-SUBRC I 4 Return Code (0, 1, 2, 999)

Parameter Reference Length Optional Text
ATTACHMENTS SWR_OBJECT 242 X Attachments (Persistent Object References)
MESSAGE_LINES SWR_MESSAG 274 X Message Lines
MESSAGE_STRUCT SWR_MSTRUC 224 X Message Structure

Functionality
Reading a work item's attachments. The attachments are returned aspersistent object references and can be displayed using the BOR runtimesystem.
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 successful. Attachments are returned in table parameterATTACHMENTS.
1,,There are no attachments for the specified work item.
2,,The work item cannot be read.
999,,An unknown error occurred.

Description
Work item identification (numerical value)

Description
Work item attachment in the form of the corresponding persistent objectreferences

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