Accessing Table Data from SAP System



Using Select statement you can read data with a dynamic table name. Try using below code &are

DATA: lv_tablename TYPE string,
   ev_filelength TYPE i.
lv_tablename = 'mara'. "e.g. a parameter
DATA dref TYPE REF TO data.
CREATE DATA dref TYPE TABLE OF (lv_tablename).
FIELD-SYMBOLS: <wa> TYPE ANY TABLE.
ASSIGN dref->* to <wa>.
SELECT * FROM (lv_tablename) INTO TABLE <wa>.


Updated on: 2020-02-14T11:28:35+05:30

552 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements