‎2009 Mar 27 11:22 PM
Hi Gurus,
I know it is possible create internal tables and structures like this internal table.. but...
Is it possible create a variable dinamically in ABAP program???
Thanks in advance.
‎2009 Mar 28 3:16 AM
‎2009 Mar 28 5:20 AM
Yes.
DATA lp_data TYPE REF TO DATA.
FIELD-SYMBOLS: <FS>.
CONSTANTS c_type TYPE c LENGTH 1 VALUE 'F'.
CREATE DATA lp_data TYPE (c_type).
ASSIGN lp_data->* TO <FS>.The field symbol is now a floating point variable. You can have any type, and also construct your own types dynamically, using the RTTS (search for info).
You can also create internal tables dynamically by building on these techniques.
‎2009 Mar 28 5:32 AM
Hi,
Yes. You can also make use of the class CL_ABAP_DATADESCR to create a new variable at runtime
Regards,
Siddarth
‎2009 Mar 28 5:56 AM