‎2009 Feb 23 5:01 PM
Hi everyone.
I have a program with a deep internal table with the following structure:
DATE TIME VALUE_PROF
2/2 15:30
2/2 15:45
3/2 15:00
And VALUE_PROF has the following structure:
PROFILE VALUE
00000150 145.6
00000151 145.6
I need to show this data through an ALV Control. I have been thinking on how to make the catalog, but I couldn't figure it out. So I thought to move this table to another one with the following structure:
DATE TIME 00000150 0000151
2/2 15:30 145.6 145.6
3/2 15:30 145.7 145.7
And so on. How can I do this? I mean, how can I know how many columns will have the table? I can count the deep table's records, but how I translate it into the amount of columns?
‎2009 Feb 23 5:19 PM
Hi,
In the following link you will be able to get the Sample Code by using this you can create Dynamic Internal Table, May it will help you to solve out your problem, Test the Sample Code of Lakshman i have tested it is working fine may it will give you error when copy and past to your editor but you just need to comment out the commented lines.
Kind Regards,
Faisal
‎2009 Feb 23 5:19 PM
Hi,
In the following link you will be able to get the Sample Code by using this you can create Dynamic Internal Table, May it will help you to solve out your problem, Test the Sample Code of Lakshman i have tested it is working fine may it will give you error when copy and past to your editor but you just need to comment out the commented lines.
Kind Regards,
Faisal
‎2009 Feb 23 11:10 PM
Hi,
use this class to create an internal table dynamically
*TRY.
CALL METHOD cl_abap_tabledescr=>create
EXPORTING
p_line_type =
* p_table_kind = TABLEKIND_STD
* p_unique = ABAP_FALSE
* p_key =
* p_key_kind = KEYDEFKIND_DEFAULT
receiving
p_result =
.
* CATCH cx_sy_table_creation .
*ENDTRY.Regards,
Siddarth