Skip to Content
0
Oct 18, 2009 at 05:08 PM

Length report double

41 Views

Hi,

I have the code below and i am not sure why the length of the attribute are reported double

Code:

FIELD-SYMBOLS:

<fs_comp_wa> TYPE abap_compdescr.

DATA: lr_desc_table type ref to CL_ABAP_TYPEDESCR,

lr_desc_struc type ref to cl_abap_structdescr.

lr_desc_table ?= cl_abap_typedescr=>describe_by_data( ZTEST).

if lr_desc_table->type_kind = 'u'. " <- Structure

lr_desc_struc ?= lr_desc_table.

loop at lr_desc_struc->components ASSIGNING <fs_comp_wa>.

"check the length of the field at run time '<fs_comp_wa>-length'

ENDLOOP.

endif.

Regards,

Sanju