Skip to Content
author's profile photo Former Member
Former Member

Issue with freeing Memory ID

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • Posted on Nov 18, 2009 at 07: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 19, 2009 at 03:02 AM

    Hi Hemanth,

    After importing, try to free memory using following statement,

    DELETE FROM SHARED BUFFER indx(pt) ID 'ZIMT'.

    Thanks,

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 19, 2009 at 04:01 AM

    Hi,

    Try using

    DELETE FROM SHARED MEMORY indx(pt) ID 'ZIMT' or

    DELETE FROM SHARED BUFFER indx(pt) ID 'ZIMT'.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 19, 2009 at 04: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 19, 2009 at 04: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 19, 2009 at 06:06 PM

    Hello All ,

    Yeah ,SAP FAN ,JK and ilesh ...all of you are right ..

    Its workng for me now .

    Many thnks .

    Nugur .

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 22, 2016 at 09: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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.