2006 Nov 30 5:13 AM
Hi all,
I want to knw wht do u mean by memory id .Pls explain with the below eg.
SELECT-OPTIONS: lifnr FOR ekko-lifnr MEMORY ID lif,
2006 Nov 30 5:15 AM
hi,
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.
1. When u use memory id, make sure of the
following points.
a) The memory id is SAME as the variable name
b) Memory id should be in CAPITAL
c) When u want to import,
the variable name should be same as original one,
and should be declared in the same fashion only.
*----
for Z1
report abc.
DATA : PERNR LIKE P0001-PERNR.
PERNR = '00004556'.
EXPORT PERNR TO MEMORY ID 'PERNR'.
CALL TRANSACTION 'ZTR01'.
*-------- For Z2 (having tcode ZTR01)
report abc.
DATA : PERNR LIKE P0001-PERNR.
IMPORT PERNR FROM MEMORY ID 'PERNR'.
BREAK-POINT
rgds
Anver
2006 Nov 30 5:20 AM
Hi,
MEMORY ID refers to SAP memory. You use SET and GET to store and retrive values from SAP memory. If you want to pass data of some field from one external session to another then you assign a memory ID to that field and use SET to store that value in the SAP memory. In a different external session when you use GET the filed will get that value. This technic is used to set default values for screen fields.
For example if you enter a table name in SE 11. and quit SE11 and come back still you see the table name, because it is stored in the SAP memory and retrived.
Regards,
Sesh
2006 Nov 30 5:21 AM
Hi Alex,
Check the following link
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3bd1358411d1829f0000e829fbfe/frameset.htm
Hope it helps.
Regards
Kinshuk
2006 Nov 30 5:32 AM
Hai
alex
MEMORY ID U CAN MAKE IN TABLE TPARA USING SM30
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
check this links
http://www.sap-img.com/ab020.htm
http://www.sap-img.com/abap/abap-questions-commonly-asked-1.htm
http://www.sap-img.com/abap/bapi-to-copy-materials-from-one-plant-to-another.htm
-charitha
2006 Nov 30 5:37 AM
Hi,
Suppose if you enter for eg.. 1 to lifnr,you can see the value even you went from the selection screen and came back to the selection screen.i.e. the memory id will retain the value even you switch over to next screen.
2006 Nov 30 5:55 AM
Memory Id is used to store some values in ABAP Memory. So when u go traverse from one internal session to another and if u still want to use that value u can get it fro Memory id.
2006 Nov 30 6:06 AM
Hello Alex,
The last value you have entered in that field is stored in the SAP Global Memory. whenever you find the field on another screen, if it has the memory ID associated with it, then you will find that the last value is already populated.
Consider the following example -
1. Go to SE11. Display the table SPFLI.
2. Open the transaction SE16 in a new session (by using /oSE16).
3. you will find that the table name SPFLI is already populated in the field.
This happens because of the (SAP) Memory ID.
Regards,
Anand Mandalika.