length (tabledescr,structdescr)

Hi, I was able to print the column headers and types, but I could not print the length parameter, can you help me? I am leaving the final version of the code below.

 

DATA(lr_tabledescr) = CAST cl_abap_tabledescr( cl_abap_typedescr=>describe_by_data( lt_analok ) ).
DATA(lr_structdescr) = CAST cl_abap_structdescr( lr_tabledescr->get_table_line_type( ) ).

DATA(sutun_basliklari) = VALUE fieldname_tab( FOR ls IN lr_structdescr->components ( ls-name ) ).
DATA(sutun_type) = VALUE fieldname_tab( FOR ls IN lr_structdescr->components ( ls-type_kind ) ).
data(leng) = VALUE fieldname_tab( FOR ls IN lr_structdescr->components ( ls-length ) ).

DATA index TYPE i.
index = 1.

LOOP AT sutun_basliklari INTO DATA(ls_st).
WRITE: / index, ‘ ‘ , ls_st, ‘ ‘ , sutun_type[ index ] , ‘ ‘ .
index = index + 1.
ENDLOOP.

cl_demo_output=>display( ).

 

Scroll to Top