SAP RH_TASK_AGENTS_SHOW Function Module for
RH_TASK_AGENTS_SHOW is a standard rh task agents show SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 agents show FM, simply by entering the name RH_TASK_AGENTS_SHOW into the relevant SAP transaction such as SE37 or SE38.
Function Group: RHWH
Program Name: SAPLRHWH
Main Program: SAPLRHWH
Appliation area: H
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:

Function RH_TASK_AGENTS_SHOW 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_AGENTS_SHOW'".
EXPORTING
TASK_OTYPE = "Task type
* SHOW_EXCLUDED_AGENTS = "
* MULTIPLE_CALL = "
* SHOW_ALL_POSSIBLE_AGENTS = "
* SHOW_ALL_EX_AGENTS = "
* NO_DISPLAY = ' ' "
TASK_OBJID = "Task ID
* ACT_PLVAR = "Current plan version; default ' ' -> active pl.ver
* SEARCH_DATE = SY-DATUM "Search date
* EXTENDED_LIST = "Type of output: ' ' users only; 'X' all
* SELECT_AGENT = "Selection (' ' no, 'X' yes)
* ACT_TITLE = "Title
* ACT_WI_ID = "Work item ID
* SHOW_GIVEN_AGENTS = "Agents
IMPORTING
SELECTED_PLVAR = "Agent chosen: plan version
SELECTED_OTYPE = " Object type
SELECTED_OBJID = " Object ID
EXIT_FCODE = "
ET_AGENT = "
TABLES
* GIVEN_AGENTS = "Specified agents (optional)
* EXCLUDED_AGENTS = "
EXCEPTIONS
NO_ACTIVE_PLVAR = 1 BACKGROUND_TASK = 2 GENERAL_TASK = 3 NO_TASK_OTYPE = 4 NO_AGENTS_OF_TASK_FOUND = 5 NO_OBJECT_SELECTED = 6 GIVEN_LIST_EMPTY = 7
IMPORTING Parameters details for RH_TASK_AGENTS_SHOW
TASK_OTYPE - Task type
Data type: OBJEC-OTYPEOptional: No
Call by Reference: No ( called with pass by value option)
SHOW_EXCLUDED_AGENTS -
Data type: HRPP0C-TESTOptional: Yes
Call by Reference: No ( called with pass by value option)
MULTIPLE_CALL -
Data type: HRPP0C-TESTOptional: Yes
Call by Reference: No ( called with pass by value option)
SHOW_ALL_POSSIBLE_AGENTS -
Data type: HRPP0C-TESTOptional: Yes
Call by Reference: No ( called with pass by value option)
SHOW_ALL_EX_AGENTS -
Data type: HRPP0C-TESTOptional: Yes
Call by Reference: No ( called with pass by value option)
NO_DISPLAY -
Data type: FLAGDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
TASK_OBJID - Task ID
Data type: OBJEC-OBJIDOptional: No
Call by Reference: No ( called with pass by value option)
ACT_PLVAR - Current plan version; default ' ' -> active pl.ver
Data type: OBJEC-PLVAROptional: Yes
Call by Reference: No ( called with pass by value option)
SEARCH_DATE - Search date
Data type: SY-DATUMDefault: SY-DATUM
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXTENDED_LIST - Type of output: ' ' users only; 'X' all
Data type: HRPP0C-TESTOptional: Yes
Call by Reference: No ( called with pass by value option)
SELECT_AGENT - Selection (' ' no, 'X' yes)
Data type: HRPP0C-TESTOptional: Yes
Call by Reference: No ( called with pass by value option)
ACT_TITLE - Title
Data type: T77MT-MTEXTOptional: Yes
Call by Reference: No ( called with pass by value option)
ACT_WI_ID - Work item ID
Data type: SWWWIHEAD-WI_IDOptional: Yes
Call by Reference: No ( called with pass by value option)
SHOW_GIVEN_AGENTS - Agents
Data type: HRPP0C-TESTOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for RH_TASK_AGENTS_SHOW
SELECTED_PLVAR - Agent chosen: plan version
Data type: OBJEC-PLVAROptional: No
Call by Reference: No ( called with pass by value option)
SELECTED_OTYPE - Object type
Data type: OBJEC-OTYPEOptional: No
Call by Reference: No ( called with pass by value option)
SELECTED_OBJID - Object ID
Data type: OBJEC-REALOOptional: No
Call by Reference: No ( called with pass by value option)
EXIT_FCODE -
Data type: T77FC-FCODEOptional: No
Call by Reference: No ( called with pass by value option)
ET_AGENT -
Data type: SWRTAGENTOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for RH_TASK_AGENTS_SHOW
GIVEN_AGENTS - Specified agents (optional)
Data type: SWHACTOROptional: Yes
Call by Reference: No ( called with pass by value option)
EXCLUDED_AGENTS -
Data type: SWHACTOROptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NO_ACTIVE_PLVAR -
Data type:Optional: No
Call by Reference: Yes
BACKGROUND_TASK - Background task
Data type:Optional: No
Call by Reference: Yes
GENERAL_TASK - General task
Data type:Optional: No
Call by Reference: Yes
NO_TASK_OTYPE -
Data type:Optional: No
Call by Reference: Yes
NO_AGENTS_OF_TASK_FOUND -
Data type:Optional: No
Call by Reference: Yes
NO_OBJECT_SELECTED -
Data type:Optional: No
Call by Reference: Yes
GIVEN_LIST_EMPTY -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for RH_TASK_AGENTS_SHOW 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_task_otype | TYPE OBJEC-OTYPE, " | |||
| lt_given_agents | TYPE STANDARD TABLE OF SWHACTOR, " | |||
| lv_selected_plvar | TYPE OBJEC-PLVAR, " | |||
| lv_no_active_plvar | TYPE OBJEC, " | |||
| lv_show_excluded_agents | TYPE HRPP0C-TEST, " | |||
| lv_multiple_call | TYPE HRPP0C-TEST, " | |||
| lv_show_all_possible_agents | TYPE HRPP0C-TEST, " | |||
| lv_show_all_ex_agents | TYPE HRPP0C-TEST, " | |||
| lv_no_display | TYPE FLAG, " SPACE | |||
| lv_task_objid | TYPE OBJEC-OBJID, " | |||
| lv_selected_otype | TYPE OBJEC-OTYPE, " | |||
| lv_background_task | TYPE OBJEC, " | |||
| lt_excluded_agents | TYPE STANDARD TABLE OF SWHACTOR, " | |||
| lv_act_plvar | TYPE OBJEC-PLVAR, " | |||
| lv_general_task | TYPE OBJEC, " | |||
| lv_selected_objid | TYPE OBJEC-REALO, " | |||
| lv_exit_fcode | TYPE T77FC-FCODE, " | |||
| lv_search_date | TYPE SY-DATUM, " SY-DATUM | |||
| lv_no_task_otype | TYPE SY, " | |||
| lv_et_agent | TYPE SWRTAGENT, " | |||
| lv_extended_list | TYPE HRPP0C-TEST, " | |||
| lv_no_agents_of_task_found | TYPE HRPP0C, " | |||
| lv_select_agent | TYPE HRPP0C-TEST, " | |||
| lv_no_object_selected | TYPE HRPP0C, " | |||
| lv_act_title | TYPE T77MT-MTEXT, " | |||
| lv_given_list_empty | TYPE T77MT, " | |||
| lv_act_wi_id | TYPE SWWWIHEAD-WI_ID, " | |||
| lv_show_given_agents | TYPE HRPP0C-TEST. " |
|   CALL FUNCTION 'RH_TASK_AGENTS_SHOW' " |
| EXPORTING | ||
| TASK_OTYPE | = lv_task_otype | |
| SHOW_EXCLUDED_AGENTS | = lv_show_excluded_agents | |
| MULTIPLE_CALL | = lv_multiple_call | |
| SHOW_ALL_POSSIBLE_AGENTS | = lv_show_all_possible_agents | |
| SHOW_ALL_EX_AGENTS | = lv_show_all_ex_agents | |
| NO_DISPLAY | = lv_no_display | |
| TASK_OBJID | = lv_task_objid | |
| ACT_PLVAR | = lv_act_plvar | |
| SEARCH_DATE | = lv_search_date | |
| EXTENDED_LIST | = lv_extended_list | |
| SELECT_AGENT | = lv_select_agent | |
| ACT_TITLE | = lv_act_title | |
| ACT_WI_ID | = lv_act_wi_id | |
| SHOW_GIVEN_AGENTS | = lv_show_given_agents | |
| IMPORTING | ||
| SELECTED_PLVAR | = lv_selected_plvar | |
| SELECTED_OTYPE | = lv_selected_otype | |
| SELECTED_OBJID | = lv_selected_objid | |
| EXIT_FCODE | = lv_exit_fcode | |
| ET_AGENT | = lv_et_agent | |
| TABLES | ||
| GIVEN_AGENTS | = lt_given_agents | |
| EXCLUDED_AGENTS | = lt_excluded_agents | |
| EXCEPTIONS | ||
| NO_ACTIVE_PLVAR = 1 | ||
| BACKGROUND_TASK = 2 | ||
| GENERAL_TASK = 3 | ||
| NO_TASK_OTYPE = 4 | ||
| NO_AGENTS_OF_TASK_FOUND = 5 | ||
| NO_OBJECT_SELECTED = 6 | ||
| GIVEN_LIST_EMPTY = 7 | ||
| . " RH_TASK_AGENTS_SHOW | ||
ABAP code using 7.40 inline data declarations to call FM RH_TASK_AGENTS_SHOW
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 OTYPE FROM OBJEC INTO @DATA(ld_task_otype). | ||||
| "SELECT single PLVAR FROM OBJEC INTO @DATA(ld_selected_plvar). | ||||
| "SELECT single TEST FROM HRPP0C INTO @DATA(ld_show_excluded_agents). | ||||
| "SELECT single TEST FROM HRPP0C INTO @DATA(ld_multiple_call). | ||||
| "SELECT single TEST FROM HRPP0C INTO @DATA(ld_show_all_possible_agents). | ||||
| "SELECT single TEST FROM HRPP0C INTO @DATA(ld_show_all_ex_agents). | ||||
| DATA(ld_no_display) | = ' '. | |||
| "SELECT single OBJID FROM OBJEC INTO @DATA(ld_task_objid). | ||||
| "SELECT single OTYPE FROM OBJEC INTO @DATA(ld_selected_otype). | ||||
| "SELECT single PLVAR FROM OBJEC INTO @DATA(ld_act_plvar). | ||||
| "SELECT single REALO FROM OBJEC INTO @DATA(ld_selected_objid). | ||||
| "SELECT single FCODE FROM T77FC INTO @DATA(ld_exit_fcode). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_search_date). | ||||
| DATA(ld_search_date) | = SY-DATUM. | |||
| "SELECT single TEST FROM HRPP0C INTO @DATA(ld_extended_list). | ||||
| "SELECT single TEST FROM HRPP0C INTO @DATA(ld_select_agent). | ||||
| "SELECT single MTEXT FROM T77MT INTO @DATA(ld_act_title). | ||||
| "SELECT single WI_ID FROM SWWWIHEAD INTO @DATA(ld_act_wi_id). | ||||
| "SELECT single TEST FROM HRPP0C INTO @DATA(ld_show_given_agents). | ||||
Search for further information about these or an SAP related objects