0% found this document useful (0 votes)
32 views3 pages

Memory Mangment Notes

Uploaded by

srsatapathy087
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views3 pages

Memory Mangment Notes

Uploaded by

srsatapathy087
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

1.

Types Of Memory

• Sap memory/shared memory


• User memory
• Abap memory

2. User memory

User Memory is the memory that is allocated for each user who is logged in. A user session is
assigned its own memory area of the user memory, in which SPA/GPA parameters can be
stored.SPA/GPA parameters are set using SET PARAMETER and read using GET
PARAMETER.

3. Abap memory
ABAP memory is a memory area that all ABAP programs within the same internal session
can access using the EXPORT and IMPORT statements.
External session: - when user logs on to R/3 system, the system Creates a new terminal session called
external session. E.g. System Session.
Internal session: - created by calling a transaction (with CALL TRANSACTION), a dialog module (with
CALL DIALOG) or a report (with SUBMIT or RETURN).

SUBMIT Keyword

SUBMIT is a keyword which is used to call a executable program (ABAP program) from another
program.

EXPORT is a keyword which is used to export a value to a memory id.

IMPORT is a keyword which is used to import a value from a memory id .

********************************************************************************

EXAMPLE:
REPORT YSP_0137 .
DATA : NAME2(10) TYPE C. IMPORT NAME1 TO NAME2 FROM MEMORY ID 'MEM1'. WRITE
NAME2.

***********ABAP MEMORY - with export and import parameters****************


REPORT ZPGM1.
data : text1 type char20 value 'export and import'.
export text1
text2 from 'ex and im' to memory id 'MEM'.

SUBMIT ZPGM2 AND RETURN.


REPORT ZPGM2.
DATA : T1 TYPE CHAR20.
DATA : T2 TYPE CHAR20.
IMPORT TEXT1 TO T1 FROM MEMORY ID 'MEM'.
IMPORT TEXT2 TO T2 FROM MEMORY ID 'MEM'.
WRITE :/ T1.
WRITE :/ T2.

****************************OUTPUT **************
export and import
ex and im
***********************************************************************************
4. SAP MEMORY

o SAP memory is global memory, all SAP GUI sessions have access.

o SAP memory either to pass data from one program to another within a session, or to pass data
from one session to another.

o Application programs that use SAP memory must do so using SPA/GPA parameters (also
known as SET/GET parameters).

o These parameters can be set either for a particular user or for a particular program using the
SET PARAMETER statement.

o Other ABAP programs can then retrieve the set parameters using the GET PARAMETER
statement.

EXAMPLE:
DATA TEXT1(30) TYPE C VALUE 'SET AND GET PARAMETER'.
SET PARAMETER ID 'MEM' FIELD TEXT1.

WRITE : 'SET PARAMETER'.


*************************************************
REPORT YSP_0139 .
DATA TEXT2(30) TYPE C .
GET PARAMETER ID 'MEM' FIELD TEXT2.
WRITE : / TEXT2.
WRITE : 'GET PARAMETER'.

5. Difference Between Sap Memory And ABAP Memory

SAP Memory ABAP Memory


SAP memory is global memory, all SAP GUI ABAP memory is local memory, all programs within a
sessions have access. session can have access.
SAP memory is a memory area, which can be ABAP memory is a memory area, which can be accessed
accessible by all SAP GUI sessions. By using SAP by all ABAP programs with in internal session, these data
memory we can share data between sessions as well sharing can be processed by using EXPORT/IMPORT
as SAP programs. statements. To pass data from a program to another
program we have to fill a memory id using EXPORT and
can be imported by using IMPORT .
The data can be exchanged by using GET/SET The data can be exchanged by using EXPORT/IMPORT
parameters. parameters.
These parameters can be set either for a particular The most frequent use of EXPORT/IMPORT parameters
user or for a particular program using the SET is to share data between programs.
PARAMETER statement. Other ABAP programs
can then retrieve the set parameters using the GET
PARAMETER statement. The most frequent use of
SET/GET parameters is to fill screen fields .

You might also like