2014 May 15 1:25 PM
Hi Experts,
We are facing strange issue during export/import from memory ID.
We are exporting value to Memory ID from module pool program and trying to import same value in SAP workflow method.
While importing the value from memory ID it is failing to import and gives sy-subrc =4.
Any idea how can we do export/import in module pool program to Workflow method?
Regards,
Sanjana
2014 May 15 1:53 PM
Hi Sanjana,
This happens as export to memory and import from memory works on specific work processes depending on the application server instance.
As soon as update function ocurs a new instance is opened and thats why import fails as the data which needs to be imported is in another application server's work process.
Instead you can make use of INDX table and use export to databse and import from databse statements.
You can google export to database and import from databse and will get all relevant information.
Its very simple and effective. Dont forget to delete once the value is imported from indx table.
Regards,
Sandeep Katoch
2014 May 15 1:30 PM
Hi, check names of variables witch imported/exported. It must be the same .
Example:
DATA : mem_fipos type kblp-fipos ,
mem_fistl type kblp-fistl ,
mem_geber type kblp-geber .
export mem_fipos from mem_fipos mem_fistl from mem_fistl mem_geber from mem_geber
to MEMORY ID 'MEM_FIPOS_20140220' .
................
IMPORT mem_fipos mem_fistl mem_geber FROM MEMORY ID 'MEM_FIPOS_20140220' .
FREE MEMORY ID 'MEM_FIPOS_20140220' .
2014 May 15 1:53 PM
Hi,
It works fine single program.
But when we try to import in WF method its not working.
We need export from module pool program and import it in Workflow method.
Regards,
Sanjana
2014 May 15 2:02 PM
If you use workflow - try another method, no memory id
for example - in DB table save something and in workflow get this
2014 May 15 1:53 PM
Hi Sanjana,
This happens as export to memory and import from memory works on specific work processes depending on the application server instance.
As soon as update function ocurs a new instance is opened and thats why import fails as the data which needs to be imported is in another application server's work process.
Instead you can make use of INDX table and use export to databse and import from databse statements.
You can google export to database and import from databse and will get all relevant information.
Its very simple and effective. Dont forget to delete once the value is imported from indx table.
Regards,
Sandeep Katoch
2014 May 15 1:55 PM
Hi Sandeep,
Can you help me with any link for this export to database table syntax?
Regards,
Sanjana
2014 May 15 1:59 PM
Hi sanjana,
Please check the link. Here you can find some examples also.
http://wiki.scn.sap.com/wiki/display/Snippets/Import+and+Export+to+Cluster+Databases
P.S
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3bf8358411d1829f0000e829fbfe/content.htm
You just need to create a key and an ID to save data into INDX table.Once its saved you can use same key and id to import .
Again mentioning , dont forget to delete using same key and ID once you have imported else it may give error.
Regards,
Sandeep Katoch
2014 May 15 2:13 PM
Hi Sandeep,
Will this work for batch job as well.
Regards,
Sanjana
2014 May 15 2:15 PM
Sanjana,
As the data is getting saved in database so it will work in all the cases.
Regards,
Sandeep Katoch
2014 May 15 2:21 PM
Thanks Sandeep, I will try this and confirm if this resolves my issue.
Regards,
Sanjana
2014 May 15 2:26 PM