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 MEMORY and IMPORT MEMORY

former_member605939
Participant
0 Likes
16,933

I am working on object which executes in background and consists of EXPORT IT_BSEG_FIN FROM IT_BSEG_FIN TO MEMORY ID 'ZLV_FB01'.

in one program and IMPORT IT_BSEG_FIN = IT_BSEG_FIN FROM MEMORY ID 'ZLV_FB01'.

FREE MEMORY ID 'ZLV_FB01'.

In another program. Most of times the values from IT_BSEG_FIN are passed from one program to other program and then the next code is executed.

But some times the values are not passed and IT_BSEG_FIN is blank and next auto program fails .

I am looking for solution or alternative.

//Thanks

21 REPLIES 21
Read only

FredericGirod
Active Contributor
Read only

ThorstenHoefer
Active Contributor
15,881

Hi,

if you are using more than one server instance, consider to use export to database. Don't forget to execute "commit work" after the export.

Read only

0 Likes
15,881

Hi sir,

I tried the way you suggested EXPORT IT_BSEG_FIN TO DATABASE INDX(PD) ID 'ZPGI2'. ,but this is executed in

badi impmentation . and getting the message TO DATABASE not supported in OO CONCEPT.

I have to implement in BADI implementation "IF_EX_DELIVERY_PUBLISH~PUBLISH_AFTER_SAVE"

Read only

0 Likes
15,881

When you will make some effort to use the Shared memory object, maybe your problem will be solved

Read only

0 Likes
15,881

ok sir. i tried export/import memory id. not successful.

then EXPORT IT_BSEG_FIN TO DATABASE INDX(PD) ID 'ZPGI2 not supported in my case.

Now will implement Shared memory object. Is it also trial ? Problem arises for all cases or may be the code issue can be there?

Or background values transferring is not safe.

Read only

0 Likes
15,881

abaplearner did you find a reproducible case which fails all the time? and one which succeeds all the time?

Read only

0 Likes
15,881

No. Not able find the single case. even tries the process more than 200 times.

But i traced the point by values inserting into z log table and found the values are captured in EXPORT IT_BSEG_FIN FROM IT_BSEG_FIN TO MEMORY ID 'ZLV_FB01'.

but the values are not captured in IMPORT IT_BSEG_FIN = IT_BSEG_FIN FROM MEMORY ID 'ZLV_FB01'.

Now I am trying on Shared memory object. I have implement it. but in transaction SHMA there one check box creation "Aut. Area Creation" What is the significance of it. Some of examples check box is marked yes and some are blank. should i mark tick or keep it blank ?

Read only

0 Likes
15,881

abaplearner In classes, I think that the old syntax is not accepted. Use the explicit naming of data cluster objects (=):

EXPORT the_name_you_want = IT_BSEG_FIN TO DATABASE INDX(PD) ID 'ZPGI2'.
IMPORT the_name_you_want = IT_BSEG_FIN FROM DATABASE INDX(PD) ID 'ZPGI2'.
Read only

0 Likes
15,881

It's good that you have been able to get a first trace of the problem. Now you could continue analyzing in depth the origin (which object is it, can you reproduce with exactly the same context, does it happen after executing something in mass, is it due to different user, etc.)

Read only

0 Likes
15,881

Thanks for guidance.

as you suggested i have used the statements:

EXPORT the_name_you_want = IT_BSEG_FIN TODATABASE INDX(PD)ID'ZPGI2'.

IMPORT the_name_you_want = IT_BSEG_FIN FROMDATABASE INDX(PD)ID'ZPGI2'.

and after that this statement is also required DELETE FROM DATABASE INDX(PD) ID 'ZPGI2' ?

is it ?

Read only

0 Likes
15,881

abaplearner Yes, well seen!

Read only

0 Likes
15,881

I implemented the login

EXPORT the_name_you_want = IT_BSEG_FIN TODATABASE INDX(PD)ID'ZPGI2'.

IMPORT the_name_you_want = IT_BSEG_FIN FROMDATABASE INDX(PD)ID'ZPGI2'.

 DELETE FROM DATABASE INDX(PD) ID 'ZPGI2' 

still it is not passing the values . The actual process is when vl02n pgi button is pressed at that time , we implemented the badi "ZDELIVERY_PUBLISH" that is it will capture the delivery number and the accounting number of the stock less movement then in this badi we used the call transaction 'Zreport' which will do some calculations. but the point is badi is capturing the delivery number and accounting number but in call transaction 'Zreport' the values are not passed, hence next processing is not done .

Read only

0 Likes
15,881

You are using always the same method and you have the same result. Where is the suprise ? Honestly, did you try another method?

Read only

0 Likes
15,881

abaplearner Okay, so now you understand how much important is to analyze what the actual problem is. 🙂

Thank you to explain more about the context. So you do a CALL TRANSACTION. It means that EXPORT TO MEMORY/IMPORT FROM MEMORY is sufficient. Now you must find a reproducible case when it fails, and analyze why.

NB: indicating the name of custom object ("ZDELIVERY_PUBLISH") is useless, instead you should indicate what BAdI Definition it implements.

Read only

0 Likes
15,881

frdric.girod

You mean to say "Shared memory object" ? I have tried two methods now try this method of "Shared memory object"

in transaction SHMA there one check box creation "Aut. Area Creation" Should this is marked as tick aur without tick mark also ths process work ?

If it is marked as tick the what are other things to do in coding ?

Read only

Sandra_Rossi
Active Contributor
0 Likes
15,881

First, try to reproduce the exact case to make it happen all the time, then analyze what happens exactly, and compare to the case which works. What is different?

Read only

0 Likes
15,881

Have you checked this in foreground processing? Is this issue reprodeucable in foreground? Often it helps if you can reproduce in foreground.

Read only

0 Likes
15,881

I checked the foreground processing many times but, not even single time process is stooped.

Read only

0 Likes
15,881

the proposal of xtrnhfo could be the good one, and the Share Memory Object could solve this possibility. Did you read it ?

Read only

0 Likes
15,881

We have single instance. Which one is better for output 1) EXPORT TO MEMORY ID

2) export to database

3) based on class

Export to memory is missing the control to get data( i implemented ). Does point no 2 and 3 can also skip the data.

Which procedure is secure to get updated every time.Which should be implemented ?

//Thanks

Read only

chaouki_akir
Contributor
0 Likes
15,881

How much process using this memory id 'ZLV_FB01' are running at same time ?

If you have 2 process running at same time, using the same memory id, then you may have a problem (If I am not wrong).