Application Development and Automation 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: 
Read only

diff between sap memory and abap memory

Former Member
0 Likes
527

hi,

actually i want to know about the difference between sap memory and abap memory..

thanks in advance,

jj

3 REPLIES 3
Read only

seshatalpasai_madala
Product and Topic Expert
Product and Topic Expert
0 Likes
506

Hi,

The difference is SAP memory is for sharing across External Sessions (One Main Window) Where as ABAP memory is for sharing between internal sessions of an external session.

1. SAP memory is for cross-transaction Applications and ABAP/4 memory is transaction-specific.

2. 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 contents of the ABAP/4 memory are retained only during the lifetime of an external session. You can retain or pass data across internal sessions.

3. The SET PARAMETER and GET PARAMETER statements allow you to write to, or read from, the SAP memory. The EXPORT TO MEMORY and IMPORT FROM MEMORY statements allow you to write data to, or read data from, the ABAP memory.

External session: - when user logs on to R/3 system, the system Create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).

For External Sessions, Internal Sessions are available.

SAP Memory is a global memory area which all sessions within a

SAPgui have access to. This allows for passing data between

sessions. The SET PARAMETER ID and GET PARAMETER ID statements are

used to manipulate the SAP Memory.

SET PARAMETER ID 'MAT' field p_matnr.

GET PARAMETER ID 'MAT' field p_matnr.

ABAP Memory is a memory area which all programs in the call stack within the same internal session can access. The EXPORT and IMPORT

statements are used here.

export p_matnr = p_matnr to memory id 'ZTESTMAT'.

import p_matnr = p_matnr from memory id 'ZTESTMAT'.

In short

ABAP memory -


> Memory related to that particular session

SAP memory -


> memory related to all sessions

ABAP Memmory & SAP Memmory

http://www.sap-img.com/abap/difference-between-sap-and-abap-memory.htm

http://www.sap-img.com/abap/type-and-uses-of-lock-objects-in-sap.htm

Set

http://www.geocities.com/SiliconValley/Campus/6345/set_para.htm

GET

http://www.geocities.com/SiliconValley/Campus/6345/get_para.htm

EXPORT

http://www.geocities.com/SiliconValley/Campus/6345/export01.htm

Other Imp Help

http://www.geocities.com/SiliconValley/Campus/6345/abapindx.htm

Regards,

Sesh

Read only

Former Member
0 Likes
506

<u><b>ABAP Memory</b></u>

Memory area within every main session, which the programs with the statements EXPORT and IMPORT can access. This memory area is maintained via a succession of program calls (call sequence).

<u><b>SAP Memory</b></u>

Memory area of application server, which all main sessions of a user session access jointly. ABAP programs have access to SPA/GPA parameters stored in the SAP memory.

give point if helpful

regards

debjani

Read only

Former Member
0 Likes
506

Hi,

SAP and ABAP Memory

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

Global SAP memory

The global SAP 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.

Input fields on screens can be linked with parameters in the SAP memory, which allows you to preassign values to the input fields on initial screens.

With general screens, the linking takes place during the definition of the screen using the Screen Painter tool. When setting the field attributes of an input field, you can specify the ID of an SPA/GPA parameter in the Parameter-ID attribute. In the checkboxes SET Parameter and GET Parameter you can specify whether the screen field is filled with the value of the SPA/GPA parameter at the time of PBO or whether the SPA/GPA parameter is filled with the user input on the screen at the time of PAI.

With selection screens, the linking is carried out using the MEMORY ID addition to the PARAMETERS or SELECT-OPTIONS statement. If you specify an SPA/GPA parameter ID, when declaring a parameter or selection criterion, the relevant input field is linked with the parameter.

Local SAP memory

The local SAP memory is available to the user throughout a transaction, within which you can also call other program units, for example using SUBMIT or CALL TRANSACTION. With SET PARAMETER you write to both the global and the local SAP memory. If the global SAP memory is changed by an external mode of the same user, the local SAP memory remains unchanged. This ensures that parameters set in the frame of a transaction remain unchanged until the end of this transaction. The local SAP memory is deleted after the transaction is ended.

ABAP memory

The contents of the ABAP 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

<b>Reward points</b>

Regards