SAP TR_CHECK_NAME_CLASS Function Module for Class assignment of an object: Customer or SAP object (name range)
TR_CHECK_NAME_CLASS is a standard tr check name class SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Class assignment of an object: Customer or SAP object (name range) 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 name class FM, simply by entering the name TR_CHECK_NAME_CLASS into the relevant SAP transaction such as SE37 or SE38.
Function Group: STRD
Program Name: SAPLSTRD
Main Program: SAPLSTRD
Appliation area: S
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function TR_CHECK_NAME_CLASS 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_NAME_CLASS'"Class assignment of an object: Customer or SAP object (name range).
EXPORTING
WI_PGMID = "TADIR Object pgmID (for example: R3TR/..)
WI_OBJECT = "TADIR OBJECT TYPE (for example: PROG/TABL/..)
WI_OBJNAME = "TADIR OBJECT NAME (for example:
IMPORTING Parameters details for TR_CHECK_NAME_CLASS
WI_PGMID - TADIR Object pgmID (for example: R3TR/..)
Data type: TADIR-PGMIDOptional: No
Call by Reference: No ( called with pass by value option)
WI_OBJECT - TADIR OBJECT TYPE (for example: PROG/TABL/..)
Data type: TADIR-OBJECTOptional: No
Call by Reference: No ( called with pass by value option)
WI_OBJNAME - TADIR OBJECT NAME (for example:
Data type: TADIR-OBJ_NAMEOptional: No
Call by Reference: No ( called with pass by value option)
IV_NAMESPACE -
Data type: TRNSPACE-NAMESPACEOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for TR_CHECK_NAME_CLASS
WE_NAME_CLASS - S = SAP- / C = customer name range /' ' = general, open
Data type: TRPARI-W_NAMECLASOptional: No
Call by Reference: No ( called with pass by value option)
EV_NAMESPACE -
Data type: TRNSPACE-NAMESPACEOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
NAMESPACE_NOT_EXISTING -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
INVALID_OBJECT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for TR_CHECK_NAME_CLASS 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_pgmid | TYPE TADIR-PGMID, " | |||
| lv_we_name_class | TYPE TRPARI-W_NAMECLAS, " | |||
| lv_namespace_not_existing | TYPE TRPARI, " | |||
| lv_wi_object | TYPE TADIR-OBJECT, " | |||
| lv_ev_namespace | TYPE TRNSPACE-NAMESPACE, " | |||
| lv_invalid_object | TYPE TRNSPACE, " | |||
| lv_wi_objname | TYPE TADIR-OBJ_NAME, " | |||
| lv_iv_namespace | TYPE TRNSPACE-NAMESPACE. " |
|   CALL FUNCTION 'TR_CHECK_NAME_CLASS' "Class assignment of an object: Customer or SAP object (name range) |
| EXPORTING | ||
| WI_PGMID | = lv_wi_pgmid | |
| WI_OBJECT | = lv_wi_object | |
| WI_OBJNAME | = lv_wi_objname | |
| IV_NAMESPACE | = lv_iv_namespace | |
| IMPORTING | ||
| WE_NAME_CLASS | = lv_we_name_class | |
| EV_NAMESPACE | = lv_ev_namespace | |
| EXCEPTIONS | ||
| NAMESPACE_NOT_EXISTING = 1 | ||
| INVALID_OBJECT = 2 | ||
| . " TR_CHECK_NAME_CLASS | ||
ABAP code using 7.40 inline data declarations to call FM TR_CHECK_NAME_CLASS
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 PGMID FROM TADIR INTO @DATA(ld_wi_pgmid). | ||||
| "SELECT single W_NAMECLAS FROM TRPARI INTO @DATA(ld_we_name_class). | ||||
| "SELECT single OBJECT FROM TADIR INTO @DATA(ld_wi_object). | ||||
| "SELECT single NAMESPACE FROM TRNSPACE INTO @DATA(ld_ev_namespace). | ||||
| "SELECT single OBJ_NAME FROM TADIR INTO @DATA(ld_wi_objname). | ||||
| "SELECT single NAMESPACE FROM TRNSPACE INTO @DATA(ld_iv_namespace). | ||||
Search for further information about these or an SAP related objects