‎2008 Mar 14 4:52 AM
Hi all,
i have an internal table ITAB. It may contain multiple records.
like
MC Code Level
A111 40
A111 35
A111 22
A111 10
etc...
the above table may contain more than 4 or any number of levels for that MC code(A111).
Now i need another internal table whose structure is
MC Code Level1 lev2 lev3 lev4 ...... lev.N
A111 10 22 35 40 xx
Here in the second internal table the fields are dynamic according to the first one.
(is it done trhough field symbols or etc)
Any one please tell me how to do this.
sekhar
‎2008 Mar 14 4:56 AM
Hello,
Your requirement can be easily met with the concept of dynamic internal tables.
There is lot of sample code available for dynamic internal on SDN .
Thanks,
Poonam.
‎2008 Mar 14 6:09 AM
HI can you please send me the links for dynamic internal tables
sekhar
‎2008 Mar 14 6:40 AM
Based on your requirement you need to build the fieldcatalog. and then create the dynamic table using the class cl_alv_table_create.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = lt_fieldcat
IMPORTING
ep_table = dref.
ASSIGN dref->* TO <ft_tab>.
now you need to populate the data using control break .
at end of the code. you append the data.
‎2008 Mar 14 6:20 AM
Hi,
You can check this thread
https://forums.sdn.sap.com/click.jspa?searchID=9748645&messageID=4676411
Thanks,
Poonam.