The type name that can be used statically in ABAP statements is relative to its context,and is also known the relative type name. As described in Validity and Visibility, local data types hide more global data types of the same name. The same applies to classes and interfaces, which can also be interpreted as type definitions in this regard.
Absolute type names, however, name a type unambiguously. An absolute type name as a path specifications is composed of the following components:
The last component of a path must always be \TYPE=name, \CLASS=name or \INTERFACE=name. It describes a data type, a class, or an interface. Absolute type names that only consist of \TYPE=name, \CLASS=name or \INTERFACE=name describe a data type from the ABAP Dictionary or a global class/interface of the class library. To create absolute type names for local data types, classes, and interfaces, use sequential component names that specify its context as prefixes. This procedure is not case-sensitive.
Absolute type names can be used in all statements in which dynamic specification of a data type, a class, or an interface is possible. This makes it possible to lift the occlusion of a global type by a local type via the specification of an absolute type name, and you can use the absolute type names to dynamically access the types, classes and interfaces of other programs.
A data type is uniquely identified by its absolute type name. Various options exist, however, for forming an unique path for a type. For example, you can omit the function group for a type in a function module, because every function module is unique. If types are located in a class pool or function group, you can also specify the technical name of the ABAP program. Since the latter is not known most of the time, we recommend using \CLASS-POOL or \FUNCTION-POOL instead.
A data type that only exists as a property of a data object does not have a relative type name. However, it internally has an absolute type name (technical type name) that uniquely defines the data type.
The type classes of the Run Time Type Services (RTTS), such as CL_ABAP_TYPEDESCRcontain methods that return the absolute type name of data types or data objects. You can use these return values for dynamic typing.
When methods m1 and m2 of class c1 are called in the example below, RTTS returns the absolute type names \TYPE=SPFLI or \PROGRAM=RTTI_TEST\CLASS=C1\METHOD=M2\TYPE=SPFLI f for the generically typed parameter p. The usage of the name spfli has a different meaning in methods m1 and m2.
CLASS c1 DEFINITION.
PUBLIC SECTION.
METHODS: m1,
m2,
m3 IMPORTING p TYPE any.
ENDCLASS.
CLASS c1 IMPLEMENTATION.
METHOD m1.
DATA struc TYPE spfli.
m3( struc ).
ENDMETHOD.
METHOD m2.
TYPES spfli TYPE spfli.
DATA struc TYPE spfli.
m3( struc ).
ENDMETHOD.
METHOD m3.
DATA type_descr TYPE REF TO cl_abap_typedescr.
type_descr = cl_abap_typedescr=>describe_by_data( p ).
WRITE / type_descr->absolute_name.
ENDMETHOD.
ENDCLASS.