Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Inserting dynamic internal table inside table field

Former Member
0 Likes
411

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 ?

2 REPLIES 2
Read only

Former Member
0 Likes
380

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

Read only

0 Likes
380

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.