09-10-2008 8:31 AM
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
09-10-2008 8:36 AM
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
09-10-2008 8:32 AM
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
09-10-2008 8:35 AM
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
09-10-2008 8:51 AM
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.
09-10-2008 8:59 AM
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
09-10-2008 8:36 AM
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
09-10-2008 8:36 AM
USE THIS
EXPORT ITAB TO MEMORY ID 'MSG'. TO SENDER PROGRAM
IMPORT ITAB FROM MEMORY ID 'MSG'. TO RECEIVER PROGRAM