Skip to Content
0
Former Member
Jan 08, 2008 at 08:40 AM

EXPORT - IMPORT from SAP Memory

325 Views

hi,

I have to code in two methods belonging to the same class. An internal table is to be passed from one method to the other.

I am using EXPORT - IMPORT . But it is not working. Can you tellme, where i am going wrong?

Method 1:

CONCATENATE 'memory1' sy-datum INTO v_memoryloc1.

CONCATENATE 'memory2' sy-datum INTO v_memoryloc2.

delete from MEMORY ID v_memoryloc1.

delete from MEMORY ID v_memoryloc2.

EXPORT v_mem FROM v_exitflag TO MEMORY ID v_memoryloc1.

EXPORT v_memory FROM it_output TO MEMORY ID v_memoryloc2.

Method 2:

CONCATENATE 'memory1' sy-datum INTO v_memoryloc1.

CONCATENATE 'memory2' sy-datum INTO v_memoryloc2.

IMPORT v_mem TO v_exitflag FROM MEMORY ID v_memoryloc1.

IMPORT v_memory TO it_output FROM MEMORY ID

v_memoryloc2.

DELETE FROM MEMORY ID v_memoryloc1.

DELETE FROM MEMORY ID v_memoryloc2.