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

ABAP AND SAP MEMORY

Former Member
0 Likes
769

HI Friends,

Need a help from you!!!!!!!!!

Can you plz give me an example for ABAP memory when i want to pass data between two internal sessions. And also can you give example program for SAP memory that how to pass data from one program to another within a session, or to pass data from one session to another.

your answer will we given point!!!!!!!!!!!!!!!!

Advance Thanks,

Chandra.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
742

hi,

ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data

to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.

ABAP memory is temporary and values are retained in same LUW.

export itab to memory id 'TEST'.

import itab from memory Id 'TEST'.

Here itab should be declared of same type and length.

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

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

SAP Memory

SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens

ABAP/4 Memory

ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data

to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.

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.

A simple example of ABAP memory is using the EXPORT/IMPORT statements.

Here in this program, I get the data, export it to memory,

clear out the internal table in my progam, then reimport the data into it and write out the data.

You probably wounldn't do this in a normal program,

but this is how you can pass data from program a to program b when A Submits program B.

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.

SAP Memory

SAP memory is a memory area to which all main sessions within a SAPgui have access.

You can use SAP memory either to pass data from one program to another within a session,

or to pass data from one session to another.

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

These parameters can be set either for a particular user

or for a particular program using the SET PARAMETER statement.

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

The most frequent use of SPA/GPA parameters is to fill input fields on screens

ABAP/4 Memory

ABAP memory is a memory area that all ABAP programs within the same internal session can access

using the EXPORT and IMPORT statements.

Data within this area remains intact during a whole sequence of program calls. To pass data

to a program which you are calling,

the data needs to be placed in ABAP memory before the call is made.

The internal session of the called program then replaces that of the calling program.

The program called can then read from the ABAP memory.

If control is then returned to the program which made the initial call, the same process operates in reverse.

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.

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

SAP global memomy retains field value through out

session.

set parameter id 'MAT' field v_matnr.

get parameter id 'MAT' field v_matnr.

they are stored in table TPARA.

ABAP memory is temporary and values are retained

in same LUW.

export itab to memory id 'TeST'.

import itab from memory Id 'TEST'.

here itab should be declared of same type and

length.

progaram A

export itab to memory id 'TeST'.

program B

import itab from memory Id 'TEST'.

value of itab is not retained in program b since

they are not in same LUW.

program A

export itab to memory id 'TeST'.

SUBMIT rep and return

program B

import itab from memory Id 'TEST'.

value of itab are retained in program b since

they are in same LUW.

Within a main session, when ever you start an application program, it opens up an internal sessions with in the main session. The internal session has a memory area that contains the ABAP program and its associated data. So when ever you want to pass data between two internal sessions, then you can use ABAP Memory (i.e import, export).

When comes to SAP memory (also known as global memory), if the data has to be passed b/w two main sessions, we can use SAP Memory(SPA/GPA Parameters). SAP Memory can also be used to pass data b/w internal sessions.

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.

plz reward points if helpful..

HI Friends,

Need a help from you!!!!!!!!!

Can you plz give me an example for ABAP memory when i want to pass data between two internal sessions. And also can you give example program for SAP memory that how to pass data from one program to another within a session, or to pass data from one session to another.

your answer will we given point!!!!!!!!!!!!!!!!

Advance Thanks,

Chandra.

5 REPLIES 5
Read only

Former Member
0 Likes
742

Hi

Hope it will help you.

Pls reward if help.

SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens

SAP global memory retains field value through out session.

set parameter id 'MAT' field v_matnr.

get parameter id 'MAT' field v_matnr.

They are stored in table TPARA.

ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data

to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.

ABAP memory is temporary and values are retained in same LUW.

export itab to memory id 'TEST'.

import itab from memory Id 'TEST'.

Here itab should be declared of same type and length.

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

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

Read only

Former Member
0 Likes
742
Read only

Former Member
0 Likes
743

hi,

ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data

to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.

ABAP memory is temporary and values are retained in same LUW.

export itab to memory id 'TEST'.

import itab from memory Id 'TEST'.

Here itab should be declared of same type and length.

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

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

SAP Memory

SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens

ABAP/4 Memory

ABAP memory is a memory area that all ABAP programs within the same internal session can access using the EXPORT and IMPORT statements. Data within this area remains intact during a whole sequence of program calls. To pass data

to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse.

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.

A simple example of ABAP memory is using the EXPORT/IMPORT statements.

Here in this program, I get the data, export it to memory,

clear out the internal table in my progam, then reimport the data into it and write out the data.

You probably wounldn't do this in a normal program,

but this is how you can pass data from program a to program b when A Submits program B.

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.

SAP Memory

SAP memory is a memory area to which all main sessions within a SAPgui have access.

You can use SAP memory either to pass data from one program to another within a session,

or to pass data from one session to another.

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

These parameters can be set either for a particular user

or for a particular program using the SET PARAMETER statement.

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

The most frequent use of SPA/GPA parameters is to fill input fields on screens

ABAP/4 Memory

ABAP memory is a memory area that all ABAP programs within the same internal session can access

using the EXPORT and IMPORT statements.

Data within this area remains intact during a whole sequence of program calls. To pass data

to a program which you are calling,

the data needs to be placed in ABAP memory before the call is made.

The internal session of the called program then replaces that of the calling program.

The program called can then read from the ABAP memory.

If control is then returned to the program which made the initial call, the same process operates in reverse.

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.

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

SAP global memomy retains field value through out

session.

set parameter id 'MAT' field v_matnr.

get parameter id 'MAT' field v_matnr.

they are stored in table TPARA.

ABAP memory is temporary and values are retained

in same LUW.

export itab to memory id 'TeST'.

import itab from memory Id 'TEST'.

here itab should be declared of same type and

length.

progaram A

export itab to memory id 'TeST'.

program B

import itab from memory Id 'TEST'.

value of itab is not retained in program b since

they are not in same LUW.

program A

export itab to memory id 'TeST'.

SUBMIT rep and return

program B

import itab from memory Id 'TEST'.

value of itab are retained in program b since

they are in same LUW.

Within a main session, when ever you start an application program, it opens up an internal sessions with in the main session. The internal session has a memory area that contains the ABAP program and its associated data. So when ever you want to pass data between two internal sessions, then you can use ABAP Memory (i.e import, export).

When comes to SAP memory (also known as global memory), if the data has to be passed b/w two main sessions, we can use SAP Memory(SPA/GPA Parameters). SAP Memory can also be used to pass data b/w internal sessions.

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.

plz reward points if helpful..

Read only

Former Member
0 Likes
742

Units that can be called externally are

ABAP Programs, Procedures and Screens & Screen Sequences.

ABAP Executable Programs (Type E):

SUBMIT...

The system terminates the calling program and calls the new executable program. The internal session of the calling program is replaced by the internal session of the new program. When the new program has finished, control returns to the point from which the calling program was started.

SUBMIT...AND RETURN...

With the addition of AND RETURN with the submit statement, the executable program is started in a new new session. The internal session of the calling program is returned, and control returns to the calling program after the new program has finished.

ABAP Screen Programs (Type M)

LEAVE TO TRANSACTION <tcode> ...

or

CALL TRANSACTION <tcode> ...

The program starts by processing the screen that you specified when you defined the transaction code. This is called the initial screen.

If you use LEAVE TO TRANSACTION, the calling program terminates, and its internal session is replaced by the internal session of the new program. When the new program has finished, control returns to the point from which the calling program was started.

If you use CALL TRANSACTION, the calling program is started in a new internal session, and the internal session of the calling program is retained. When the new program has finished, control returns to the point from which the calling program was started.

Read only

Former Member
0 Likes
742

HI

SAP Memory

SAP memory is a memory area to which all main sessions within a SAPgui have access. You can use SAP memory either to pass data from one program to another within a session, or to pass data from one session to another. Application programs that use SAP memory must do so using SPA/GPA parameters (also known as SET/GET parameters). These parameters can be set either for a particular user or for a particular program using the SET PARAMETER statement. Other ABAP programs can then retrieve the set parameters using the GET PARAMETER statement. The most frequent use of SPA/GPA parameters is to fill input fields on screens

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. Data within this area remains intact during a whole sequence of program calls. To pass data to a program which you are calling, the data needs to be placed in ABAP memory before the call is made. The internal session of the called program then replaces that of the calling program. The program called can then read from the ABAP memory. If control is then returned to the program which made the initial call, the same process operates in reverse