SAP TR_SEARCH_AND_DISPLAY_REQUESTS Function Module for Find (selection screen) and display (hierarchical list) requests
TR_SEARCH_AND_DISPLAY_REQUESTS is a standard tr search and display requests SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Find (selection screen) and display (hierarchical list) requests 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 tr search and display requests FM, simply by entering the name TR_SEARCH_AND_DISPLAY_REQUESTS into the relevant SAP transaction such as SE37 or SE38.
Function Group: STRH
Program Name: SAPLSTRH
Main Program: SAPLSTRH
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TR_SEARCH_AND_DISPLAY_REQUESTS 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 'TR_SEARCH_AND_DISPLAY_REQUESTS'"Find (selection screen) and display (hierarchical list) requests.
EXPORTING
* IV_USERNAME = SY-UNAME "User name (pattern): Owner of the requests
* IS_SELECTION = "
* IV_TITLE = "Title on the selection screen
* IV_F4 = ' ' "'X': Select request; ' ': Normal list display
* IV_VIA_SELSCREEN = 'X' "With or without selection screen
* IV_COMPLETE_REQUESTS = 'X' "
* IV_CUA_STATUS = 'TDR_TOOL' "Not for IV_F4 = 'X'
* IT_SPECIAL_REQUESTS = "
IMPORTING
ES_SELECTED_REQUEST = "IV_F4='X' only: Selected request
ES_SELECTED_TASK = "IV_F4='X' only: Selected task
EXCEPTIONS
ACTION_ABORTED_BY_USER = 1
IMPORTING Parameters details for TR_SEARCH_AND_DISPLAY_REQUESTS
IV_USERNAME - User name (pattern): Owner of the requests
Data type: SY-UNAMEDefault: SY-UNAME
Optional: Yes
Call by Reference: Yes
IS_SELECTION -
Data type: TRWBO_SELECTIONOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_TITLE - Title on the selection screen
Data type: TRWBO_TITLEOptional: Yes
Call by Reference: Yes
IV_F4 - 'X': Select request; ' ': Normal list display
Data type: CDefault: ' '
Optional: Yes
Call by Reference: Yes
IV_VIA_SELSCREEN - With or without selection screen
Data type: CDefault: 'X'
Optional: Yes
Call by Reference: Yes
IV_COMPLETE_REQUESTS -
Data type: CDefault: 'X'
Optional: Yes
Call by Reference: Yes
IV_CUA_STATUS - Not for IV_F4 = 'X'
Data type: STRHI_CUA_STATUSDefault: 'TDR_TOOL'
Optional: Yes
Call by Reference: Yes
IT_SPECIAL_REQUESTS -
Data type: STRHI_SPECIAL_REQUESTSOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for TR_SEARCH_AND_DISPLAY_REQUESTS
ES_SELECTED_REQUEST - IV_F4='X' only: Selected request
Data type: TRWBO_REQUEST_HEADEROptional: No
Call by Reference: No ( called with pass by value option)
ES_SELECTED_TASK - IV_F4='X' only: Selected task
Data type: TRWBO_REQUEST_HEADEROptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
ACTION_ABORTED_BY_USER - User did not want to make a selection
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for TR_SEARCH_AND_DISPLAY_REQUESTS 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_iv_username | TYPE SY-UNAME, " SY-UNAME | |||
| lv_es_selected_request | TYPE TRWBO_REQUEST_HEADER, " | |||
| lv_action_aborted_by_user | TYPE TRWBO_REQUEST_HEADER, " | |||
| lv_is_selection | TYPE TRWBO_SELECTION, " | |||
| lv_es_selected_task | TYPE TRWBO_REQUEST_HEADER, " | |||
| lv_iv_title | TYPE TRWBO_TITLE, " | |||
| lv_iv_f4 | TYPE C, " ' ' | |||
| lv_iv_via_selscreen | TYPE C, " 'X' | |||
| lv_iv_complete_requests | TYPE C, " 'X' | |||
| lv_iv_cua_status | TYPE STRHI_CUA_STATUS, " 'TDR_TOOL' | |||
| lv_it_special_requests | TYPE STRHI_SPECIAL_REQUESTS. " |
|   CALL FUNCTION 'TR_SEARCH_AND_DISPLAY_REQUESTS' "Find (selection screen) and display (hierarchical list) requests |
| EXPORTING | ||
| IV_USERNAME | = lv_iv_username | |
| IS_SELECTION | = lv_is_selection | |
| IV_TITLE | = lv_iv_title | |
| IV_F4 | = lv_iv_f4 | |
| IV_VIA_SELSCREEN | = lv_iv_via_selscreen | |
| IV_COMPLETE_REQUESTS | = lv_iv_complete_requests | |
| IV_CUA_STATUS | = lv_iv_cua_status | |
| IT_SPECIAL_REQUESTS | = lv_it_special_requests | |
| IMPORTING | ||
| ES_SELECTED_REQUEST | = lv_es_selected_request | |
| ES_SELECTED_TASK | = lv_es_selected_task | |
| EXCEPTIONS | ||
| ACTION_ABORTED_BY_USER = 1 | ||
| . " TR_SEARCH_AND_DISPLAY_REQUESTS | ||
ABAP code using 7.40 inline data declarations to call FM TR_SEARCH_AND_DISPLAY_REQUESTS
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 UNAME FROM SY INTO @DATA(ld_iv_username). | ||||
| DATA(ld_iv_username) | = SY-UNAME. | |||
| DATA(ld_iv_f4) | = ' '. | |||
| DATA(ld_iv_via_selscreen) | = 'X'. | |||
| DATA(ld_iv_complete_requests) | = 'X'. | |||
| DATA(ld_iv_cua_status) | = 'TDR_TOOL'. | |||
Search for further information about these or an SAP related objects