Saturday, 10 January 2009

ABAP Memory

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

No comments: