REPORT ZDANY_DYN_LOCAL_TYPES.
****************** hardcoded "old style" local type*******************
* This is a normal hardcoded local type
types : begin of typ_hardcoded,
l_count type i,
lt_sflight type sflight.
types : end of typ_hardcoded.
* create a table based on hardcoded type
data : lt_hardcoded type table of typ_hardcoded.
****************** dynamic "new wave" local type *******************
types: typ_count type i.
field-symbols : <lt_dynamic> type any table.
data: dref type ref to data,
itab_type type ref to cl_abap_tabledescr,
struct_type type ref to cl_abap_structdescr,
elem_type type ref to cl_abap_elemdescr,
comp_tab type cl_abap_structdescr=>component_table,
comp_fld type cl_abap_structdescr=>component.
* We read information about each fields of SFLIGHT (see ABAP FAQ #2)
struct_type
****************** hardcoded "old style" local type*******************
* This is a normal hardcoded local type
types : begin of typ_hardcoded,
l_count type i,
lt_sflight type sflight.
types : end of typ_hardcoded.
* create a table based on hardcoded type
data : lt_hardcoded type table of typ_hardcoded.
****************** dynamic "new wave" local type *******************
types: typ_count type i.
field-symbols : <lt_dynamic> type any table.
data: dref type ref to data,
itab_type type ref to cl_abap_tabledescr,
struct_type type ref to cl_abap_structdescr,
elem_type type ref to cl_abap_elemdescr,
comp_tab type cl_abap_structdescr=>component_table,
comp_fld type cl_abap_structdescr=>component.
* We read information about each fields of SFLIGHT (see ABAP FAQ #2)
struct_type