SAP TR_CHECK_TYPE Function Module for Determine whether key can be locked, generate TADIR and TLOCK
TR_CHECK_TYPE is a standard tr check type SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Determine whether key can be locked, generate TADIR and TLOCK 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 check type FM, simply by entering the name TR_CHECK_TYPE into the relevant SAP transaction such as SE37 or SE38.
Function Group: STRD
Program Name: SAPLSTRD
Main Program: SAPLSTRD
Appliation area: S
Release date: 21-Dec-1998
Mode(Normal, Remote etc): Normal Function Module
Update:
Function TR_CHECK_TYPE 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_CHECK_TYPE'"Determine whether key can be locked, generate TADIR and TLOCK.
EXPORTING
WI_E071 = "Input key
* IV_TRANSLATE_OBJNAME = ' ' "' ': Without, 'X': With conversion of the object name into upper case
IMPORTING
PE_RESULT = "Check result ('type class')
PE_NAME_TOO_LONG = "Object name too long
EV_NO_OBJECT_NAME = "X - no object name transferred
EV_R3TRTEXT_SYNTAXERROR = "X - syntax error in an R3TR TEXT object
EV_LANGTYP = "Language dependency of object
EV_LANGTYPA = "Type of language dependency of object
EV_LOGO_OBJ = "X - object is a TLOGO object
EV_CURR_SETTING = "X - object belongs to current settings
EV_NAME_TOO_LONG_FOR_OLD = "Object name is too long (according to rules prior to 4.0)
EV_NAME_WITH_NONSTANDARD_CHARS = "Object name contains invalid characters
EV_NAME' ' = "Namespace
WE_E071 = "Output string E071
EV_INVALID_PREFIX_SYNTAX = "Prefix of the object name is incorrect
EV_PREFIX_NOT_ALLOWED = "Object name prefix not valid for object type
EV_CASE_SENSITIVE = "
EV_OBJLEN = "Maximum name length for object type
EV_INVALID_LANGUAGE_FIELD = "'X': Language field filled incorrectly
WE_LOCK_KEY = "Long-term lock key
WE_TADIR = "Object directory key created
WE_COMPLETE_ONLY = "X - only complete object can be transported -> R3TR
WE_CATEGORY = "Request category ('CUST', 'CUSY', 'SYST')
WE_CLI_DEP = "X - object client-dependent
WE_TABLE_TYP = "Table type (inttab, pooled, cluster, transp. , view...)
WE_TABLE_CONTFLAG = "Table delivery class
IMPORTING Parameters details for TR_CHECK_TYPE
WI_E071 - Input key
Data type: E071Optional: No
Call by Reference: No ( called with pass by value option)
IV_TRANSLATE_OBJNAME - ' ': Without, 'X': With conversion of the object name into upper case
Data type: TRBOOLEANDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for TR_CHECK_TYPE
PE_RESULT - Check result ('type class')
Data type: TRPARI-S_CHECKEDOptional: No
Call by Reference: No ( called with pass by value option)
PE_NAME_TOO_LONG - Object name too long
Data type: TRPARI-S_CHECKEDOptional: No
Call by Reference: No ( called with pass by value option)
EV_NO_OBJECT_NAME - X - no object name transferred
Data type: TRPARI-S_CHECKEDOptional: No
Call by Reference: No ( called with pass by value option)
EV_R3TRTEXT_SYNTAXERROR - X - syntax error in an R3TR TEXT object
Data type: TRPARI-S_CHECKEDOptional: No
Call by Reference: No ( called with pass by value option)
EV_LANGTYP - Language dependency of object
Data type: TRPARI-LANGTYPOptional: No
Call by Reference: No ( called with pass by value option)
EV_LANGTYPA - Type of language dependency of object
Data type: TRPARI-LANGTYPAOptional: No
Call by Reference: No ( called with pass by value option)
EV_LOGO_OBJ - X - object is a TLOGO object
Data type: TRPARI-S_EXISTSOptional: No
Call by Reference: No ( called with pass by value option)
EV_CURR_SETTING - X - object belongs to current settings
Data type: OBJH-CURSETTINGOptional: No
Call by Reference: No ( called with pass by value option)
EV_NAME_TOO_LONG_FOR_OLD - Object name is too long (according to rules prior to 4.0)
Data type: TRPARI-S_CHECKEDOptional: No
Call by Reference: No ( called with pass by value option)
EV_NAME_WITH_NONSTANDARD_CHARS - Object name contains invalid characters
Data type: TRPARI-S_CHECKEDOptional: No
Call by Reference: No ( called with pass by value option)
EV_NAMESPACE - Namespace
Data type: TRNSPACE-NAMESPACEOptional: No
Call by Reference: No ( called with pass by value option)
WE_E071 - Output string E071
Data type: E071Optional: No
Call by Reference: No ( called with pass by value option)
EV_INVALID_PREFIX_SYNTAX - Prefix of the object name is incorrect
Data type: TRPARI-S_CHECKEDOptional: No
Call by Reference: No ( called with pass by value option)
EV_PREFIX_NOT_ALLOWED - Object name prefix not valid for object type
Data type: TRPARI-S_CHECKEDOptional: No
Call by Reference: No ( called with pass by value option)
EV_CASE_SENSITIVE -
Data type: TRPARI-S_CHECKEDOptional: No
Call by Reference: No ( called with pass by value option)
EV_OBJLEN - Maximum name length for object type
Data type: TLOCK-LENOptional: No
Call by Reference: No ( called with pass by value option)
EV_INVALID_LANGUAGE_FIELD - 'X': Language field filled incorrectly
Data type: TRPARI-S_CHECKEDOptional: No
Call by Reference: No ( called with pass by value option)
WE_LOCK_KEY - Long-term lock key
Data type: TLOCK_INTOptional: No
Call by Reference: No ( called with pass by value option)
WE_TADIR - Object directory key created
Data type: TADIROptional: No
Call by Reference: No ( called with pass by value option)
WE_COMPLETE_ONLY - X - only complete object can be transported -> R3TR
Data type: TRPARI-W_COMPLETEOptional: No
Call by Reference: No ( called with pass by value option)
WE_CATEGORY - Request category ('CUST', 'CUSY', 'SYST')
Data type: E070-KORRDEVOptional: No
Call by Reference: No ( called with pass by value option)
WE_CLI_DEP - X - object client-dependent
Data type: TRPARI-W_CLI_DEPOptional: No
Call by Reference: No ( called with pass by value option)
WE_TABLE_TYP - Table type (inttab, pooled, cluster, transp. , view...)
Data type: DD02L-TABCLASSOptional: No
Call by Reference: No ( called with pass by value option)
WE_TABLE_CONTFLAG - Table delivery class
Data type: DD02L-CONTFLAGOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for TR_CHECK_TYPE 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_wi_e071 | TYPE E071, " | |||
lv_pe_result | TYPE TRPARI-S_CHECKED, " | |||
lv_pe_name_too_long | TYPE TRPARI-S_CHECKED, " | |||
lv_ev_no_object_name | TYPE TRPARI-S_CHECKED, " | |||
lv_ev_r3trtext_syntaxerror | TYPE TRPARI-S_CHECKED, " | |||
lv_ev_langtyp | TYPE TRPARI-LANGTYP, " | |||
lv_ev_langtypa | TYPE TRPARI-LANGTYPA, " | |||
lv_ev_logo_obj | TYPE TRPARI-S_EXISTS, " | |||
lv_ev_curr_setting | TYPE OBJH-CURSETTING, " | |||
lv_ev_name_too_long_for_old | TYPE TRPARI-S_CHECKED, " | |||
lv_ev_name_with_nonstandard_chars | TYPE TRPARI-S_CHECKED, " | |||
lv_ev_namespace | TYPE TRNSPACE-NAMESPACE, " | |||
lv_we_e071 | TYPE E071, " | |||
lv_iv_translate_objname | TYPE TRBOOLEAN, " SPACE | |||
lv_ev_invalid_prefix_syntax | TYPE TRPARI-S_CHECKED, " | |||
lv_ev_prefix_not_allowed | TYPE TRPARI-S_CHECKED, " | |||
lv_ev_case_sensitive | TYPE TRPARI-S_CHECKED, " | |||
lv_ev_objlen | TYPE TLOCK-LEN, " | |||
lv_ev_invalid_language_field | TYPE TRPARI-S_CHECKED, " | |||
lv_we_lock_key | TYPE TLOCK_INT, " | |||
lv_we_tadir | TYPE TADIR, " | |||
lv_we_complete_only | TYPE TRPARI-W_COMPLETE, " | |||
lv_we_category | TYPE E070-KORRDEV, " | |||
lv_we_cli_dep | TYPE TRPARI-W_CLI_DEP, " | |||
lv_we_table_typ | TYPE DD02L-TABCLASS, " | |||
lv_we_table_contflag | TYPE DD02L-CONTFLAG. " |
  CALL FUNCTION 'TR_CHECK_TYPE' "Determine whether key can be locked, generate TADIR and TLOCK |
EXPORTING | ||
WI_E071 | = lv_wi_e071 | |
IV_TRANSLATE_OBJNAME | = lv_iv_translate_objname | |
IMPORTING | ||
PE_RESULT | = lv_pe_result | |
PE_NAME_TOO_LONG | = lv_pe_name_too_long | |
EV_NO_OBJECT_NAME | = lv_ev_no_object_name | |
EV_R3TRTEXT_SYNTAXERROR | = lv_ev_r3trtext_syntaxerror | |
EV_LANGTYP | = lv_ev_langtyp | |
EV_LANGTYPA | = lv_ev_langtypa | |
EV_LOGO_OBJ | = lv_ev_logo_obj | |
EV_CURR_SETTING | = lv_ev_curr_setting | |
EV_NAME_TOO_LONG_FOR_OLD | = lv_ev_name_too_long_for_old | |
EV_NAME_WITH_NONSTANDARD_CHARS | = lv_ev_name_with_nonstandard_chars | |
EV_NAMESPACE | = lv_ev_namespace | |
WE_E071 | = lv_we_e071 | |
EV_INVALID_PREFIX_SYNTAX | = lv_ev_invalid_prefix_syntax | |
EV_PREFIX_NOT_ALLOWED | = lv_ev_prefix_not_allowed | |
EV_CASE_SENSITIVE | = lv_ev_case_sensitive | |
EV_OBJLEN | = lv_ev_objlen | |
EV_INVALID_LANGUAGE_FIELD | = lv_ev_invalid_language_field | |
WE_LOCK_KEY | = lv_we_lock_key | |
WE_TADIR | = lv_we_tadir | |
WE_COMPLETE_ONLY | = lv_we_complete_only | |
WE_CATEGORY | = lv_we_category | |
WE_CLI_DEP | = lv_we_cli_dep | |
WE_TABLE_TYP | = lv_we_table_typ | |
WE_TABLE_CONTFLAG | = lv_we_table_contflag | |
. " TR_CHECK_TYPE |
ABAP code using 7.40 inline data declarations to call FM TR_CHECK_TYPE
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 S_CHECKED FROM TRPARI INTO @DATA(ld_pe_result). | ||||
"SELECT single S_CHECKED FROM TRPARI INTO @DATA(ld_pe_name_too_long). | ||||
"SELECT single S_CHECKED FROM TRPARI INTO @DATA(ld_ev_no_object_name). | ||||
"SELECT single S_CHECKED FROM TRPARI INTO @DATA(ld_ev_r3trtext_syntaxerror). | ||||
"SELECT single LANGTYP FROM TRPARI INTO @DATA(ld_ev_langtyp). | ||||
"SELECT single LANGTYPA FROM TRPARI INTO @DATA(ld_ev_langtypa). | ||||
"SELECT single S_EXISTS FROM TRPARI INTO @DATA(ld_ev_logo_obj). | ||||
"SELECT single CURSETTING FROM OBJH INTO @DATA(ld_ev_curr_setting). | ||||
"SELECT single S_CHECKED FROM TRPARI INTO @DATA(ld_ev_name_too_long_for_old). | ||||
"SELECT single S_CHECKED FROM TRPARI INTO @DATA(ld_ev_name_with_nonstandard_chars). | ||||
"SELECT single NAME' ' FROM TRN' ' INTO @DATA(ld_ev_namespace). | ||||
DATA(ld_iv_translate_objname) | = ' '. | |||
"SELECT single S_CHECKED FROM TRPARI INTO @DATA(ld_ev_invalid_prefix_syntax). | ||||
"SELECT single S_CHECKED FROM TRPARI INTO @DATA(ld_ev_prefix_not_allowed). | ||||
"SELECT single S_CHECKED FROM TRPARI INTO @DATA(ld_ev_case_sensitive). | ||||
"SELECT single LEN FROM TLOCK INTO @DATA(ld_ev_objlen). | ||||
"SELECT single S_CHECKED FROM TRPARI INTO @DATA(ld_ev_invalid_language_field). | ||||
"SELECT single W_COMPLETE FROM TRPARI INTO @DATA(ld_we_complete_only). | ||||
"SELECT single KORRDEV FROM E070 INTO @DATA(ld_we_category). | ||||
"SELECT single W_CLI_DEP FROM TRPARI INTO @DATA(ld_we_cli_dep). | ||||
"SELECT single TABCLASS FROM DD02L INTO @DATA(ld_we_table_typ). | ||||
"SELECT single CONTFLAG FROM DD02L INTO @DATA(ld_we_table_contflag). | ||||
Search for further information about these or an SAP related objects