2016年7月3日 星期日

ABAP EXPORT IMPORT MEMORY ID

*second program to store data to  memory
REPORT  ZII_MEMORIES01.
START-OF-SELECTION.
SELECT *  FROM ZII_TCURT INTO TABLE CURR_TAB.
EXPORT CURR_TAB TO MEMORY ID 'CTAB'.
SUBMIT ZII_MEMORIES02 AND RETURN.
MESSAGE S036(ZII_MC01). 
*second program to retrive data from memory
REPORT  ZII_MEMORIES02.
DATA: CURR_TB TYPE STANDARD TABLE OF ZII_TCURT WITH HEADER LINE.
START-OF-SELECTION.
IMPORT CURR_TAB TO CURR_TB FROM MEMORY ID 'CTAB'.
LOOP AT CURR_TB.
 WRITE:/5(4) SY-TABIX, CURR_TB-WAERS, CURR_TB-LTEXT.
ENDLOOP.