01-27-2014 7:26 AM
Hi Friends,
How to get data from an internal table in some other program(ZPROG1) .
with out displaying the other programs output(ZPROG1)..?
Actually I want data from (ZPROG1) to (ZPROG2),
for that i used Export/Import....
By this i am getting data from ZPROG1 to ZPROG2..
But it displaying ZPROG1's output also but i no need the ZPROG1 output, i want only IMPORT the data only.
Report ZPROG1.
LOOP AT IT_FINAL INTO WA_FINAL .
SUM_OPEN = SUM_OPEN + WA_FINAL-OPEN.
ENDLOOP.
EXPORT SUM_OPEN TO MEMORY ID 'ZIT_SUM1'.
******************************************************************************
Report ZPROG2.
SUBMIT ZPROG1
WITH S_BUDAT IN S_BUDAT
AND RETURN.
IMPORT SUM_OPEN FROM MEMORY ID 'ZIT_GROUP_SUM1'.
01-27-2014 7:32 AM
Hello,
try Export itab to memori "ID" in source ,
TRaget- Import itab from merori "ID"
cleare memory id
Thanks,
Sam
01-27-2014 7:35 AM
Hi Bhargav,
Your memory id name should be common in both Import and export memory.
Arivazhagan S
01-27-2014 7:36 AM
Hi Bhargav,
In your report ZPROG2.
change memory id ZIT_GROUP_SUM1 to ZIT_SUM1
and check if you have declared the sum_open in your report.
Regards,
Sindhuja.
01-27-2014 7:38 AM
Hi,
Use the below syntax and check, add EXPORTING LIST TO MEMORY in the submit statement.
SUBMIT ZPROG1
WITH S_BUDAT IN S_BUDAT
EXPORTING LIST TO MEMORY
AND RETURN.
Regards,
Munesh.
01-27-2014 7:38 AM
After the export in Report ZPROG1 you should exit from your current program.
01-27-2014 7:42 AM
Add the addition exporting list to memory and return..
The output will be stored in memory without displaying.
SUBMIT ZPROG1
WITH S_BUDAT IN S_BUDAT exporting list to memory
AND RETURN.
Also make sure that the name of memory ID is the same in both the programs, in the above example, the names are different.
01-27-2014 7:48 AM
Hi Bhargav,
Use addition of without spool dynpro while calling other program. this will skip output screen of program called via submit stament.
SUBMIT ZPROG1
WITH S_BUDAT IN S_BUDAT
WITHOUT SPOOL DYNPRO
AND RETURN.
Check for correct syntax, without spoll dypro will solve the issue.
Thanks & Regards,
Parshuram.
01-27-2014 7:49 AM
Hi All,
I m sorry ,i given the both memory id are same only.
Report ZPROG1.
LOOP AT IT_FINAL INTO WA_FINAL .
SUM_OPEN = SUM_OPEN + WA_FINAL-OPEN.
ENDLOOP.
EXPORT SUM_OPEN TO MEMORY ID 'ZIT_SUM1'.
******************************************************************************
Report ZPROG2.
SUBMIT ZPROG1
WITH S_BUDAT IN S_BUDAT
AND RETURN.
IMPORT SUM_OPEN FROM MEMORY ID 'ZIT_SUM1'.
01-27-2014 8:34 AM
Hi Bhargav,
How are you checking value?
Whether using debug or write statement.
If debug, check the value after import statement executed.
Arivazhagan S
01-27-2014 7:54 AM
Hi Bhargav,
Check out the code below.
Program1
DATA ITAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.
DO 5 TIMES.
ITAB-BOOKID = 100 + SY-INDEX.
APPEND ITAB.
ENDDO.
EXPORT ITAB
TO MEMORY ID 'table'.
Program2
DATA JTAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.
IMPORT ITAB TO JTAB FROM MEMORY ID 'table'.
LOOP AT JTAB.
WRITE / JTAB-BOOKID.
ENDLOOP.
Regards,
Ravikiran.K