‎2009 May 01 12:12 PM
Hi all,
I have an internal table declared with a table structure inside it. i have the declration as below
DATA: begin of itab1,
field1,
field2,
end of itab1.
begin of Itab2,
field3
itab type table of itab1
end of itab2.
Now how will i access filed1 of Itab1 from itab2 ?? what is the syntax for it.
I tried itab2-itab1-field1 but it gives me a error.
Regards,
Bharath
‎2009 May 01 12:24 PM
Hi,
Instead of declaring a new table type and extending memory with the same records, you can do it this way also...
loop at itab2-itab into itab1.
write itab1-field1.
write itab1-field2.
endloop.Regards,
Siddarth
‎2009 May 01 12:19 PM
Hi,
DATA: begin of itab1,
field1,
field2,
end of itab1.
begin of Itab2,
field3
itab type table of itab1
end of itab2.
DATA : itab3 type table of itab1.
" Declare the internal of type itab1and pass the itab2-itab data to itab3 and process itab3.
itab3[] = itab2-itab[]
LOOP AT ITAB3 INTO ITAB1.
WRITE:/ ITAB1-FIELD1.
ENDLOOP.
‎2009 May 01 12:24 PM
Hi,
Instead of declaring a new table type and extending memory with the same records, you can do it this way also...
loop at itab2-itab into itab1.
write itab1-field1.
write itab1-field2.
endloop.Regards,
Siddarth
‎2009 May 01 12:59 PM