Skip to Content
author's profile photo Former Member
Former Member

regarding import and export statement

hi experts,

how to import and export the internal table between programs...

Nice solutins with maximum points.....

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jan 11, 2008 at 12:13 AM

    Example of a program exporting an internal table to ABAP memory.

    Prog 1

    parameters: pa_vbeln like vbak-vbeln.
    data: itab type standard table of vbak.
    * get data to fill the table
    select * from vbak into table itab
                where vbeln = pa_vbeln.
    * now store the internal table to ABAP memory
    export itab to Memory ID 'table''.
    * here we call another program, prog 2
    submit prog2 and return.

    Prog 2 -> This imports the internal table exported by prog 1 and writes the content of the internal table to a list

    data: jtab type standard table of vbak,
           wa_vbak type vbak.
    * importing the itab that was exported by prog1
    import itab to jtab from memory id 'table'.
    loop at jtab into wa_vbak.
     write:/ wa_vbak-vbeln,
    * clear the specific memory id after required processing is complete
    free memory id 'table'

    Hope this solves your problem.




    Copy/paste your code, I'll have a look. First check if data is being selected before Export command.

    Edited by: Sougata Chatterjee on Jan 11, 2008 12:31 PM

    Also make sure you create prog2 as an executable program. Then, run prog1 with a valid Sales Order number. To understand it more clearly run it in debugging mode and step through. It should work fine in any system.

    Edited by: Sougata Chatterjee on Jan 11, 2008 12:42 PM

    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.