Skip to Content
Former Member
Jul 28, 2008 at 08:00 PM

create dynamic table assigning field symbol problem


Hi floks,

i declared dynamic tyble and got structure . but when i going to assigning data from work area ti internal table i am getting error . igiven below code and error . please help me out . how to assign it and how to get back to it internal table or out put..

ref_table_des ?=

cl_abap_typedescr=>describe_by_name( 'YPPLAN_DOWNL_UPL_STRUCT1' ).

idetails[] = ref_table_des->components[].

loop at idetails into xdetails.

clear xfc.

xfc-fieldname = xdetails-name .

xfc-datatype = xdetails-type_kind.

xfc-inttype = xdetails-type_kind.

xfc-intlen = xdetails-length.

xfc-decimals = xdetails-decimals.

append xfc to ifc.


call method cl_alv_table_create=>create_dynamic_table


it_fieldcatalog = ifc


ep_table = dy_table.

assign dy_table->* to <gt_output_dy>.

assign dy_table->* to <gt_imp_exp>.

create data dy_line like line of <gt_output_dy>.

assign dy_line->* to <fs_output>.

LOOP AT <gt_output_dy> ASSIGNING <fs_output>.

wa_matnr_list-matnr = <fs_output>-matnr.

wa_matnr_list-werks = <fs_output>-werks.

IF wa_matnr_list-matnr CO '0123456789. '.

SHIFT wa_matnr_list-matnr RIGHT DELETING TRAILING space.

OVERLAY wa_matnr_list-matnr WITH lpad18.


APPEND wa_matnr_list TO it_matnr_list.


+Error: The data object "<FS_OUTPUT>" has no structure and therefore no component called "MATNR".


thanks ,

Sunitha +

Edited by: Julius Bussche on Jul 28, 2008 9:34 PM