Passing Data From One ABAP Program To Another
Passing Data From One ABAP Program To Another
This can
be done using the EXPORT and IMPORT statement in ABAP. Please find the examples
given below.
REPORT ZEX_MEMORY .
write:/ D_MEMORY.
As you can see from the above example the field D_MEMORY can be exported to memory
and then imported back. Once you are done with importing the value you need to FREE
the memory ID. Please make sure that you free only the MEMORY ID exported by you.
You can also export field contents to memory from one program and import them in
another program. Please see the code given below.
EXPORT D_MEMORY1
D_MEMORY2 FROM 'EXPORTING THIS FROM PROGRAM1'
TO MEMORY ID 'MEMID1'.
REPORT ZEX_MEMORY1 .
Data: D_MEMORY1(100).
As shown in program 1 and 2 the value 'EXPORTING THIS FROM PROGRAM1' is passed from
ABAP memory from one program to the other.