Application Development and Automation 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: 
Read only

export itab to memory

Former Member
0 Likes
1,321

i make submit to program Z_<b>RM07MLBD</b> i copied it to Z.

i want to copy an internal table (occurs 100) to the memory.

so when i in my zprog make submit i will get the itab into my zprog how???????

thanks

11 REPLIES 11
Read only

Former Member
0 Likes
1,017

Hi Rani

1. U will have to use EXPORT / IMPORT concept.

2. See F1 help on this commands.

3. EXPORT ITAB TO MEMORY ID 'ITAB'.

IMPORT ITAB FROM MEMORY ID 'ITAB'.

thanks

kiran.M

Read only

dani_mn
Active Contributor
0 Likes
1,017

Hi,

Try this.

for exporting.

EXPORT itab_data TO DATABASE indx(dn) ID 'ZCA_BUD'.

for importing.

IMPORT itab_data FORM DATABASE indx(dn) ID 'ZCA_BUD'.

Regards,

Wasim Ahmed

Read only

Former Member
0 Likes
1,017

Hi,

use the following syntax, you can export it to the database, then iimport.. after importing delete from the database.

<b>DATABASE EXPORT ... TO DATABASE</b>--> Store in a database file

<b>DATABASE IMPORT ... FROM DATABASE</b>--> Read from a database file

<b>DATABASE DELETE FROM DATABASE</b>--> Delete from a database file

Thanks

Sudheer

Read only

Former Member
0 Likes
1,017

Hi,

please check these..

Regards

vijay

Read only

Former Member
0 Likes
1,017

In your program

EXPORT ITAB to memory ID 'MEMID'.

Inside submit program

IMPORT ITAB from memory ID 'MEMID'.

Note: - The name and structure of the internal table should be the same in both the programs.

Read only

Former Member
0 Likes
1,017

Hi,

Check this For EXPORTING ITAB TO MEMORY AND IMPORTING BACK in another program.

Regards

vijay

Read only

0 Likes
1,017

ITS' WORK IN BACKGROUD?????????

Read only

0 Likes
1,017

in the submit program....

data: begin of itab occurs 0.
include structure kna1.
data: end of itab.
if not itab[] is initial.
EXPORT itab[] to MEMORY ID 'mid'.
IF SY-SUBRC = 0.
WRITE:/ 'EXPORTED'.
ENDIF.
endif.

in the import program..

data: begin of itab occurs 0.
include structure kna1.
data: end of itab.
 
IMPORT itab[] from MEMORY ID 'mid'.
loop at itab.
write:/ itab.
endloop.

in Background also it works fine.

Regards

vijay

Read only

0 Likes
1,017

My experience says it doesnt work in background. Lets say you are exporting your table and you need to import this table in a FM thats getting executed in background the import statement almost always returns a "subrc gt 0" and the imported table doesnt contain any records. Just to see whats going on I coded a controlled endless loop in the FM (being executed in the background) and debugged through SM50 and thats how I came to know it wasnt working in the background.

hith

Sunil Achyut

Read only

Former Member
0 Likes
1,017

Hi

You can use EXPORT and IMPORT statements to accomplish this requirement

find the following links that may be helpful

http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9df735c111d1829f0000e829fbfe/frameset.htm

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb2d40358411d1829f0000e829fbfe/content.htm

Regards

Beena

Read only

former_member183804
Active Contributor
0 Likes
1,017

Maybe my answer which is in turn a question is little bif off topic. Wouldn´t it be better to move the logic of your report into a fuba. Then it´s possible to call the logic from the report and anywhere else with a well defined signature.

Best Regards

Klaus