Skip to Content

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

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

9 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 27, 2014 at 07:32 AM

    Hello,

    try Export itab to memori "ID" in source ,

    TRaget- Import itab from merori "ID"

    cleare memory id

    Thanks,

    Sam

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 27, 2014 at 07:35 AM

    Hi Bhargav,

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

    Arivazhagan S

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 27, 2014 at 07: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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 27, 2014 at 07: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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 27, 2014 at 07:38 AM

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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 27, 2014 at 07: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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 27, 2014 at 07: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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 27, 2014 at 07: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'.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 27, 2014 at 07: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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.