SAP SAP_WAPI_CREATE_WORKLIST Function Module for Workflow Interfaces: Set Up Worklist for User









SAP_WAPI_CREATE_WORKLIST is a standard sap wapi create worklist SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Workflow Interfaces: Set Up Worklist for User processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for sap wapi create worklist FM, simply by entering the name SAP_WAPI_CREATE_WORKLIST into the relevant SAP transaction such as SE37 or SE38.

Function Group: SWRW
Program Name: SAPLSWRW
Main Program: SAPLSWRW
Appliation area: S
Release date: 13-Jan-2009
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function SAP_WAPI_CREATE_WORKLIST pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'SAP_WAPI_CREATE_WORKLIST'"Workflow Interfaces: Set Up Worklist for User
EXPORTING
* USER = SY-UNAME "ABAP System, User Logon Name
* IM_WITEXT_FILTER = "Filter for Work Item Texts
* IM_WILED_FILTER = "Filter for Duration (in UTC)
* IM_WIPRIO_FILTER = "Filter for Priority
* IM_WICREA_FILTER = "Filter for Creation Time
* LANGUAGE = SY-LANGU "SAP System, Current Language
* TRANSLATE_WI_TEXT = ' ' "Translate Work Item Text to Parameter Text?
* READ_TASK_TEXT = ' ' "Read Task Text for Work Item?
* IM_TASK_FILTER = "Task Filter
* IM_STATUS_FILTER = "Status Filter
* PASSIVE_SUBSTITUTION = ' ' "Include Passive Substitution
* READ_LATEST_END = ' ' "Read data for DEADLINE
* TIME_ZONE = "Time Zone of Current User

IMPORTING
RETURN_CODE = "Return code (0,999)
WORKITEMS_TRANSLATED = "Index of Internal Tables

TABLES
WORKLIST = "Workflow inbox
* WORKLIST_ATTRIBUTES = "WAPI: Additional Attributes of a Work Item
* MESSAGE_LINES = "Message Lines
* MESSAGE_STRUCT = "Message Structure
* TASK_FILTER = "Task Filter
* STATUS_FILTER = "Status Filter
.



IMPORTING Parameters details for SAP_WAPI_CREATE_WORKLIST

USER - ABAP System, User Logon Name

Data type: SYUNAME
Default: SY-UNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)

IM_WITEXT_FILTER - Filter for Work Item Texts

Data type: SWRTRWITEXT
Optional: Yes
Call by Reference: No ( called with pass by value option)

IM_WILED_FILTER - Filter for Duration (in UTC)

Data type: SWRTRWILED
Optional: Yes
Call by Reference: No ( called with pass by value option)

IM_WIPRIO_FILTER - Filter for Priority

Data type: SWRTRWIPRIO
Optional: Yes
Call by Reference: No ( called with pass by value option)

IM_WICREA_FILTER - Filter for Creation Time

Data type: SWRTRCREATMP
Optional: Yes
Call by Reference: No ( called with pass by value option)

LANGUAGE - SAP System, Current Language

Data type: SYLANGU
Default: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)

TRANSLATE_WI_TEXT - Translate Work Item Text to Parameter Text?

Data type: XFELD
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

READ_TASK_TEXT - Read Task Text for Work Item?

Data type: XFELD
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

IM_TASK_FILTER - Task Filter

Data type: SWRTTASK
Optional: Yes
Call by Reference: No ( called with pass by value option)

IM_STATUS_FILTER - Status Filter

Data type: SWRTSTATUS
Optional: Yes
Call by Reference: No ( called with pass by value option)

PASSIVE_SUBSTITUTION - Include Passive Substitution

Data type: XFELD
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

READ_LATEST_END - Read data for DEADLINE

Data type: XFELD
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

TIME_ZONE - Time Zone of Current User

Data type: SYSTZONLO
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for SAP_WAPI_CREATE_WORKLIST

RETURN_CODE - Return code (0,999)

Data type: SY-SUBRC
Optional: No
Call by Reference: No ( called with pass by value option)

WORKITEMS_TRANSLATED - Index of Internal Tables

Data type: SYTABIX
Optional: No
Call by Reference: No ( called with pass by value option)

TABLES Parameters details for SAP_WAPI_CREATE_WORKLIST

WORKLIST - Workflow inbox

Data type: SWR_WIHDR
Optional: No
Call by Reference: No ( called with pass by value option)

WORKLIST_ATTRIBUTES - WAPI: Additional Attributes of a Work Item

Data type: SWR_WIADDATTR
Optional: Yes
Call by Reference: Yes

MESSAGE_LINES - Message Lines

Data type: SWR_MESSAG
Optional: Yes
Call by Reference: No ( called with pass by value option)

MESSAGE_STRUCT - Message Structure

Data type: SWR_MSTRUC
Optional: Yes
Call by Reference: No ( called with pass by value option)

TASK_FILTER - Task Filter

Data type: SWRTTASK
Optional: Yes
Call by Reference: Yes

STATUS_FILTER - Status Filter

Data type: SWRTSTATUS
Optional: Yes
Call by Reference: Yes

Copy and paste ABAP code example for SAP_WAPI_CREATE_WORKLIST Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_user  TYPE SYUNAME, "   SY-UNAME
lt_worklist  TYPE STANDARD TABLE OF SWR_WIHDR, "   
lv_return_code  TYPE SY-SUBRC, "   
lv_im_witext_filter  TYPE SWRTRWITEXT, "   
lv_im_wiled_filter  TYPE SWRTRWILED, "   
lv_im_wiprio_filter  TYPE SWRTRWIPRIO, "   
lv_im_wicrea_filter  TYPE SWRTRCREATMP, "   
lv_language  TYPE SYLANGU, "   SY-LANGU
lt_worklist_attributes  TYPE STANDARD TABLE OF SWR_WIADDATTR, "   
lv_workitems_translated  TYPE SYTABIX, "   
lt_message_lines  TYPE STANDARD TABLE OF SWR_MESSAG, "   
lv_translate_wi_text  TYPE XFELD, "   SPACE
lt_message_struct  TYPE STANDARD TABLE OF SWR_MSTRUC, "   
lv_read_task_text  TYPE XFELD, "   SPACE
lt_task_filter  TYPE STANDARD TABLE OF SWRTTASK, "   
lv_im_task_filter  TYPE SWRTTASK, "   
lt_status_filter  TYPE STANDARD TABLE OF SWRTSTATUS, "   
lv_im_status_filter  TYPE SWRTSTATUS, "   
lv_passive_substitution  TYPE XFELD, "   SPACE
lv_read_latest_end  TYPE XFELD, "   SPACE
lv_time_zone  TYPE SYSTZONLO. "   

  CALL FUNCTION 'SAP_WAPI_CREATE_WORKLIST'  "Workflow Interfaces: Set Up Worklist for User
    EXPORTING
         USER = lv_user
         IM_WITEXT_FILTER = lv_im_witext_filter
         IM_WILED_FILTER = lv_im_wiled_filter
         IM_WIPRIO_FILTER = lv_im_wiprio_filter
         IM_WICREA_FILTER = lv_im_wicrea_filter
         LANGUAGE = lv_language
         TRANSLATE_WI_TEXT = lv_translate_wi_text
         READ_TASK_TEXT = lv_read_task_text
         IM_TASK_FILTER = lv_im_task_filter
         IM_STATUS_FILTER = lv_im_status_filter
         PASSIVE_SUBSTITUTION = lv_passive_substitution
         READ_LATEST_END = lv_read_latest_end
         TIME_ZONE = lv_time_zone
    IMPORTING
         RETURN_CODE = lv_return_code
         WORKITEMS_TRANSLATED = lv_workitems_translated
    TABLES
         WORKLIST = lt_worklist
         WORKLIST_ATTRIBUTES = lt_worklist_attributes
         MESSAGE_LINES = lt_message_lines
         MESSAGE_STRUCT = lt_message_struct
         TASK_FILTER = lt_task_filter
         STATUS_FILTER = lt_status_filter
. " SAP_WAPI_CREATE_WORKLIST




ABAP code using 7.40 inline data declarations to call FM SAP_WAPI_CREATE_WORKLIST

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

DATA(ld_user) = SY-UNAME.
 
 
"SELECT single SUBRC FROM SY INTO @DATA(ld_return_code).
 
 
 
 
 
DATA(ld_language) = SY-LANGU.
 
 
 
 
DATA(ld_translate_wi_text) = ' '.
 
 
DATA(ld_read_task_text) = ' '.
 
 
 
 
 
DATA(ld_passive_substitution) = ' '.
 
DATA(ld_read_latest_end) = ' '.
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!