‎2009 Aug 20 3:44 PM
Hi,
I am using a Enhancement for my requirement. The enhancement
contains 2 Function exits., FE1 & FE2.
In FE2, I export data in 'ABC' to memory and In FE1 I import data in
memory to a variable 'XYZ' from memory.After importing,I delete the memory area.
Everything works fne till here.
But, suppose in a certain scenario after importing memory to variable 'XYZ' from memory,
before I delete the memory area due to some exception the program stops in the middle.
Now, again when I start the same process, I find my old data in the memory.
This is causing me a lot of headache. Agreed, I use a memory area, I need to delete it to make sure evrything runs smoothly in
future scenarios.
Right now am using database indexes as follows:--
export it to database indx(mm) id 'ZABC'.
import it from database indx(mm) id 'ZABC'.
delete from database indx(mm) id 'ZABC'.
Are there any means of using memory areas for storage of my data ,
so that when I start a new process the memory area which I used earlier should be freed by itself autmatically
and start afresh, even if I didnt delete the memory area earlier.
Thanks in advance,
Shivaa...
‎2009 Aug 20 3:49 PM
‎2009 Aug 20 9:38 PM
Another reference (see Raymond answer) might be the Transaction ID (TH_GET_TRANSACTION_ID): if the transaction fails, the TID will change. If the data in memory belongs to another TID than the current one, then you know that it is obsolete. Of course, the TID also changes after each COMMIT WORK or ROLLBACK WORK.
‎2009 Aug 20 4:51 PM
‎2009 Aug 20 4:53 PM
Hi,
You can use memory ids for storing variables or even internal tables. The syntax for that would be
export p1 = gt_mara to memory id 'ZABC'.
and import p1 = gt_mara from memory id 'ZABC'.
No need to declare p1 anywhere.
and when ur work is done.
free memory id 'ZABC' which will clear the value. ( free the memory )
Edited by: Kshitijsaxena on Aug 20, 2009 5:54 PM