‎2012 Dec 04 12:49 PM
******************************************************************************************************************
report zxy_0002 .
data: it001 type table of t001 with header line.
select * into table it001 from t001.
export it001 = it001 to memory id 'ZXY_TEST'.
clear it001. refresh it001.
import it001 = it001 from memory id 'ZXY_TEST'.
loop at it001.
write:/ it001-bukrs, it001-butxt.
endloop.
******************************************************************************************************************
Hi abap experts,
I have gone through above small program abou abap memory from some study material.
i need few more explanation about memory id 'ZXY_TEST' where it locates?
how to see whether the memory id ZXY_TEST has the data or not?
‎2012 Dec 04 12:58 PM
This memory exists when till the user logged off the system(within the same session) . and when the user logs out of the system this will be cleared. This feature is use full serving as the communication channel from one program to another. Read this topic in help.sap.com for further explanation.
http://help.sap.com/saphelp_46c/helpdata/en/9f/db9df735c111d1829f0000e829fbfe/content.htm
‎2012 Dec 05 3:13 PM
Hi aswatha narayana,
thanks for quik response,
export it001 = it001 to memory id 'ZXY_TEST'.
above statement meaning is passing the it001 data to a memory location area called 'ZXY_TEST' .
It is true or false?
‎2012 Dec 06 4:38 AM
Yes it stores the value of it001 in ZXY_TEST named memory id in abap memory still the session that user logged on exists. Within that time you can access this value in any program within the same session.
thanks.
‎2012 Dec 06 11:03 AM
‎2012 Dec 04 5:22 PM
Clear it001[]. (refresh is an obsolete keyword!).
import it001 = it001 from memory id 'ZXY_TEST'. "also an obsolete usage
if lines( it001 ) > 0.
* the export was successful and passed data to a memory tag in the user context, because you were able to retrieve it from the memory id tag.
endif.
It is only available to that user, so this is not a good solution. Additionally, if you run SLIN on your code, you will see (if you are in current SAP versions) that your usage is obsolete.
See SAP's documentation of "shared objects" for better ways to share data, including ABAP Memory, transactions named like SHM*, and how to use INDX-like tables to efficiently store data to be used by any program, any user, on any app server within the instance.
‎2012 Dec 05 3:51 PM
Hi David Lindsey ,
thanks for quik response,
export it001 = it001 to memory id 'ZXY_TEST'.
above statement meaning is passing the it001 data to a memory location area called 'ZXY_TEST' .
It is true or false?
‎2012 Dec 06 11:25 AM
Its always better to clear the SAP Memeory once the usage is done.Other wise it will harm your performance by a lot And Till the next login of yours intlo the system it will be stored in the ABAP memory.
Thnaks,
Vijay.
‎2012 Dec 06 11:46 AM
Hi,
for in depth ABAP memory management
you need to learn something about garbage collection.
hope this is useful for you.
Avirat