‎2008 Oct 29 9:40 AM
I have a function module that receives a table name, in a character variable.
How do I create a variable, within the function, of the type of the parameter-passed table ?
I've been trying with field-symbols and create data, but without success.
Could anyone show me an example please?
Thanks
Avraham
‎2008 Oct 29 9:44 AM
HI,
I think u need the data element to pass the table name
if so try this
TABNAME16
this is the data element used for table names.
Regards,
Venkatesh
‎2008 Oct 29 9:51 AM
I'm sorry, I do receive the table name in a variable of type
DD02D-TABNAME, not in a char variable. How does it help me, anyways.
‎2008 Oct 29 10:17 AM
Hi Avraham,
maybe this helps:
data: lt_table type ref to data.
create data lt_table type standard table of ('SFLIGHT').With create data you can achieve what you need.
Then analyze the fields in the table and use it with that information.
here you will want to look at classes cl_abap_typedescr, cl_abap_tabledescr and cl_abap_structdescr.
Hope that helps,
Lutz
Edited by: Lutz Morrien on Oct 29, 2008 11:18 AM