‎2010 Sep 06 11:20 AM
Dear Gurus,
I have an internal table with the data as discribed below:
internal Name iteration_value
val0000 abcd 1000
val0000 efgh 2000
val0000 ijkl 3000
val0015 abcd 2500
val0015 efgh 3000
val0015 ijkl 2350
val0030 abcd 2000
val0030 efgh 2500
val0030 ijkl 2000
'
'
'
'
' and so on
i need it in a format :
interval ABCD EFGH IJKL
val0000 1000 2000 3000
val0015 2500 3000 2350
val0030 2000 2500 2000
'
'
'
'and so on.
please help how can i achieve the above functionality.
it is also possible that the names increase in number ie. now i have names as ABCD,EFGH,IJKL,MNOP and QRST the name is defined at runtime.
please advice how to achieve the above logic.
Regards,
Ankit Bajaj
‎2010 Sep 06 12:19 PM
Hi Ankit,
Use dynamic internal table for your requirement use call method cl_alv_table_create=>create_dynamic_table to do it.
For this you have to sort your internal table and sort it based on the NAME.
now for each name you have to add a filed in dynamic field catalog table. now pass this catalog table to this method and your table is ready.
After that you should read the value of your internal table value to dynamic internal table based on (put AT LAST on internal field).
Regards
Dhirendra
‎2010 Sep 06 11:35 AM
‎2010 Sep 06 12:19 PM
Hi Ankit,
Use dynamic internal table for your requirement use call method cl_alv_table_create=>create_dynamic_table to do it.
For this you have to sort your internal table and sort it based on the NAME.
now for each name you have to add a filed in dynamic field catalog table. now pass this catalog table to this method and your table is ready.
After that you should read the value of your internal table value to dynamic internal table based on (put AT LAST on internal field).
Regards
Dhirendra