11-18-2009 7:16 PM
Hello All ,
I am facing a serious issue with deleting the memory id .They are giving me tough time
I am using the below syntax to export the internal tables to ABAP memory using statement ,
Export gt_trade to gt_trade from shared buffer indx(pt) id 'ZIMT' .
I am importing the above data and deleting the memory id with the below two statements .
free memory id 'ZIMT'.
delete from memory id 'ZIMT'.
Both of them are not working .
This non clearing of data is creating problems for me .Any one has solution to this problem??
Thanks ,
Nugur.
11-18-2009 7:25 PM
it should work but if you are still facing problems, then use again EXPORT command with value space and it is overwritten
EXPORT space TO MEMORY ID <id>.
You can also try to use command
FREE MEMORY.
Regards,
Karol
11-19-2009 3:02 AM
Hi Hemanth,
After importing, try to free memory using following statement,
DELETE FROM SHARED BUFFER indx(pt) ID 'ZIMT'.
Thanks,
11-19-2009 4:01 AM
Hi,
Try using
DELETE FROM SHARED MEMORY indx(pt) ID 'ZIMT' or
DELETE FROM SHARED BUFFER indx(pt) ID 'ZIMT'.
11-19-2009 4:23 AM
Hi Hemanth,
Ary you checking SY-SUBRC value after executing DELETE ??
sy-subrc Meaning
0 The specified data cluster was found and deleted.
4 The specified data cluster was not found.
Try using {SHARED BUFFER dbtab(ar) [CLIENT cl] ID id} }. option with DELETE
Refer ABAP Keyword help for it...
Syntax
DELETE FROM { {MEMORY ID id}
| {DATABASE dbtab(ar) [CLIENT cl] ID id}
| {SHARED MEMORY dbtab(ar) [CLIENT cl] ID id}
| {SHARED BUFFER dbtab(ar) [CLIENT cl] ID id} }.
Effect
This statement deletes a data cluster that was stored in the ABAP memory, in a database table, or in an application buffer of the application server by the statement EXPORT. The data cluster is identified by its ID id and, except in the case of the ABAP memory, by the name of a database table dbtab, a range ar, and an optional client cl. The same rules apply to dbtab, ar, cl, and id as apply when accessing the appropriate repository with the IMPORT statement.
Hope it will solve your problem..
Thanks & Regards
ilesh 24x7
ilesh Nandaniya
11-19-2009 4:30 AM
hi Hemanth,
Check this code, it worked for me
Exporting to INDX tablle.
data: indxkey like indx-srtfd value 'KEYBANFN'.
types: begin of ty_export,
banfn type eban-banfn,
idnlf type eban-idnlf,
end of ty_export.
data :lt_banfn type table of ty_export,
wa_banfn type ty_export.
clear wa_banfn.
wa_banfn-banfn = gv_preq_no.
wa_banfn-idnlf = gv_huid.
append wa_banfn to lt_banfn.
clear wa_banfn.
export lt_banfn to
database indx(st) id indxkey.
if sy-subrc ne 0.
do nothing
endif.
refresh lt_banfn.
endif.
Now in another program,.
types: begin of ty_export,
banfn type eban-banfn,
idnlf type eban-idnlf,
end of ty_export.
data :lt_banfn type table of ty_export,
wa_banfn type ty_export,
indxkey type indx-srtfd value 'KEYBANFN'.
clear lt_banfn[].
import lt_banfn from database indx(st) id indxkey.
clear : wa_eban,wa_banfn.
loop at gt_eban into wa_eban.
read table lt_banfn into wa_banfn with key banfn = wa_eban-banfn.
if sy-subrc eq 0.
gv_huid = wa_banfn-idnlf.
endif.
clear : wa_eban,wa_banfn.
endloop.
DELETE
delete from database indx(st) id indxkey.
reagads
Mohinder Singh Chauhan
11-19-2009 6:06 PM
Hello All ,
Yeah ,SAP FAN ,JK and ilesh ...all of you are right ..
Its workng for me now .
Many thnks .
Nugur .
08-22-2016 10:04 AM
Hi Hemanth Kumar
If you export to buffer you also need to delete from buffer
You're example:
Export gt_trade to gt_trade from shared buffer indx(pt) id 'ZIMT' .
delete from memory id 'ZIMT'.
Should be:
Export gt_trade to gt_trade from shared buffer indx(pt) id 'ZIMT' .
delete from shared buffer indx(pt) id 'ZIMT'.
Regs Dennis