‎2015 Sep 23 9:02 AM
Hi Experts,
How is it can I populate the table on the fly?. The only input available for me is the table name.
‎2015 Sep 23 9:13 AM
Hello Chirag,
You can use program: RSTABLESIZE
Determine SAP Table Size via Program RSTABLESIZE | SAPBASISINFO
Regards,
Hitesh
‎2015 Sep 23 10:51 AM
I think you have misunderstood the problem. I want to fill entries into an internal table of the type mentioned by the user during the execution itself. For eg. if the table entered is 'spfli' then the program should generate an internal table for 'spfli' and fill random details into it.
‎2015 Sep 23 11:01 AM
Some classic code as
DATA: itab TYPE REF TO data.
FIELD-SYMBOLS: <itab> TYPE STANDARD TABLE.
CREATE DATA itab TYPE TABLE OF (tablename).
ASSIGN itab->* TO <itab>.
But for "random detail" in the itab, be creative
Hint: for SPLFI, SFLIGHT, and the like, look at report SAPBC_DATA_GENERATOR
Regards,
Raymond
‎2015 Sep 23 11:14 AM
Hi Chirag,
Ok...
you can make use of field symbls as dynamic.
you can use link:-
Create table structure dynamically
Regards,
Hitesh
‎2015 Sep 23 11:28 AM
Dear Chiraz,
For generating the ALV for any table.
parameter table_name type char30.
start-of-selection
data lr_Data type ref to data.
field-symbol <fs> type standard table.
create data lr_data type ref to (table_name) . " this is the input table name.
assign lr_data->* to <fs>. " This will create your internal table.
select * from (table_name) into table <fs> up to 20 rows.
Now you can call the FM GRID_DISPLAY.
Thanks and Regards,
Nishant