Escolar Documentos
Profissional Documentos
Cultura Documentos
Integration Services
The RTTS ( Run Time Type Services) are implemented through a hierarchy of type
classes that provides the following functionalities:
CL_ABAP_TYPEDESCR
CL_ABAP_DATADESCR CL_ABAP_OBJECTDESCR
CL_ABAP_ELEMDESCR CL_ABAP_INTFDESCR
CL_ABAP_REFDESCR CL_ABAP_CLASSDESCR
CL_ABAP_COMPLEXDESCR
CL_ABAP_STRUCTDESCR
CL_ABAP_TABLEDESCR
• RTTI
CL_ABAP_STRUCTDESCR->GET_COMPONENTS
Returns component description table of structure
CL_ABAP_CLASSDESCR->GET_SUPER_CLASS_TYPE
Returns super class type
CL_ABAP_ELEMDESCR->IS_DDIC_TYPE
Returns TRUE if it is a Dictionary type
• RTTC
CL_ABAP_ELEMDESCR=>GET_C
Returns the Type Object for an Elementary Type c
CL_ABAP_ELEMDESCR=>GET_N
Returns the Type Object for an Elementary Type n
CL_ABAP_STRUCTDESCR=>CREATE
Factory method for Structure Type creation
To introduce us in the study and the usage of RTTS, we should know first what is a
Type Object and its properties.
A Type Object:
There are many possible scenarios where we can use RTTS and take advantage of it.
• RTTI usage
Get field description from data dictionary
Get all the components of a structure and its properties
• RTTC usage
Create data objects dynamically
Create an internal table dynamically
Scenario:
You have defined a custom type structure whose fields are referenced to DDIC
elements.
Scenario:
Scenario:
The output of our test program will be a simple report showing the data on the
internal table we created dynamically.