SAP Function SAP_WAPI_WORKITEM_DESCRIPTION - Workflow Interfaces: Read Work Item Description

Parameter Reference Type Length Default Optional Text
LANGUAGE SYST-LANGU C 1 SY-LANGU X SAP System, Current Language
LINE_WIDTH SWR_STRUCT-LINE_WIDTH N 3 75 X Line width for text (1 - 132)
USER SYST-UNAME 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, 3, 999)

Parameter Reference Length Optional Text
HTML_TEXT_LINES SWR_TXTLIN 255 X Text Lines as HTML
MESSAGE_LINES SWR_MESSAG 274 X Message Lines
MESSAGE_STRUCT SWR_MSTRUC 224 X Message Structure
STREAM_TEXT_LINES SWR_TXTLIN 255 X Text Lines as Continuous Text
TEXT_LINES SWR_TXTLIN 255 Text lines

Functionality
The description of a work item is determined. The content of thedescription is identical to that in the work item display in BusinessWorkplace. In particular, the container element placeholders arereplaced by the current values in the work item container.
The parameter TEXT_LINES returns the description as single lines witha maximum length LINE_WIDTH.
The parameter HTML_TEXT_LINES returns the description in HTML format.
The parameter STREAM_TEXT_LINES is available in Release 6.40 and higher.It returns the description as continuous text without a fixed lineformat. The line breaks are represented by the character stringCR/LF.
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. The text read is located in the parameterTEXT_LINES.
1,,There is no description. (This is a warning - not every work itemhas a text description.)
2,,The work item cannot be read.
3,,Errors occurred in text processing (formatting, for example).
999,,An unknown error occurred.

Description
The line width determines how many characters have values in each lineof the table parameter TEXT_LINES. The text is formatted in accordancewith this line width.

Value range
1 to 132

Default
75

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

Description
This return table contains the task description of the work item whenthe function module is executed successfully (RETURN_CODE = 0). Anyvariables therein are replaced with the current contents. This text isdisplayed in the work item preview, for example.