‎2006 Aug 30 2:05 AM
hi Gurus,
Could you please explain what is the exact syntax to use export to memory id and import from memory id. Could you give me an example code explaining what the argument are.
Thanks
‎2006 Aug 30 2:20 AM
Simple form:
EXPORT <variables>/<internal tables> MEMORY ID 'MID'.
IMPORT <variables>/<internal tables> FROM MEMORY
ID 'MID'.
Note that the datatype and names of the variables and
internal tables need to be same in both programs.
Kind Regards
Eswar
‎2006 Aug 30 2:16 AM
Sure, there are a couple ways to use this statement. The following is how I usually use it and it seems to work well in all cases.
Data: it001 type table of t001.
data: xt001 type t001.
select * into table it001 from t001.
export it001 = it001 to memory id 'ZRICHTEST'.
clear it001. refresh it001.
import it001 = it001 from memory id 'ZRICHTEST'.
loop at it001 into xt001.
write:/ xt001-bukrs, xt001-butxt.
endloop.Regards,
Rich Heilman
‎2006 Aug 30 2:18 AM
Check the following demo programs..
DEMO_DATA_EXT_CLUSTER_EXPORT Saving Data Objects in Memory
DEMO_DATA_EXT_CLUSTER_EXPORT_D Saving Data Objects in Cluster Databases
DEMO_DATA_EXT_CLUSTER_IMPORT Reading Data Objects from Memory
DEMO_DATA_EXT_CLUSTER_IMPORT2 Program DEMO_DATA_EXT_CLUSTER_IMPORT2
DEMO_DATA_EXT_CLUSTER_IMPORT3 Program DEMO_DATA_EXT_CLUSTER_IMPORT3
DEMO_DATA_EXT_CLUSTER_IMPORT_2 Creating a Directory of a Data Cluster
DEMO_DATA_EXT_CLUSTER_IMPORT_D Reading Data Objects from Cluster Databases
~Suresh
‎2006 Aug 30 2:19 AM
You can also use it like so.
data: it001 type table of t001.
data: xt001 type t001.
select * into table it001 from t001.
<b>export it001 to memory id 'ZRICHTEST'.</b>
clear it001. refresh it001.
<b>
import it001 from memory id 'ZRICHTEST'.</b>
loop at it001 into xt001.
write:/ xt001-bukrs, xt001-butxt.
endloop.
Regards,
Rich Heilman
‎2006 Aug 30 2:20 AM
Simple form:
EXPORT <variables>/<internal tables> MEMORY ID 'MID'.
IMPORT <variables>/<internal tables> FROM MEMORY
ID 'MID'.
Note that the datatype and names of the variables and
internal tables need to be same in both programs.
Kind Regards
Eswar