Application Development 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: 

Issue with Memory ID export / import

sanjana_lingras
Active Participant
0 Kudos
4,679


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

1 ACCEPTED SOLUTION

sandeep_katoch
Contributor
0 Kudos
1,964

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

10 REPLIES 10

Former Member
0 Kudos
1,964

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' .

0 Kudos
1,964

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

0 Kudos
1,964

If you use workflow  - try another method, no memory id

for example - in DB table save something and in workflow get this

sandeep_katoch
Contributor
0 Kudos
1,965

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

0 Kudos
1,964

Hi Sandeep,

Can you help me with any link for this export to database table syntax?

Regards,

Sanjana

0 Kudos
1,964

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

0 Kudos
1,964

Hi Sandeep,

Will this work for batch job as well.

Regards,

Sanjana

0 Kudos
1,964

Sanjana,

As the data is getting saved in database so it will work in all the cases.

Regards,

Sandeep Katoch

0 Kudos
1,964

Thanks Sandeep, I will try this and confirm if this resolves my issue.

Regards,

Sanjana

0 Kudos
1,964

Sanjana,

All the best.

Regards,

Sandeep Katoch