03-21-2016 6:34 PM
Hi,
any idea why the memory data is still available even after the memory ID - that contains this data - was deleted?
Next, is there any way to find whether the memory ID was really deleted successfully? There is neither return code nor an exception risen in the method signature, so that we can only assume, in fact, that it was really deleted.
Only if I replace the 'memory ID'-specific deletion (method mem_delete) with the method for deletion of the whole ABAP memory ( cl_abap_expimp_utilities=>mem_delete_all( ).) then it works fine, but this is not desired as there can still be some other data to be used further in the program. This seems to me like a bug in method mem_delete. Am I missing something? Any idea?
Thank you
Michal
DATA:
lv_exp TYPE c LENGTH 1 VALUE 'A',
lv_imp TYPE c LENGTH 1,
lv_directory TYPE tab_cdir,
lv_id TYPE char5 VALUE 'MY_ID'.
EXPORT p1 = lv_exp TO MEMORY ID lv_id.
* The data 'A' correctly exported
IMPORT p1 = lv_imp FROM MEMORY ID lv_id.
* The data 'A' correctly imported
cl_abap_expimp_utilities=>mem_delete(
EXPORTING
id = lv_id ).
* cl_abap_expimp_utilities=>mem_delete_all( ). "This does the job, but it's far too powerful
CLEAR lv_imp.
IMPORT p1 = lv_imp FROM MEMORY ID lv_id.
* The data 'A' correctly imported - again! Should not the area 'MY_ID' be deleted already?
03-21-2016 7:00 PM
Hi Michal,
Have you tried FREE MEMORY ID 'id name' statement for clearing memory ids ?..
Thanks,
Nandi
03-21-2016 7:00 PM
Hi Michal,
Have you tried FREE MEMORY ID 'id name' statement for clearing memory ids ?..
Thanks,
Nandi
03-21-2016 7:13 PM
Hi Nandi,
yes, I tried - and it works as expected. Then I simply think we should consider the method cl_abap_expimp_utilities=>mem_delete(...) not working properly.
Thanks
Michal