SAP Function TR_GET_NAMESPACE_AND_ROLE - Namespace and Related Role for TADIR Object

Parameter Reference Type Length Default Optional Text
IV_OBJECT TADIR-OBJECT C 4 TADIR OBJECT TYPE (for example: PROG/TABL/..)
IV_OBJNAME TADIR-OBJ_NAME C 40 TADIR OBJECT NAME (for example: )
IV_PGMID TADIR-PGMID C 4 TADIR object PGMID (e.g. R3TR/..)
IV_USE_DEVCLASS_INFO TRPARI-S_CHECKED C 1 ' ' X Use package to determine namespace

Parameter Reference Type Length Text
EV_NAMESPACE TRNSPACE-NAMESPACE C 10 Namespace for object (result)
EV_ROLE TRNSPACE-ROLE C 1 Role of namespace for object (result)

Exception Text
INVALID_OBJECT Object type invalid (for example, not TADIR-compulsory)
NAMESPACE_NOT_DETERMINABLE Namespace cannot be determined
NAMESPACE_NOT_EXISTING Namespace does not exist (in the system)

Functions
The input parameters IV_PGMID, IV_OBJECT, IV_OBJNAME specify the objectto be examined. The function module TR_GET_NAMESPACE_AND_ROLEdetermines the corresponding namespace EV_NAMESPACE using namingconventions.
In special cases, when the corresponding namespace cannot be identifieduniquely using the object name, you can determine the package of theobject as well, using the input parameter IV_USE_DEVCLASS_INFO = 'X',and use this to identify the namespace uniquely. This does involveadditional database accesses, however.
The role EV_ROLE of this namespace is also defined.
Possible values are:

  • "P": Producer role of the namespace

  • Development possible, changes can be transported
    • "C": Recipient role of the namespace

    • Only repairs are possible, only local changes in the SAP System
      The corresponding namespace is only determined for TADIR-compulsoryobjects; for non-TADIR-compulsory objects, the exception INVALID_OBJECTis triggered, as well as for object names with incorrect syntax.
      If the namespace assigned to the object is not defined in the SAPSystem, the exception NAMESPACE_NOT_EXISTING is used.
      The exception NAMESPACE_NOT_DETERMINABLE is triggered if the namespaceassigned to an object cannot be identified uniquely.

      Further information
      For a detailed description of namespaces and the related settings, seeHelp -> SAP Library -> Basis Components ->ABAP Workbench -> Change and Transport System ->Namespaces and Naming Conventions.