‎2008 Jul 09 11:15 AM
Hi all,
Is there any method which can create an internal table with the given name and type?
for example:
i want an internal table to be created dynamically with the name "itab_1" and type "typ_itab".
i cant declare the internal table statically because the name of the internal table is dynamic
it ca be itab_1 or itab_2 or... itab_n.
thanks in advance
hyma
‎2008 Jul 09 11:30 AM
tables:
spfli.
Macro definition
define declare_table .
data:
&1 type standard table of &2 with header line.
end-of-definition.
Dynamic Itab names and Field names
declare_table ITAB1 SPFLI.
can perform operations on ITAB1
clear itab1.
append itab1.
‎2008 Jul 09 11:30 AM
tables:
spfli.
Macro definition
define declare_table .
data:
&1 type standard table of &2 with header line.
end-of-definition.
Dynamic Itab names and Field names
declare_table ITAB1 SPFLI.
can perform operations on ITAB1
clear itab1.
append itab1.
‎2008 Jul 09 11:41 AM
Use this METHOD.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fieldcat
IMPORTING
ep_table = new_table.
Regards,
Rajasekhar Reddy.