‎2021 Aug 04 11:31 AM
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
‎2021 Aug 04 12:04 PM
Share memory object is a good option :
Otherwise, you could simply do a SingleTon Class :
https://answers.sap.com/questions/12988109/how-do-we-use-singleton-in-oo-abap-can-someone-ple.html
(or worst, a group function)
‎2021 Aug 04 1:06 PM
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.
‎2021 Aug 13 5:38 AM
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"
‎2021 Aug 13 6:54 AM
When you will make some effort to use the Shared memory object, maybe your problem will be solved
‎2021 Aug 13 8:07 AM
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.
‎2021 Aug 13 9:08 AM
abaplearner did you find a reproducible case which fails all the time? and one which succeeds all the time?
‎2021 Aug 14 8:34 AM
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 ?
‎2021 Aug 14 2:48 PM
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'.
‎2021 Aug 14 2:52 PM
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.)
‎2021 Aug 14 4:24 PM
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 ?
‎2021 Aug 14 4:36 PM
‎2021 Aug 16 8:24 AM
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 .
‎2021 Aug 16 8:58 AM
You are using always the same method and you have the same result. Where is the suprise ? Honestly, did you try another method?
‎2021 Aug 16 9:07 AM
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.
‎2021 Aug 16 12:54 PM
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 ?
‎2021 Aug 04 3:56 PM
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?
‎2021 Aug 04 5:07 PM
Have you checked this in foreground processing? Is this issue reprodeucable in foreground? Often it helps if you can reproduce in foreground.
‎2021 Aug 05 6:34 AM
I checked the foreground processing many times but, not even single time process is stooped.
‎2021 Aug 05 6:36 AM
the proposal of xtrnhfo could be the good one, and the Share Memory Object could solve this possibility. Did you read it ?
‎2021 Aug 06 12:42 PM
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
‎2021 Aug 14 10:00 PM
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).