Accessing table data from SAP system

SAP

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>.


raja
Published on 20-Dec-2017 12:06:36
Advertisements