[ABAP] RTTS verwenden, um Feldnamen und Eigenschaften einer DB-Tabelle anzuzeigen

DATA: o_desc TYPE REF TO cl_abap_structdescr.

o_desc ?= cl_abap_structdescr=>describe_by_name( 'MARA' ).

DATA(o_ddic_fields) = o_desc->get_ddic_field_list( ).

LOOP AT o_ddic_fields INTO DATA(ls_ddfields) WHERE keyflag = 'X'.
  WRITE: / ls_ddfields-fieldname, ls_ddfields-fieldtext.
ENDLOOP.