Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get data from an internal table in some other program with out displaying the other programs output..?

0 Kudos

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'.

10 REPLIES 10

Former Member
0 Kudos

Hello,

try Export itab to memori "ID" in source ,

TRaget- Import itab from merori "ID"

cleare memory id

Thanks,

Sam

arivazhagan_sivasamy
Active Contributor
0 Kudos

Hi Bhargav,

Your memory id name should be common in both Import and export memory.

Arivazhagan S

former_member199214
Participant
0 Kudos

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.

muneshpatwari
Active Participant
0 Kudos

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.

Former Member
0 Kudos

After the export in Report ZPROG1 you should exit from your current program.

former_member184569
Active Contributor
0 Kudos

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.

parshuram_kokare
Explorer
0 Kudos

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.

0 Kudos

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'.

0 Kudos

Hi Bhargav,

How are you checking value?

Whether using debug or write statement.

If debug, check the value after import statement executed.

Arivazhagan S

Former Member
0 Kudos

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