CL_ABAP_STRUCTDESCR - Runtime Type Services

TXBHW - Original Tax Base Amount in Local Currency   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.

Functionality

This final class is used to describe and create structures. There is a single type object for each defined structure.

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:
  BEGIN OF my_struct,
    comp_a type i,
    comp_b type f,
  END OF my_struct.

DATA:
  my_data   TYPE my_struct,
  descr_ref TYPE ref to cl_abap_structdescr.

FIELD-SYMBOLS:
  <comp_wa> TYPE abap_compdescr.

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.
  WRITE: / 'Struct Kind  :', descr_ref->struct_kind.
  WRITE: / 'Components'.
  WRITE: / 'Name              Kind   Length   Decimals'.
  LOOP AT descr_ref->components ASSIGNING <comp_wa>.
    WRITE: / <comp_wa>-name, <comp_wa>-type_kind,
             <comp_wa>-length, <comp_wa>-decimals.
  ENDLOOP.

Notes

None

Further information

Classes:
  CL_ABAP_DATADESCR
  CL_ABAP_COMPLEXDESRC
  CL_ABAP_OBJECTDESCR
  CL_ABAP_TYPEDESCR
  CL_ABAP_REFDESCR
  CL_ABAP_ELEMDESCR
  CL_ABAP_TABLEDESCR
  CL_ABAP_CLASSDESCR
  CL_ABAP_INTFDESCR


Vendor Master (General Section)   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.


Length: 2853 Date: 20120526 Time: 083010     triton ( 78 ms )