‎2007 Apr 18 10:01 AM
Hi,
I am submitting one report and need to return some value from the program called to the calling program ...how to achieve the same?
Regards
Gunjan
‎2007 Apr 18 10:05 AM
‎2007 Apr 18 10:05 AM
‎2007 Apr 18 10:05 AM
by using keywords
IMPORT
EXPORT.
check for sytax by pressing F1.
Regards
Prabhu
‎2007 Apr 18 10:06 AM
hi,
u can use export ....to memory-id 'xxx' and import ......from memory-id 'xxx'
statements in your programs to return some value from the called program
export the variable u want to return in the called program to the abap memory using EXPORT VAR1 TO MEMORY-ID 'ABC'.
import the same variable in the calling program using import statement
IMPORT VAR1 FROM MEMORY-ID 'ABC'.
‎2007 Apr 18 10:09 AM
Hi gunjan,
1. Program ZAM_TEMP01
is calling ZAM_TEMP02
2. Then this is the coding.
<b>ZAM_TEMP01</b>
report abc.
PARAMETERS : A TYPE C.
data : VAR(10) TYPE C.
START-OF-SELECTION.
SUBMIT ZAM_TEMP02 AND RETURN.
IMPORT VAR FROM MEMORY ID 'VAR'.
BREAK-POINT.
<b>ZAM_TEMP02</b>
report abc .
data : VAR(10) TYPE C.
VAR = 'HELLO'.
EXPORT VAR TO MEMORY ID 'VAR'.
regards,
amit m.