SAP TR_GTABKEYEXC_INTERFACE Function Module for Access to GTABKEY Exceptions
TR_GTABKEYEXC_INTERFACE is a standard tr gtabkeyexc 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 Exceptions 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 gtabkeyexc interface FM, simply by entering the name TR_GTABKEYEXC_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_GTABKEYEXC_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_GTABKEYEXC_INTERFACE'"Access to GTABKEY Exceptions.
EXPORTING
IV_MODE = "READ, UPD, COPY, DEL
* IV_NEW_GROUP = "GTABKEY group
* IV_ARCHIVE = 'X' "Single-character indicator
IV_USERNAME = "Caller (for auth check)
* IV_EXC_STATUS = "Status flag (R/A)
* IV_GROUP = "GTABKEY group
* IS_OBJECTS = "
* IS_KEYS = "
* IV_NEW_STATUS = "Single-character indicator
* IV_NEW_SWC_REL = "Structure for parameter passing
* IV_NEW_APPROVER = "Last changed by
TABLES
* IT_REQUESTER = "Ranges for as4user
* IT_SWC_REL = "GTABKEY_SWCREL
* IT_TABNAME = "Table type for pass parameter
* IT_GTABKEYEXC = "Table type GTABKEYEXC
* ET_GTABKEYEXC = "Global table keys
* IT_GTABKEYEXC20 = "Global key check exception list
* ET_GTABKEYEXC20 = "Global key check exception list
EXCEPTIONS
WRONG_CALL = 1 PERMISSION_DENIED = 2 ENQUEUE_FAILED = 3 GLOBAL_KEY_ERROR = 4 GROUP_NOT_FOUND = 5
IMPORTING Parameters details for TR_GTABKEYEXC_INTERFACE
IV_MODE - READ, UPD, COPY, DEL
Data type: CHAR4Optional: No
Call by Reference: Yes
IV_NEW_GROUP - GTABKEY group
Data type: CGKGROUPOptional: Yes
Call by Reference: Yes
IV_ARCHIVE - Single-character indicator
Data type: CHAR1Default: 'X'
Optional: Yes
Call by Reference: Yes
IV_USERNAME - Caller (for auth check)
Data type: AS4USEROptional: No
Call by Reference: Yes
IV_EXC_STATUS - Status flag (R/A)
Data type: CHAR1Optional: Yes
Call by Reference: Yes
IV_GROUP - GTABKEY group
Data type: CGKGROUPOptional: 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_STATUS - Single-character indicator
Data type: CHAR1Optional: Yes
Call by Reference: Yes
IV_NEW_SWC_REL - Structure for parameter passing
Data type: GTABKEY_SWCRELOptional: Yes
Call by Reference: Yes
IV_NEW_APPROVER - Last changed by
Data type: AS4USEROptional: Yes
Call by Reference: Yes
TABLES Parameters details for TR_GTABKEYEXC_INTERFACE
IT_REQUESTER - Ranges for as4user
Data type: GTABKEY_REQTOptional: Yes
Call by Reference: Yes
IT_SWC_REL - GTABKEY_SWCREL
Data type: GTABKEY_SWCRELTOptional: Yes
Call by Reference: Yes
IT_TABNAME - Table type for pass parameter
Data type: GTABKEY_TABTOptional: Yes
Call by Reference: Yes
IT_GTABKEYEXC - Table type GTABKEYEXC
Data type: TR_GTABKEYEXCOptional: Yes
Call by Reference: Yes
ET_GTABKEYEXC - Global table keys
Data type: TR_GTABKEYEXCOptional: Yes
Call by Reference: Yes
IT_GTABKEYEXC20 - Global key check exception list
Data type: GTABKEYEXC20_SOptional: Yes
Call by Reference: Yes
ET_GTABKEYEXC20 - Global key check exception list
Data type: GTABKEYEXC20_SOptional: Yes
Call by Reference: Yes
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 - General (RFC) error
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_GTABKEYEXC_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: | ||||
| lv_iv_mode | TYPE CHAR4, " | |||
| lv_wrong_call | TYPE CHAR4, " | |||
| lt_it_requester | TYPE STANDARD TABLE OF GTABKEY_REQT, " | |||
| lv_iv_new_group | TYPE CGKGROUP, " | |||
| lv_iv_archive | TYPE CHAR1, " 'X' | |||
| lt_it_swc_rel | TYPE STANDARD TABLE OF GTABKEY_SWCRELT, " | |||
| lv_iv_username | TYPE AS4USER, " | |||
| lv_permission_denied | TYPE AS4USER, " | |||
| lt_it_tabname | TYPE STANDARD TABLE OF GTABKEY_TABT, " | |||
| lv_iv_exc_status | TYPE CHAR1, " | |||
| lv_enqueue_failed | TYPE CHAR1, " | |||
| lv_iv_group | TYPE CGKGROUP, " | |||
| lt_it_gtabkeyexc | TYPE STANDARD TABLE OF TR_GTABKEYEXC, " | |||
| lv_global_key_error | TYPE TR_GTABKEYEXC, " | |||
| lv_is_objects | TYPE TRWBO_T_E071, " | |||
| lt_et_gtabkeyexc | TYPE STANDARD TABLE OF TR_GTABKEYEXC, " | |||
| lv_group_not_found | TYPE TR_GTABKEYEXC, " | |||
| lv_is_keys | TYPE TRWBO_T_E071K, " | |||
| lt_it_gtabkeyexc20 | TYPE STANDARD TABLE OF GTABKEYEXC20_S, " | |||
| lv_iv_new_status | TYPE CHAR1, " | |||
| lt_et_gtabkeyexc20 | TYPE STANDARD TABLE OF GTABKEYEXC20_S, " | |||
| lv_iv_new_swc_rel | TYPE GTABKEY_SWCREL, " | |||
| lv_iv_new_approver | TYPE AS4USER. " |
|   CALL FUNCTION 'TR_GTABKEYEXC_INTERFACE' "Access to GTABKEY Exceptions |
| EXPORTING | ||
| IV_MODE | = lv_iv_mode | |
| IV_NEW_GROUP | = lv_iv_new_group | |
| IV_ARCHIVE | = lv_iv_archive | |
| IV_USERNAME | = lv_iv_username | |
| IV_EXC_STATUS | = lv_iv_exc_status | |
| IV_GROUP | = lv_iv_group | |
| IS_OBJECTS | = lv_is_objects | |
| IS_KEYS | = lv_is_keys | |
| IV_NEW_STATUS | = lv_iv_new_status | |
| IV_NEW_SWC_REL | = lv_iv_new_swc_rel | |
| IV_NEW_APPROVER | = lv_iv_new_approver | |
| TABLES | ||
| IT_REQUESTER | = lt_it_requester | |
| IT_SWC_REL | = lt_it_swc_rel | |
| IT_TABNAME | = lt_it_tabname | |
| IT_GTABKEYEXC | = lt_it_gtabkeyexc | |
| ET_GTABKEYEXC | = lt_et_gtabkeyexc | |
| IT_GTABKEYEXC20 | = lt_it_gtabkeyexc20 | |
| ET_GTABKEYEXC20 | = lt_et_gtabkeyexc20 | |
| EXCEPTIONS | ||
| WRONG_CALL = 1 | ||
| PERMISSION_DENIED = 2 | ||
| ENQUEUE_FAILED = 3 | ||
| GLOBAL_KEY_ERROR = 4 | ||
| GROUP_NOT_FOUND = 5 | ||
| . " TR_GTABKEYEXC_INTERFACE | ||
ABAP code using 7.40 inline data declarations to call FM TR_GTABKEYEXC_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