SAP TR_GTABKEY_INTERFACE Function Module for Access to GTABKEY
TR_GTABKEY_INTERFACE is a standard tr gtabkey interface SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Access to GTABKEY 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 gtabkey interface FM, simply by entering the name TR_GTABKEY_INTERFACE into the relevant SAP transaction such as SE37 or SE38.
Function Group: SGTA
Program Name: SAPLSGTA
Main Program: SAPLSGTA
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TR_GTABKEY_INTERFACE 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_GTABKEY_INTERFACE'"Access to GTABKEY.
EXPORTING
IV_MODE = "READ, UPD, COPY, DEL
* IV_NEW_OWNER = "Owner of GTABKEY keys
* IV_ARCHIVE = 'X' "Single-character indicator
* IS_E071E = "EM: Table of generically selected translation objects
IV_USERNAME = "Caller (for auth check)
* IV_GROUP = "GTABKEY group
* IV_MASTER = "Single-character indicator
* IV_LAYOUTID = "Layout ID for structure information in GE071KF
* IS_OBJECTS = "
* IS_KEYS = "
* IV_NEW_SWC_REL = "Structure for parameter passing
* IV_NEW_GROUP = "GTABKEY group
CHANGING
* CT_SWC_GRP = "
TABLES
* IT_USER = "Ranges for as4user
* IT_SWC_REL = "GTABKEY_SWCREL
* IT_TABNAME = "Table type for pass parameter
* IT_TRKORR = "Ranges for TRKORR
* ET_GTABKEY = "Global table keys
EXCEPTIONS
WRONG_CALL = 1 PERMISSION_DENIED = 2 ENQUEUE_FAILED = 3 GLOBAL_KEY_ERROR = 4 GROUP_NOT_FOUND = 5
IMPORTING Parameters details for TR_GTABKEY_INTERFACE
IV_MODE - READ, UPD, COPY, DEL
Data type: CHAR4Optional: No
Call by Reference: Yes
IV_NEW_OWNER - Owner of GTABKEY keys
Data type: AS4USEROptional: Yes
Call by Reference: Yes
IV_ARCHIVE - Single-character indicator
Data type: CHAR1Default: 'X'
Optional: Yes
Call by Reference: Yes
IS_E071E - EM: Table of generically selected translation objects
Data type: E071E_TABTOptional: Yes
Call by Reference: Yes
IV_USERNAME - Caller (for auth check)
Data type: AS4USEROptional: No
Call by Reference: Yes
IV_GROUP - GTABKEY group
Data type: CGKGROUPOptional: Yes
Call by Reference: Yes
IV_MASTER - Single-character indicator
Data type: CHAR1Optional: Yes
Call by Reference: Yes
IV_LAYOUTID - Layout ID for structure information in GE071KF
Data type: LAYOUTIDOptional: Yes
Call by Reference: Yes
IS_OBJECTS -
Data type: TRWBO_T_E071Optional: Yes
Call by Reference: Yes
IS_KEYS -
Data type: TRWBO_T_E071KOptional: Yes
Call by Reference: Yes
IV_NEW_SWC_REL - Structure for parameter passing
Data type: GTABKEY_SWCRELOptional: Yes
Call by Reference: Yes
IV_NEW_GROUP - GTABKEY group
Data type: CGKGROUPOptional: Yes
Call by Reference: Yes
CHANGING Parameters details for TR_GTABKEY_INTERFACE
CT_SWC_GRP -
Data type: GTABKEY_SWC_GRPTOptional: Yes
Call by Reference: Yes
TABLES Parameters details for TR_GTABKEY_INTERFACE
IT_USER - Ranges for as4user
Data type: GTABKEY_REQTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_SWC_REL - GTABKEY_SWCREL
Data type: GTABKEY_SWCRELTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_TABNAME - Table type for pass parameter
Data type: GTABKEY_TABTOptional: Yes
Call by Reference: No ( called with pass by value option)
IT_TRKORR - Ranges for TRKORR
Data type: GTABKEY_TRKORRTOptional: Yes
Call by Reference: No ( called with pass by value option)
ET_GTABKEY - Global table keys
Data type: TR_GTABKEYSOptional: Yes
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
WRONG_CALL - Invalid call
Data type:Optional: No
Call by Reference: Yes
PERMISSION_DENIED - No authorization
Data type:Optional: No
Call by Reference: Yes
ENQUEUE_FAILED - Unable to set lock
Data type:Optional: No
Call by Reference: Yes
GLOBAL_KEY_ERROR - Access problems (RFC)
Data type:Optional: No
Call by Reference: Yes
GROUP_NOT_FOUND -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for TR_GTABKEY_INTERFACE 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: | ||||
| lt_it_user | TYPE STANDARD TABLE OF GTABKEY_REQT, " | |||
| lv_iv_mode | TYPE CHAR4, " | |||
| lv_ct_swc_grp | TYPE GTABKEY_SWC_GRPT, " | |||
| lv_wrong_call | TYPE GTABKEY_SWC_GRPT, " | |||
| lv_iv_new_owner | TYPE AS4USER, " | |||
| lv_iv_archive | TYPE CHAR1, " 'X' | |||
| lv_is_e071e | TYPE E071E_TABT, " | |||
| lt_it_swc_rel | TYPE STANDARD TABLE OF GTABKEY_SWCRELT, " | |||
| lv_iv_username | TYPE AS4USER, " | |||
| lv_permission_denied | TYPE AS4USER, " | |||
| lv_iv_group | TYPE CGKGROUP, " | |||
| lt_it_tabname | TYPE STANDARD TABLE OF GTABKEY_TABT, " | |||
| lv_enqueue_failed | TYPE GTABKEY_TABT, " | |||
| lt_it_trkorr | TYPE STANDARD TABLE OF GTABKEY_TRKORRT, " | |||
| lv_iv_master | TYPE CHAR1, " | |||
| lv_global_key_error | TYPE CHAR1, " | |||
| lt_et_gtabkey | TYPE STANDARD TABLE OF TR_GTABKEYS, " | |||
| lv_iv_layoutid | TYPE LAYOUTID, " | |||
| lv_group_not_found | TYPE LAYOUTID, " | |||
| lv_is_objects | TYPE TRWBO_T_E071, " | |||
| lv_is_keys | TYPE TRWBO_T_E071K, " | |||
| lv_iv_new_swc_rel | TYPE GTABKEY_SWCREL, " | |||
| lv_iv_new_group | TYPE CGKGROUP. " |
|   CALL FUNCTION 'TR_GTABKEY_INTERFACE' "Access to GTABKEY |
| EXPORTING | ||
| IV_MODE | = lv_iv_mode | |
| IV_NEW_OWNER | = lv_iv_new_owner | |
| IV_ARCHIVE | = lv_iv_archive | |
| IS_E071E | = lv_is_e071e | |
| IV_USERNAME | = lv_iv_username | |
| IV_GROUP | = lv_iv_group | |
| IV_MASTER | = lv_iv_master | |
| IV_LAYOUTID | = lv_iv_layoutid | |
| IS_OBJECTS | = lv_is_objects | |
| IS_KEYS | = lv_is_keys | |
| IV_NEW_SWC_REL | = lv_iv_new_swc_rel | |
| IV_NEW_GROUP | = lv_iv_new_group | |
| CHANGING | ||
| CT_SWC_GRP | = lv_ct_swc_grp | |
| TABLES | ||
| IT_USER | = lt_it_user | |
| IT_SWC_REL | = lt_it_swc_rel | |
| IT_TABNAME | = lt_it_tabname | |
| IT_TRKORR | = lt_it_trkorr | |
| ET_GTABKEY | = lt_et_gtabkey | |
| EXCEPTIONS | ||
| WRONG_CALL = 1 | ||
| PERMISSION_DENIED = 2 | ||
| ENQUEUE_FAILED = 3 | ||
| GLOBAL_KEY_ERROR = 4 | ||
| GROUP_NOT_FOUND = 5 | ||
| . " TR_GTABKEY_INTERFACE | ||
ABAP code using 7.40 inline data declarations to call FM TR_GTABKEY_INTERFACE
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.| DATA(ld_iv_archive) | = 'X'. | |||
Search for further information about these or an SAP related objects