‎2009 Jul 27 8:20 AM
Hi,
I have a table which has a field(which can have a table inside). The internal table has declared as follows:
types:begin of test,
dyn_table TYPE ref to data occurs 0,
end if test.
data:itab type standard table of test.
Now my requirement is to fill one dynamic internal table inside dyn_table each time. I have declared the dynamic internal table as follow:
<gfs_tab> TYPE STANDARD TABLE.
Please help me how to move <gfs_tab> into dyn_table ?
‎2009 Jul 27 8:32 AM
hi,
Do as follows:-
Declare a field symbols of type any table.
FIELD-SYMBOLS : <y_f_cell_tab_field> type any table.
LOOP AT ITAB assigning <WA>.
ASSIGN COMPONENT 'DYN_TABLE' of STRUCTURE <WA> to <y_f_cell_tab_field>.
If <y_f_cell_tab_field> is assigned.
INSERT LINES OF <gfs_tab> INTO TABLE <y_f_cell_tab_field>.
ENDIF.
UNASSIGN : <y_f_cell_tab_field>.
ENDLOOP.Regards,
Ankur Parab
Edited by: Ankur Parab on Jul 27, 2009 1:02 PM
Edited by: Ankur Parab on Jul 27, 2009 1:03 PM
‎2009 Jul 27 10:17 AM
Hi,
This won't work.Becasue the the dynamic internal table has some set of fields and data.So types are different.I tried and it is not working.