SAP TR_GTADIR_QUERY Function Module for
TR_GTADIR_QUERY is a standard tr gtadir query 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 tr gtadir query FM, simply by entering the name TR_GTADIR_QUERY into the relevant SAP transaction such as SE37 or SE38.
Function Group: SG01
Program Name: SAPLSG01
Main Program:
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TR_GTADIR_QUERY 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_GTADIR_QUERY'".
EXPORTING
* TAB_IN = '~' "object to be included
* IV_PGMID = '~' "
* IV_OBJECT = '~' "
* IV_OBJ_NAME = '~' "
IMPORTING
ACTION = "
ERROR = "
RESULT = "
STATUS = "
EXCEPTIONS
COMMUNICATION_FAILURE = 1 UNSUPPORTED_EXCEPTION = 10 UNSUPPORTED_METHOD = 11 SYSTEM_FAILURE = 2 TR_DENY_CREATE = 3 TR_DISTRIBUTED = 4 TR_INVALID_STATE = 5 TR_INVALID_TRANSITION = 6 TR_NO_ENTRY = 7 TR_OBJECT_EXISTS = 8 TR_DENY_ACCESS = 9
IMPORTING Parameters details for TR_GTADIR_QUERY
TAB_IN - object to be included
Data type: GTADIRDefault: '~'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_PGMID -
Data type: TADIR-PGMIDDefault: '~'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_OBJECT -
Data type: TADIR-OBJECTDefault: '~'
Optional: Yes
Call by Reference: No ( called with pass by value option)
IV_OBJ_NAME -
Data type: TADIR-OBJ_NAMEDefault: '~'
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for TR_GTADIR_QUERY
ACTION -
Data type: SDIT_PARAM-ACTIONOptional: No
Call by Reference: No ( called with pass by value option)
ERROR -
Data type: SDIT_PARAM-ERROROptional: No
Call by Reference: No ( called with pass by value option)
RESULT -
Data type: GTADIROptional: No
Call by Reference: No ( called with pass by value option)
STATUS -
Data type: SDIT_PARAM-STATUSOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
COMMUNICATION_FAILURE - Communication error
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
UNSUPPORTED_EXCEPTION -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
UNSUPPORTED_METHOD -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SYSTEM_FAILURE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TR_DENY_CREATE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TR_DISTRIBUTED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TR_INVALID_STATE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TR_INVALID_TRANSITION -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TR_NO_ENTRY -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TR_OBJECT_EXISTS -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
TR_DENY_ACCESS -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for TR_GTADIR_QUERY 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_action | TYPE SDIT_PARAM-ACTION, " | |||
| lv_tab_in | TYPE GTADIR, " '~' | |||
| lv_communication_failure | TYPE GTADIR, " | |||
| lv_unsupported_exception | TYPE GTADIR, " | |||
| lv_unsupported_method | TYPE GTADIR, " | |||
| lv_error | TYPE SDIT_PARAM-ERROR, " | |||
| lv_iv_pgmid | TYPE TADIR-PGMID, " '~' | |||
| lv_system_failure | TYPE TADIR, " | |||
| lv_result | TYPE GTADIR, " | |||
| lv_iv_object | TYPE TADIR-OBJECT, " '~' | |||
| lv_tr_deny_create | TYPE TADIR, " | |||
| lv_status | TYPE SDIT_PARAM-STATUS, " | |||
| lv_iv_obj_name | TYPE TADIR-OBJ_NAME, " '~' | |||
| lv_tr_distributed | TYPE TADIR, " | |||
| lv_tr_invalid_state | TYPE TADIR, " | |||
| lv_tr_invalid_transition | TYPE TADIR, " | |||
| lv_tr_no_entry | TYPE TADIR, " | |||
| lv_tr_object_exists | TYPE TADIR, " | |||
| lv_tr_deny_access | TYPE TADIR. " |
|   CALL FUNCTION 'TR_GTADIR_QUERY' " |
| EXPORTING | ||
| TAB_IN | = lv_tab_in | |
| IV_PGMID | = lv_iv_pgmid | |
| IV_OBJECT | = lv_iv_object | |
| IV_OBJ_NAME | = lv_iv_obj_name | |
| IMPORTING | ||
| ACTION | = lv_action | |
| ERROR | = lv_error | |
| RESULT | = lv_result | |
| STATUS | = lv_status | |
| EXCEPTIONS | ||
| COMMUNICATION_FAILURE = 1 | ||
| UNSUPPORTED_EXCEPTION = 10 | ||
| UNSUPPORTED_METHOD = 11 | ||
| SYSTEM_FAILURE = 2 | ||
| TR_DENY_CREATE = 3 | ||
| TR_DISTRIBUTED = 4 | ||
| TR_INVALID_STATE = 5 | ||
| TR_INVALID_TRANSITION = 6 | ||
| TR_NO_ENTRY = 7 | ||
| TR_OBJECT_EXISTS = 8 | ||
| TR_DENY_ACCESS = 9 | ||
| . " TR_GTADIR_QUERY | ||
ABAP code using 7.40 inline data declarations to call FM TR_GTADIR_QUERY
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 ACTION FROM SDIT_PARAM INTO @DATA(ld_action). | ||||
| DATA(ld_tab_in) | = '~'. | |||
| "SELECT single ERROR FROM SDIT_PARAM INTO @DATA(ld_error). | ||||
| "SELECT single PGMID FROM TADIR INTO @DATA(ld_iv_pgmid). | ||||
| DATA(ld_iv_pgmid) | = '~'. | |||
| "SELECT single OBJECT FROM TADIR INTO @DATA(ld_iv_object). | ||||
| DATA(ld_iv_object) | = '~'. | |||
| "SELECT single STATUS FROM SDIT_PARAM INTO @DATA(ld_status). | ||||
| "SELECT single OBJ_NAME FROM TADIR INTO @DATA(ld_iv_obj_name). | ||||
| DATA(ld_iv_obj_name) | = '~'. | |||
Search for further information about these or an SAP related objects