SAP TR_F4_REQUESTS Function Module for F4 Help for Requests/Tasks
TR_F4_REQUESTS is a standard tr f4 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 F4 Help for Requests/Tasks 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 f4 requests FM, simply by entering the name TR_F4_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_F4_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_F4_REQUESTS'"F4 Help for Requests/Tasks.
EXPORTING
* IV_USERNAME = SY-UNAME "User name
* IV_VIA_SELECTION_SCREEN = 'X' "
* IV_COMPLETE_REQUESTS = 'X' "
* IT_EXCLUDE_REQUESTS = "Table of Request Numbers
* IV_TRKORR_PATTERN = "Generic template for request number
* IV_TRFUNCTIONS = "Request types (string from TRFUNCTIONs)
* IV_TRSTATUS = "Request status (string from TRSTATUSes)
* IV_FROM_DATE = "
* IV_TO_DATE = "
* IV_CLIENT = "Source client
* IV_PROJECT = "
* IV_TITLE = "Text for title line
IMPORTING
EV_SELECTED_REQUEST = "Selected request
ES_SELECTED_REQUEST = "
IMPORTING Parameters details for TR_F4_REQUESTS
IV_USERNAME - User name
Data type: SY-UNAMEDefault: SY-UNAME
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_VIA_SELECTION_SCREEN -
Data type: CDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_COMPLETE_REQUESTS -
Data type: CDefault: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IT_EXCLUDE_REQUESTS - Table of Request Numbers
Data type: TRKORRSOptional: Yes
Call by Reference: Yes
IV_TRKORR_PATTERN - Generic template for request number
Data type: E070-TRKORROptional: Yes
Call by Reference: No ( called with pass by value option)
IV_TRFUNCTIONS - Request types (string from TRFUNCTIONs)
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
IV_TRSTATUS - Request status (string from TRSTATUSes)
Data type: COptional: Yes
Call by Reference: No ( called with pass by value option)
IV_FROM_DATE -
Data type: AS4DATEOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_TO_DATE -
Data type: AS4DATEOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_CLIENT - Source client
Data type: SY-MANDTOptional: Yes
Call by Reference: No ( called with pass by value option)
IV_PROJECT -
Data type: TRKORR_POptional: Yes
Call by Reference: No ( called with pass by value option)
IV_TITLE - Text for title line
Data type: TRWBO_TITLEOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for TR_F4_REQUESTS
EV_SELECTED_REQUEST - Selected request
Data type: E070-TRKORROptional: No
Call by Reference: No ( called with pass by value option)
ES_SELECTED_REQUEST -
Data type: TRWBO_REQUEST_HEADEROptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for TR_F4_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_ev_selected_request | TYPE E070-TRKORR, " | |||
lv_iv_via_selection_screen | TYPE C, " 'X' | |||
lv_iv_complete_requests | TYPE C, " 'X' | |||
lv_it_exclude_requests | TYPE TRKORRS, " | |||
lv_iv_trkorr_pattern | TYPE E070-TRKORR, " | |||
lv_es_selected_request | TYPE TRWBO_REQUEST_HEADER, " | |||
lv_iv_trfunctions | TYPE C, " | |||
lv_iv_trstatus | TYPE C, " | |||
lv_iv_from_date | TYPE AS4DATE, " | |||
lv_iv_to_date | TYPE AS4DATE, " | |||
lv_iv_client | TYPE SY-MANDT, " | |||
lv_iv_project | TYPE TRKORR_P, " | |||
lv_iv_title | TYPE TRWBO_TITLE. " |
  CALL FUNCTION 'TR_F4_REQUESTS' "F4 Help for Requests/Tasks |
EXPORTING | ||
IV_USERNAME | = lv_iv_username | |
IV_VIA_SELECTION_SCREEN | = lv_iv_via_selection_screen | |
IV_COMPLETE_REQUESTS | = lv_iv_complete_requests | |
IT_EXCLUDE_REQUESTS | = lv_it_exclude_requests | |
IV_TRKORR_PATTERN | = lv_iv_trkorr_pattern | |
IV_TRFUNCTIONS | = lv_iv_trfunctions | |
IV_TRSTATUS | = lv_iv_trstatus | |
IV_FROM_DATE | = lv_iv_from_date | |
IV_TO_DATE | = lv_iv_to_date | |
IV_CLIENT | = lv_iv_client | |
IV_PROJECT | = lv_iv_project | |
IV_TITLE | = lv_iv_title | |
IMPORTING | ||
EV_SELECTED_REQUEST | = lv_ev_selected_request | |
ES_SELECTED_REQUEST | = lv_es_selected_request | |
. " TR_F4_REQUESTS |
ABAP code using 7.40 inline data declarations to call FM TR_F4_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. | |||
"SELECT single TRKORR FROM E070 INTO @DATA(ld_ev_selected_request). | ||||
DATA(ld_iv_via_selection_screen) | = 'X'. | |||
DATA(ld_iv_complete_requests) | = 'X'. | |||
"SELECT single TRKORR FROM E070 INTO @DATA(ld_iv_trkorr_pattern). | ||||
"SELECT single MANDT FROM SY INTO @DATA(ld_iv_client). | ||||
Search for further information about these or an SAP related objects