Skip to Content
0
Former Member
May 04, 2006 at 03:45 PM

CL_ABAP_TYPEDESCR

465 Views

If I create a user defined type with reference to a DDIC object I can obtain the list of fields in the user defined type and the obsolute name which contains the user defined type by calling method describe_by_data of class cl_abap_structdescr at run time.

Does anyone know how you can find the original ddic structure at runtime of the type TY_POHEADER.

TYPES: ty_poheader TYPE bapimepoheader.

DATA: dref TYPE REF TO data.

DATA: descr_ref TYPE REF TO cl_abap_structdescr.

FIELD-SYMBOLS: <fs_line2> TYPE ty_poheader.

Start-of-selection.

CREATE DATA dref TYPE ty_poheader.

ASSIGN dref->* TO <fs_line2>.

descr_ref ?= cl_abap_typedescr=>describe_by_data( <fs_line2> ).