CL_ABAP_TYPEDESCR=>DESCRIBE_BY_NAME method gives incorrect length. In my case, i am trying to prepare dynamic internal table for KNKA table. For all the fields i am
ref_struct ?= cl_abap_typedescr=>describe_by_name( 'TY_SELECTED' ). LOOP AT ref_struct->components INTO component.. ref_element ?= cl_abap_typedescr=>describe_by_name( 'TY_SELECTED-' && component-name ). ddic = ref_element->get_ddic_field( ). WRITE: / ddic-scrtext_m. IF sy...
data: l_describe TYPE REF TO cl_abap_typedescr. field-symbols: <field>. data: field_name(15). ASSIGN TABLE FIELD (field_name) TO <field> call method cl_abap_typedescr=>describe_by_data exporting p_data = <field> receiving p_descr_ref = l_describe Or Simply ASSIGN TABLE FIELD (fie...
I am using cl_abap_typedescr=>describe_by_data( <gt_table> ) to retrieve the fieldlist of my dynamically created ALV fieldcatalog. However, I have just switched to using some fields that are of type INT and now the method ignores them. Is this correct??? Is there another method that...
lr_elem_descr ?= cl_abap_elemdescr=>describe_by_data( wa_tabdescr-name ). wa_fieldcat-intlen = lr_elem_descr->output_length. wa_fieldcat-fieldname = wa_tabdescr-name . wa_fieldcat-datatype = wa_tabdescr-type_kind. wa_fieldcat-inttype = wa_tabdescr-type_kind. * wa_fieldcat-...