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: 

I have an itab which I want to use in another program :-(

Former Member
0 Kudos

Hi all,

I have an itab and want to transport this itab with all its data into another program/report.

How can I do that?

I have tried to use import export but could not do properly.

Thanks.

deniz.

Edited by: Julius Bussche on Sep 10, 2008 10:16 AM

1 ACCEPTED SOLUTION

Former Member
0 Kudos

EXPORT gt_finalexpos FROM gt_finalexpos TO MEMORY ID 'POSTID'. (in current pgm)

IMPORT gt_finalexpos from MEMORY id 'POSTID'. (in another pgm)

Regards

Sathar

Edited by: Sathar RA on Sep 10, 2008 9:37 AM

6 REPLIES 6

Former Member
0 Kudos

Use import/export.

To import/export table,use follwing code which is a bit different from import/export parameter.

EXPORT it_outtab = lt_text TO DATABASE indx(xy) ID 'XYZ'.

IMPORT it_outtab = it_outtab1 FROM DATABASE indx(xy) ID 'XYZ'.

Note - No need to define it_outtab, lt_text can be of any type and it_outtab1 should be of type lt_text.

Regards,

Aparna Gaikwad

JozsefSzikszai
Active Contributor
0 Kudos

hi Deniz,

you tried to transport to another program? That also means to another SAP session, right? In this case you have to use:

EXPORT obj1 ... objn TO SHARED MEMORY itab(ar) ID key

and

IMPORT obj1 ... objn FROM SHARED MEMORY itab(ar) ID key.

more info you'll find in SAPHelp!

hope this helps

ec

0 Kudos

Hi Eric and all,

yes it is as you said.

When I have run a batch input program, I need its itab data at another program.

Could you reveal the following with a simple code:

EXPORT obj1 ... objn TO SHARED MEMORY itab(ar) ID key

and

IMPORT obj1 ... objn FROM SHARED MEMORY itab(ar) ID key.

Assume I have an itab containing just three fields, matnr, maktx and netwr and its data is available.

How can I pass this itab to another program.

Do I have to define the same itab at another program.

Thanks.

deniz.

0 Kudos

Hi Daniz,

In sender program, you have the itab declared and filled with data.

Use Export statement to export it.

In receiver program, declare the itab with same structure. Now use Import statement. and the data would be avilable.

Hope this helps,

Regards

Former Member
0 Kudos

EXPORT gt_finalexpos FROM gt_finalexpos TO MEMORY ID 'POSTID'. (in current pgm)

IMPORT gt_finalexpos from MEMORY id 'POSTID'. (in another pgm)

Regards

Sathar

Edited by: Sathar RA on Sep 10, 2008 9:37 AM

Former Member
0 Kudos

USE THIS

EXPORT ITAB TO MEMORY ID 'MSG'. TO SENDER PROGRAM

IMPORT ITAB FROM MEMORY ID 'MSG'. TO RECEIVER PROGRAM