SAP RH_TASK_DEF_ROLE_BINDING_GET Function Module for Read Default Agent and Binding Definition of Task Specified
RH_TASK_DEF_ROLE_BINDING_GET is a standard rh task def role binding get SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Read Default Agent and Binding Definition of Task Specified 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 rh task def role binding get FM, simply by entering the name RH_TASK_DEF_ROLE_BINDING_GET into the relevant SAP transaction such as SE37 or SE38.
Function Group: RHWB
Program Name: SAPLRHWB
Main Program: SAPLRHWB
Appliation area: H
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function RH_TASK_DEF_ROLE_BINDING_GET 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 'RH_TASK_DEF_ROLE_BINDING_GET'"Read Default Agent and Binding Definition of Task Specified.
EXPORTING
ACT_TASK = "Role object (type and ID)
* ACT_PLVAR = ' ' "Plan version
* SEARCH_DATE = SY-DATUM "Date for role resolution
IMPORTING
ACT_DEF_ROLE = "
TABLES
* DEF_ROLE_BIND_DEF = "Workflow Binding: Definition Structure
* BINDING = "Binding Definition, DB Interface
EXCEPTIONS
NO_ACTIVE_PLVAR = 1 NO_ROLE_DEFINED = 2
IMPORTING Parameters details for RH_TASK_DEF_ROLE_BINDING_GET
ACT_TASK - Role object (type and ID)
Data type: RHOBJECTS-OBJECTOptional: No
Call by Reference: No ( called with pass by value option)
ACT_PLVAR - Plan version
Data type: PLOG-PLVARDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
SEARCH_DATE - Date for role resolution
Data type: SY-DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RH_TASK_DEF_ROLE_BINDING_GET
ACT_DEF_ROLE -
Data type: RHOBJECTS-OBJECTOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for RH_TASK_DEF_ROLE_BINDING_GET
DEF_ROLE_BIND_DEF - Workflow Binding: Definition Structure
Data type: SWABINDEFOptional: Yes
Call by Reference: Yes
BINDING - Binding Definition, DB Interface
Data type: SWFBINDDBOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
NO_ACTIVE_PLVAR - No active plan version found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NO_ROLE_DEFINED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for RH_TASK_DEF_ROLE_BINDING_GET 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_act_task | TYPE RHOBJECTS-OBJECT, " | |||
| lv_act_def_role | TYPE RHOBJECTS-OBJECT, " | |||
| lv_no_active_plvar | TYPE RHOBJECTS, " | |||
| lt_def_role_bind_def | TYPE STANDARD TABLE OF SWABINDEF, " | |||
| lt_binding | TYPE STANDARD TABLE OF SWFBINDDB, " | |||
| lv_act_plvar | TYPE PLOG-PLVAR, " SPACE | |||
| lv_no_role_defined | TYPE PLOG, " | |||
| lv_search_date | TYPE SY-DATUM. " SY-DATUM |
|   CALL FUNCTION 'RH_TASK_DEF_ROLE_BINDING_GET' "Read Default Agent and Binding Definition of Task Specified |
| EXPORTING | ||
| ACT_TASK | = lv_act_task | |
| ACT_PLVAR | = lv_act_plvar | |
| SEARCH_DATE | = lv_search_date | |
| IMPORTING | ||
| ACT_DEF_ROLE | = lv_act_def_role | |
| TABLES | ||
| DEF_ROLE_BIND_DEF | = lt_def_role_bind_def | |
| BINDING | = lt_binding | |
| EXCEPTIONS | ||
| NO_ACTIVE_PLVAR = 1 | ||
| NO_ROLE_DEFINED = 2 | ||
| . " RH_TASK_DEF_ROLE_BINDING_GET | ||
ABAP code using 7.40 inline data declarations to call FM RH_TASK_DEF_ROLE_BINDING_GET
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 OBJECT FROM RHOBJECTS INTO @DATA(ld_act_task). | ||||
| "SELECT single OBJECT FROM RHOBJECTS INTO @DATA(ld_act_def_role). | ||||
| "SELECT single PLVAR FROM PLOG INTO @DATA(ld_act_plvar). | ||||
| DATA(ld_act_plvar) | = ' '. | |||
| "SELECT single DATUM FROM SY INTO @DATA(ld_search_date). | ||||
| DATA(ld_search_date) | = SY-DATUM. | |||
Search for further information about these or an SAP related objects