‎2010 Jun 07 10:11 AM
Hello Experts,
I have an internal table. Internal table contains one filed whcih is NAME and NAME contains some FILED NAME like: NAME2, STRAS, LAND1, STATE etc.
I want to create one structure in runt time and structure fileds should be internal table field name.
Dynamicly i want to create.
So how can i create?
Regards,
Ranveer
‎2010 Jun 07 11:39 AM
DATA: dy_table TYPE REF TO data.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = gt_fcat[] " fieldcatalog with your specific structure
IMPORTING
ep_table = dy_table. " your internal table which is created in runtime
" now you need to create a line or structure
‎2010 Jun 07 11:44 AM
>
> I want to create one structure in runt time and structure fields should be internal table field name.
Very well. But what about the data types of these fields, where is it defined ?
‎2010 Jun 07 11:46 AM
‎2010 Jun 07 2:48 PM
well, first you need to fill the fieldcatalog. then you will get a dynamic itab. Once you get your dinamic itab you need to create a structure.
DAta : ls_itab like line of gt_itab " which is you get a min ago dynamically.
I didn't write down all the coding coz I wanted to give you a clue so you can find it on your own.
thanks, and it works believe me.