‎2006 Jun 20 12:34 PM
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
‎2006 Jun 20 12:58 PM
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
‎2006 Jun 20 1:01 PM
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
‎2006 Jun 20 1:04 PM
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
‎2006 Jun 20 1:04 PM
‎2006 Jun 20 1:06 PM
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.
‎2006 Jun 20 1:06 PM
‎2006 Jun 20 1:46 PM
‎2006 Jun 20 1:55 PM
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
‎2006 Jun 20 2:09 PM
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
‎2006 Jun 20 1:17 PM
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
‎2006 Jun 20 6:21 PM
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