‎2006 Sep 11 5:43 AM
Hi,
Could u pls explain the concept of memory id from scratch and how do they work with reference to export n import!!
Regards
Gunjan
‎2006 Sep 11 6:45 AM
Hi Gunjan Kumar,
By seeing all the previous posts iam sure u ll be clear with what a memory ID means and how it is being used ...
here ... just an add on .....
In basic terms a memory ID signifies the ID (area/address-like) where the data is stored in the memory (ABAP memory / SAP memory) and whenever there is a need for the same data from the memory it can be retrieved by specifying the same ID ........
Cheers
Kripa Rangachari ...
‎2006 Sep 11 5:48 AM
Hi,
Memory ID refers to the use of ABAP Memory which is specific to an external session(window). When you have multiple sessions open, each of the concurrent sessions(windows) has it's own ABAP Memory.
ABAP Memory can thus, only be used to share data between internal sessions, that is programs/transactions that have been called by other programs/transactions in the same external session(window).
ABAP memory is cleared(and correspondingly all Memory IDs), when the session is deleted(window is closed), not when the transaction ends. The only exception to this rule when a transaction ends through the use of
LEAVE TO TRANSACTION
which is when the entire external session is flushed and the ABAP Memory is cleared.
basically there are 2 memory
SAP Memory and ABAP Memory
Sap memory.
set parameter/ get parameter
Abap memory
The EXPORT TO MEMORY and IMPORT FROM MEMORY
using this we can export data from one pgm & can use in another by importing is
http://www.sap-img.com/abap/difference-between-sap-and-abap-memory.htm
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e0435c111d1829f0000e829fbfe/content.htm
Regards,
ram
Pls reward points if helpful
Message was edited by: Ram Mohan Naidu Thammineni
‎2006 Sep 11 5:50 AM
check details from help..
Passing Data Using Internal Memory Areas
There are two cross-program memory areas to which ABAP programs have access (refer to the diagram in Memory Structures of an ABAP Program) that you can use to pass data between programs.
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 (see below).
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. For further information, refer to Data Clusters in ABAP Memory.
To Export the data from Report/ Program to ABAP Memory use
EXPORT <f> to memory id <g>.
To Import the data from ABAP Memory to Report/Program
use
IMPORT <f> from memory id <g>.
‎2006 Sep 11 5:54 AM
memory id maintain directly in table TPARA..
for more detail refer...
http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e0435c111d1829f0000e829fbfe/content.htm
‎2006 Sep 11 6:03 AM
Hi,
Hi,
Memory ID should be unique in both the programs ( Using Import and Export ). By Memory ID you refer a particular Cluster where the data is saved and used for Import/Export. Also make sure that the field names should be same in both Import and Export ( for eg. in the following program MATNR should be same in both programs and it should not be l_matnr and p_matnr in the 2 programs ).
<b>ZPROGRAM1.</b>
tables : indx.
Data : MATNR type MARA-MATNR,
indxkey LIKE indx-srtfd VALUE 'ZAB1'.
indx-aedat = sy-datum.
indx-usera = sy-uname.
indx-pgmid = sy-repid.
EXPORT MATNR TO DATABASE indx(zc) ID indxkey.
In another program,
<b>ZPROGRAM2.</b>
tables : indx.
Data : MATNR type MARA-MATNR,
indxkey LIKE indx-srtfd VALUE 'ZAB1'.
indx-aedat = sy-datum.
indx-usera = sy-uname.
indx-pgmid = sy-repid.
IMPORT MATNR FROM DATABASE indx(zc) ID indxkey.
Best regards,
Prashant
‎2006 Sep 11 6:45 AM
Hi Gunjan Kumar,
By seeing all the previous posts iam sure u ll be clear with what a memory ID means and how it is being used ...
here ... just an add on .....
In basic terms a memory ID signifies the ID (area/address-like) where the data is stored in the memory (ABAP memory / SAP memory) and whenever there is a need for the same data from the memory it can be retrieved by specifying the same ID ........
Cheers
Kripa Rangachari ...