CL_ABAP_TYPEDESCR - Runtime Type Services

Addresses (Business Address Services)   Vendor Master (General Section)  
This documentation is copyright by SAP AG.

Functionality

This abstract class is the topmost class in the hierarchy of classes used to determine and generatetype attributes at runtime (RTTS - Run Time Type Services). It provides instance attributes and constants for general type information, as well as all of the static methods required to create the type objects.

Relationships

CL_ABAP_TYPEDESCR
|
|--CL_ABAP_DATADESCR
| |
| |--CL_ABAP_ELEMDESCR
| |--CL_ABAP_REFDESCR
| |--CL_ABAP_COMPLEXDESCR
| |
| |--CL_ABAP_STRUCTDESCR
| |--CL_ABAP_TABLEDESCR
|
|--CL_ABAP_OBJECTDESCR
|
|--CL_ABAP_CLASSDESCR
|--CL_ABAP_INTFDESCR

Example

REPORT typedescr_test.

TYPES:
my_type TYPE i.

DATA:
my_data TYPE my_type,
descr_ref TYPE ref to cl_abap_typedescr.

START-OF-SELECTION.
descr_ref = cl_abap_typedescr=>describe_by_data( my_data ).

WRITE: / 'Typename:', descr_ref->absolute_name.
WRITE: / 'Kind :', descr_ref->type_kind.
WRITE: / 'Length :', descr_ref->length.
WRITE: / 'Decimals:', descr_ref->decimals.

Notes

You should only use constants from this class with the prefix TYPEKIND to query the attribute TYPE_KIND.

Further information

Classes:
CL_ABAP_DATADESCR
CL_ABAP_COMPLEXDESRC
CL_ABAP_OBJECTDESCR
CL_ABAP_ELEMDESCR
CL_ABAP_REFDESCR
CL_ABAP_STRUCTDESCR
CL_ABAP_TABLEDESCR
CL_ABAP_CLASSDESCR
CL_ABAP_INTFDESCR


BAL Application Log Documentation   BAL Application Log Documentation  
This documentation is copyright by SAP AG.


Length: 1648 Date: 20120526 Time: 083232     triton ( 99 ms )