2006 Jan 10 10:23 PM
Hi Friends,
Can we declare an internal table in an other internal table as a field(part) of that?....
for eg:
data: begin of material_Data occurs 0,
vendor_na like lfa1-name1,
matno like mara-matnr,
...........................,
..........................,
begin of base_measures,
weight(15) like mara-brgew,
vol(12) like mara-volum,
end of base_measures,
sales_org like mvke-vkorg,
..........................,
end of material_Data.
in the above example, is the <b>base_measures</b> another internal table or not.............
plz clarify this........
thanks in advance.....
raj
2006 Jan 10 10:29 PM
that does not work as an internal table
but u can use that as a structure.
loop at material_data.
write 😕 material_data-base_measures-weight.
endloop.
u can use like this
Message was edited by: chandrasekhar jagarlamudi
2006 Jan 10 10:29 PM
that does not work as an internal table
but u can use that as a structure.
loop at material_data.
write 😕 material_data-base_measures-weight.
endloop.
u can use like this
Message was edited by: chandrasekhar jagarlamudi
2006 Jan 10 10:36 PM
Hi Chandrashekar.....
thanks for the response...
but actually in 1 report i have the code like that.....
so cld u tell me the base_measures is acting like an other internal table or something other......??/
thnks
rajk
2006 Jan 10 10:37 PM
It does not act like an internal table , but it acts like a structure in that internal table
similar to INCLUDE STRUCTURE
2006 Jan 10 10:43 PM
2006 Jan 11 2:53 AM
Raj,
You can very much have an internal table as a field of another internal table. These are called as Nested internal tables / Deep Strcutures. In this case for every row of the main internal, there might be multiple rows in the inner internal table. The structure might look something like
Main Table(
Field1
Field2
Inner_table type LVC_T_STYL)
I just took an example of LVC_T_STYL as it is a table type. So, now for every row in the Main table, you can have multiple row in the Inner_table.
Regards,
Ravi
Note : Please reward the posts that help you.