Hi,
In this we will discuss about ABAP memory.
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.
Data: l_v_vbeln TYPE vbeln,
l_v_vbeln1 TYPE vbeln.
Constants: l_c_test2 TYPE char5 VALUE 'TEST2'.
l_v_vbeln = '123456789'.
*we can use export parameter dhar or l_v_vbeln itself while exporting.
*dhar parameter should be same while exporting as well as while importing.
EXPORT dhar FROM l_v_vbeln TO MEMORY ID l_c_test2.
IMPORT dhar TO l_v_vbeln1 FROM MEMORY ID l_c_test2.
We can free the memory by using.
FREE MEMORY ID l_c_test2.
Regards,
Sasidhar
Showing posts with label Memory usage in SAP. Show all posts
Showing posts with label Memory usage in SAP. Show all posts
Saturday, 10 January 2009
SAP Memory
Hi,
In this post we will discuss about the SAP memory
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.
*Declare the field name and the variable.
DATA:l_v_vbeln_fname TYPE fieldname,
l_v_vbeln TYPE vbeln,
*Pass the data to the locla variable and then pass it to the field name.
l_v_vbeln = '123456789'.
l_v_vbeln_fname = l_v_vbeln.
*Set the parameter id.Here you cna specify any name.
SET PARAMETER ID 'SASI' FIELD l_v_vbeln_fname.
CLEAR: l_v_vbeln,l_v_vbeln_fname.
*write this code in the program where we want to get this field value from SAP memory
GET PARAMETER ID 'SASI' FIELD l_v_vbeln_fname.
*The value is determined from the memory and will be stored in l_v_vbeln_fname.
l_v_vbeln = l_v_vbeln_fname.
Regards,
Sasidhar
In this post we will discuss about the SAP memory
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.
*Declare the field name and the variable.
DATA:l_v_vbeln_fname TYPE fieldname,
l_v_vbeln TYPE vbeln,
*Pass the data to the locla variable and then pass it to the field name.
l_v_vbeln = '123456789'.
l_v_vbeln_fname = l_v_vbeln.
*Set the parameter id.Here you cna specify any name.
SET PARAMETER ID 'SASI' FIELD l_v_vbeln_fname.
CLEAR: l_v_vbeln,l_v_vbeln_fname.
*write this code in the program where we want to get this field value from SAP memory
GET PARAMETER ID 'SASI' FIELD l_v_vbeln_fname.
*The value is determined from the memory and will be stored in l_v_vbeln_fname.
l_v_vbeln = l_v_vbeln_fname.
Regards,
Sasidhar
Subscribe to:
Posts (Atom)