Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ABAP Memory ID

Former Member
0 Kudos

Hi All,

Is the ABAP memory ID global?

for example, I have FUNC1, in FUNC1, I export value to memory ID 'ABC'. the value of 'ABC' is valide for all other function call?

The porblem I experinced is that the FUNC1 may called by many interface at the SAME time, and because the memory ID id "global", it may cause problem.

Thanks,

2 REPLIES 2

Former Member
0 Kudos

If you look at the documentation of the 'EXPORT' statement, you will see that data is stored in the ABAP memory not in SAP global memory. See below for an extract of the documentation.

-


Stores a data cluster in ABAP memory. The specified objects obj1 ... objn (fields, structures, complex structures, or tables) are stored as one cluster in ABAP memory.

If you call a transaction, an executable program, or a dialog module in call mode ( CALL TRANSACTION, SUBMIT, CALL DIALOG), the ABAP memory is retained, even over several call levels. The called transaction can import the data from ABAP memory using IMPORT ... FROM MEMORY. Each new EXPORT ... TO MEMORY overwrites the old data in ABAP memory. You cannot therefore append to data already in the ABAP memory.

When you leave the lowest level of the call chain, the ABAP memory is released.

-


SAP and ABAP/4 Memory

There is a difference between the cross-transaction SAP memory and the transaction-specific ABAP/4 memory.

SAP memory

The SAP memory, otherwise known as the global memory, is available to a user during the entire duration of a terminal session. Its contents are retained across transaction boundaries as well as external and internal sessions. The SET PARAMETER and GET PARAMETER statements allow you to write to, or read from, the SAP memory.

ABAP/4 memory

The contents of the ABAP/4 memory are retained only during the lifetime of an external session (see also Organization of Modularization Units). You can retain or pass data across internal sessions. The EXPORT TO MEMORY and IMPORT FROM MEMORY statements allow you to write data to, or read data from, the ABAP memory.

Please consult Data Area and Modularization Unit Organization documentation as well.

and Memory Structures of an ABAP Program

-


So, just based on this, your problem may not be related to the export statement or the import statement.

Are you making multiple function calls from the same program/transaction? In this case there is a chance of the memory getting overlaid. But if different people are using the transaction/program at the same time, but the function call is just once in the program/transaction, then you should not have this issue.

Srinivas

0 Kudos

Hi Srinivas,

Thanks a lot for your reply.

Back to your reply "Are you making multiple function calls from the same program/transaction?" Yes we do.

but if those calles are in serial order (finish one call, then trigger the second), we should OK based on the nature of ABAP memory, righ?

Thanks,

Xiaodi