Skip to Content
0
Former Member
Mar 17, 2009 at 10:08 AM

Problem in assigning field symbol to a nested internal table

239 Views

Hi All,

I have searched the forum but could not find a solution to this problem. I have a requirement where I need to define an internal table within an internal table, so I have used pointer within the outer internal table(itab2) which point to the inner table. However, I am facing problem while assigning the pointer.

data: begin of struct1 occurs 0,
        fld3(10) type C,
       end of struct1.
data: begin of itab2 occurs 0,
        fld1(10) type C,
        fld2(10) type C,
        p_inner like ref to struct1,
      end of itab2.
field-symbols <inner_table> type any.

I want to assign "itab2->p_inner->* " to "<inner_table>".

However, the following statement is Not working:

assign itab2->p_inner->* to <inner_table>.

I want to fill the values within fields fld1, fld2 and fld3 and append it in itab2.

The final table should be like:

ITAB2:
fld1    fld2    fld3
aa      bb      cc
                 dd
                 ee
11      22      33
                 44
                 55

I have tried many other ways too but could not suceed, please help.

Thanks,

Vishal.