REPORT ZARA026.
TABLES:INDX.
DATA:GT_ITAB TYPE TABLE OF SFLIGHT.
DATA REPORT TYPE SY-REPID.
SELECT *
FROM SFLIGHT
INTO TABLE GT_ITAB
UP TO 5 ROWS.
EXPORT GT_ITAB TO DATABASE INDX(ZK) ID 'ZARA'.
REPORT = 'ZARA027'.
SUBMIT (REPORT) AND RETURN.
-----------------------------------------------------------------------
REPORT ZARA027.
TABLES:INDX.
DATA:GT_ITAB TYPE TABLE OF SFLIGHT.
DATA:WA LIKE LINE OF GT_ITAB.
IMPORT GT_ITAB FROM DATABASE INDX(ZK) ID 'ZARA'.
DELETE FROM DATABASE INDX(ZK) ID 'ZARA'.
LOOP AT GT_ITAB INTO WA.
WRITE:/ WA-CARRID.
ENDLOOP.
如果不写 DELETE FROM DATABASE INDX(ZK) ID 'ZARA'.的话
SAP上的所有用户都会用到此数据。