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: 

pass internal table from program to another program

Former Member
0 Kudos

hi,

how do i pass an internal table from program to another program, then read it.

tnx,

laure

1 ACCEPTED SOLUTION

Former Member
0 Kudos

One way is to use EXPORT and IMPORT statements.

EXPORT itab = itab TO MEMORY ID 'MID'.

IMPORT itab = itab FROM MEMORY ID 'MID'.

Note that the itab definition should be same in both programs.

Regards

Eswar

4 REPLIES 4

Former Member
0 Kudos

One way is to use EXPORT and IMPORT statements.

EXPORT itab = itab TO MEMORY ID 'MID'.

IMPORT itab = itab FROM MEMORY ID 'MID'.

Note that the itab definition should be same in both programs.

Regards

Eswar

Former Member
0 Kudos

Hi,

As much a i know

1) U can pass data from one program to another in a single login using SAP memory......

2) u can create a DBtable update dat table using ur first pgm and fetch from second program.....

3) U can pass the report output using EXPORT TO MEMORY addition and get it back using IMPORT FROM MEMORY..........

Cheers,

jose.

Former Member
0 Kudos

Hi,

Do like this...

export itab from itab TO MEMORY ID 'ZABAP'.

Submit w_repid and return.

in ur other program ...

Import itab TO itab FROM MEMORY ID 'ZABAP'.

Make sure that the name and structure of the internal table be same.

Reward if useful..

Regards........

Former Member
0 Kudos
  • Export the selected rows to the next program

EXPORT final TO MEMORY ID 'ABC'.

CALL TRANSACTION 'XXX'.

XXX is the tcode for the other program where u want to import the values.

In the second program

INITIALIZATION.
  • IMPORT the internal table from the first program

IMPORT final FROM MEMORY ID 'ABC'.

Dont refesh the internal table final.