1

I wanted to know if it is possible to make the input parameter name as an internal table.

Please have a look in the snippet of the code. In this report I am trying to take p_dbtab as a table name then make an internal table i_temp of the type p_dbtab.

REPORT ZPRACTICDYNAMIC.

SELECTION-SCREEN BEGIN OF BLOCK 1.
   PARAMETERS:
     p_dbtab TYPE tabname DEFAULT 'FARR_D_FULFILLMT' OBLIGATORY.
SELECTION-SCREEN END   OF BLOCK 1.

DATA: it_tab TYPE STANDARD TABLE OF p_dbtab.
IanS
  • 15,771
  • 9
  • 60
  • 84
Ankit Chaurasia
  • 163
  • 2
  • 5
  • 14
  • Possible duplicate of [How to convert a structure to an internal table dynamically in ABAP](http://stackoverflow.com/questions/15235913/how-to-convert-a-structure-to-an-internal-table-dynamically-in-abap) – vwegert Apr 22 '17 at 11:34

1 Answers1

1

this will work:

data: rt_data type REF TO data.
PARAMETERS:  p_dbtab TYPE tabname   DEFAULT 'FARR_D_FULFILLMT'  OBLIGATORY.
FIELD-SYMBOLS: <t_data> type any TABLE.

CREATE DATA rt_data type STANDARD TABLE OF (p_dbtab).
assign rt_data->* to <t_data>.
macs
  • 38
  • 1
  • 6