SAP BAPI_BUS2177_GET_WORKLIST Function Module for BAPI Role: List of Open Roles for a User
BAPI_BUS2177_GET_WORKLIST is a standard bapi bus2177 get 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 BAPI Role: List of Open Roles for a 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 bapi bus2177 get worklist FM, simply by entering the name BAPI_BUS2177_GET_WORKLIST into the relevant SAP transaction such as SE37 or SE38.
Function Group: DPR_BUS2177
Program Name: SAPLDPR_BUS2177
Main Program: SAPLDPR_BUS2177
Appliation area:
Release date: 10-Jan-2005
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function BAPI_BUS2177_GET_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 'BAPI_BUS2177_GET_WORKLIST'"BAPI Role: List of Open Roles for a User.
EXPORTING
* IS_SELECTED_FIELDS = "Display Switch for Fields in Worklist
* IV_ROLE_BEGINDATE = "Calculated Start Date
* IV_ROLE_ENDDATE = "Calculated Finish Date
* IV_WORKLIST_SCOPE = '1' "Mode for Worklist Search for Roles
* IV_STAFFING_CANDIDATE_SWITCH = 'X' "Switch Between 'X' Staffing and ' ' Candidate Management
* IV_MAX_HITS = 0 "Maximum Number of Hits
* IV_ENABLE_DISTRIBUTION = ' ' "' '=All Roles; '1'=Only with Distribution '2'=Only Without Distribution
TABLES
ET_ROLEWORKLIST = "Detailed Attributes of a Project Role
* ET_EXTENSION_OUT = "Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
* RETURN = "Return Parameters
IMPORTING Parameters details for BAPI_BUS2177_GET_WORKLIST
IS_SELECTED_FIELDS - Display Switch for Fields in Worklist
Data type: BAPI_TS_PRP_ROLEWORKLIST_XOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_ROLE_BEGINDATE - Calculated Start Date
Data type: BAPI_TS_PRP_PROJECTROLE_DET-CALCULATED_BEGINOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_ROLE_ENDDATE - Calculated Finish Date
Data type: BAPI_TS_PRP_PROJECTROLE_DET-CALCULATED_ENDOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_WORKLIST_SCOPE - Mode for Worklist Search for Roles
Data type: BAPI_TS_PRP_ROLEWORKLIST_SCOPE-WORKLIST_SCOPEDefault: '1'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_STAFFING_CANDIDATE_SWITCH - Switch Between 'X' Staffing and ' ' Candidate Management
Data type: BAPI_TS_PRP_STAFFING_CANDIDATE-STAFFING_CANDIDATE_SWITCHDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_MAX_HITS - Maximum Number of Hits
Data type: BAPI_MAX_HITS-MAX_HITSOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_ENABLE_DISTRIBUTION - ' '=All Roles; '1'=Only with Distribution '2'=Only Without Distribution
Data type: CHAR1Default: ' '
Optional: Yes
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for BAPI_BUS2177_GET_WORKLIST
ET_ROLEWORKLIST - Detailed Attributes of a Project Role
Data type: BAPI_TS_PRP_ROLEWORKLISTOptional: No
Call by Reference: Yes
ET_EXTENSION_OUT - Reference Structure for BAPI Parameters EXTENSIONIN/EXTENSIONOUT
Data type: BAPIPAREXOptional: Yes
Call by Reference: Yes
RETURN - Return Parameters
Data type: BAPIRET2Optional: Yes
Call by Reference: Yes
Copy and paste ABAP code example for BAPI_BUS2177_GET_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: | ||||
| lt_et_roleworklist | TYPE STANDARD TABLE OF BAPI_TS_PRP_ROLEWORKLIST, " | |||
| lv_is_selected_fields | TYPE BAPI_TS_PRP_ROLEWORKLIST_X, " | |||
| lt_et_extension_out | TYPE STANDARD TABLE OF BAPIPAREX, " | |||
| lv_iv_role_begindate | TYPE BAPI_TS_PRP_PROJECTROLE_DET-CALCULATED_BEGIN, " | |||
| lt_return | TYPE STANDARD TABLE OF BAPIRET2, " | |||
| lv_iv_role_enddate | TYPE BAPI_TS_PRP_PROJECTROLE_DET-CALCULATED_END, " | |||
| lv_iv_worklist_scope | TYPE BAPI_TS_PRP_ROLEWORKLIST_SCOPE-WORKLIST_SCOPE, " '1' | |||
| lv_iv_staffing_candidate_switch | TYPE BAPI_TS_PRP_STAFFING_CANDIDATE-STAFFING_CANDIDATE_SWITCH, " 'X' | |||
| lv_iv_max_hits | TYPE BAPI_MAX_HITS-MAX_HITS, " 0 | |||
| lv_iv_enable_distribution | TYPE CHAR1. " ' ' |
|   CALL FUNCTION 'BAPI_BUS2177_GET_WORKLIST' "BAPI Role: List of Open Roles for a User |
| EXPORTING | ||
| IS_SELECTED_FIELDS | = lv_is_selected_fields | |
| IV_ROLE_BEGINDATE | = lv_iv_role_begindate | |
| IV_ROLE_ENDDATE | = lv_iv_role_enddate | |
| IV_WORKLIST_SCOPE | = lv_iv_worklist_scope | |
| IV_STAFFING_CANDIDATE_SWITCH | = lv_iv_staffing_candidate_switch | |
| IV_MAX_HITS | = lv_iv_max_hits | |
| IV_ENABLE_DISTRIBUTION | = lv_iv_enable_distribution | |
| TABLES | ||
| ET_ROLEWORKLIST | = lt_et_roleworklist | |
| ET_EXTENSION_OUT | = lt_et_extension_out | |
| RETURN | = lt_return | |
| . " BAPI_BUS2177_GET_WORKLIST | ||
ABAP code using 7.40 inline data declarations to call FM BAPI_BUS2177_GET_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.| "SELECT single CALCULATED_BEGIN FROM BAPI_TS_PRP_PROJECTROLE_DET INTO @DATA(ld_iv_role_begindate). | ||||
| "SELECT single CALCULATED_END FROM BAPI_TS_PRP_PROJECTROLE_DET INTO @DATA(ld_iv_role_enddate). | ||||
| "SELECT single WORKLIST_SCOPE FROM BAPI_TS_PRP_ROLEWORKLIST_SCOPE INTO @DATA(ld_iv_worklist_scope). | ||||
| DATA(ld_iv_worklist_scope) | = '1'. | |||
| "SELECT single STAFFING_CANDIDATE_SWITCH FROM BAPI_TS_PRP_STAFFING_CANDIDATE INTO @DATA(ld_iv_staffing_candidate_switch). | ||||
| DATA(ld_iv_staffing_candidate_switch) | = 'X'. | |||
| "SELECT single MAX_HITS FROM BAPI_MAX_HITS INTO @DATA(ld_iv_max_hits). | ||||
| DATA(ld_iv_enable_distribution) | = ' '. | |||
Search for further information about these or an SAP related objects