Memory released after delete in internal tables ?

hi friends,
i have one quick question about internal tables and memory consumption.
if i have an internal table of say 100 entries and that does occupy memory for 100 entries. now if i delete 20 lines of this table...is the memory occupied by those 20 also released/freed or will the table size be 100 also and just the 20 deleted lines empty ?

Hi!
If you defined you table with the OCCURS 100 statement, then it will allocate always at least 100 records.
The other tables will occupy only the memory size of their actual record length * record number bytes (plus some header information).
Use REFRESH / FREE statement to delete the contents of unneccessary internal tables.
Regards
Tamá

Similar Messages

  • Space reusage after deletion in compressed table

    Hi,
    Some sources tell, that free space after DELETE in compressed table is not reused.
    For example, this http://www.trivadis.com/uploads/tx_cabagdownloadarea/table_compression2_0411EN.pdf
    Is it true?
    Unfortunatly I cannot reproduce it.

    Unfortunatly the question is still open.
    In Oracle 9i space, freed after DELETE in compressed block, was not reused in subsequent inserts.
    Isn't it?
    I saw many evidences from other people. One link I gave above.
    But in Oracle 10g I see another figures. After delete rows in compressed blocks, and subsequent insert into that block, block defragmented!
    Please, if who know any documentation about change in this behavior, please post links.
    p.s.
    in 10g:
    1. CTAS compress. Block is full.
    2. after, deleted every 4 from 5 rows.
    avsp=0x3b
    tosp=0x99e
    0x24:pri[0]     offs=0xeb0
    0x26:pri[1]     offs=0xea8 -- deleted
    0x28:pri[2]     offs=0xea0 -- deleted
    0x2a:pri[3]     offs=0xe98 -- deleted
    0x2c:pri[4]     offs=0xe90 -- deleted
    0x2e:pri[5]     offs=0xe88 -- live
    0x30:pri[6]     offs=0xe80 -- deleted
    0x32:pri[7]     offs=0xe78 -- deleted
    0x34:pri[8]     offs=0xe70 -- deleted
    0x36:pri[9]     offs=0xe68 -- deleted
    0x38:pri[10]     offs=0xe60 -- live
    0x3a:pri[11]     offs=0xe58 -- deleted
    0x3c:pri[12]     offs=0xe50 -- deleted
    0x3e:pri[13]     offs=0xe48 -- deleted
    0x40:pri[14]     offs=0xe40 -- deleted
    0x42:pri[15]     offs=0xe38  -- live
    0x44:pri[16]     offs=0xe30 -- deleted
    0x46:pri[17]     offs=0xe28 -- deleted
    0x48:pri[18]     offs=0xe20 -- deleted
    0x4a:pri[19]     offs=0xe18 -- deleted
    0x4c:pri[20]     offs=0xe10 -- live
    ...3. insert into table t select from ... where rownum < 1000;
    Inserted rows were inserted in a several blocks. Total number of not empty blocks was not changed. Chains did not occure.
    Block above looks as follow:
    avsp=0x7d
    tosp=0x7d
    0x24:pri[0]     offs=0xeb0
    0x26:pri[1]     offs=0x776 - new
    0x28:pri[2]     offs=0x84b - new
    0x2a:pri[3]     offs=0x920 - new
    0x2c:pri[4]     offs=0x9f5 - new
    0x2e:pri[5]     offs=0xea8 - old
    0x30:pri[6]     offs=0xaca - new
    0x32:pri[7]     offs=0xb9f - new
    0x34:pri[8]     offs=0x34d - new
    0x36:pri[9]     offs=0x422 - new
    0x38:pri[10]     offs=0xea0 - old
    0x3a:pri[11]     offs=0x4f7 - new
    0x3c:pri[12]     offs=0x5cc - new
    0x3e:pri[13]     offs=0x6a1 - new
    0x40:pri[14]     sfll=16  
    0x42:pri[15]     offs=0xe98 - old
    0x44:pri[16]     sfll=17
    0x46:pri[17]     sfll=18
    0x48:pri[18]     sfll=19
    0x4a:pri[19]     sfll=21
    0x4c:pri[20]     offs=0xe90 -- old
    0x4e:pri[21]     sfll=22
    0x50:pri[22]     sfll=23
    0x52:pri[23]     sfll=24
    0x54:pri[24]     sfll=26As we see, that old rows were defragmented, and repacked, and moved to the bottom of block.
    New rows (inserted after compressing of table) fill remaining space.
    So, deleted space was reused.

  • Delete and internal table with not eqaul to fields

    Hi I have an internal table I want delete few records with fields not equal to the variable v_lifnr, v_name1 and v_city,
    structure of internal table has fields LIFNR, NAME1, CITY, TEXT1 and TEXT2.
    I dont want to go by deletin in loop.

    Hi ,
    i want to delete a internal table record based on the values which are NOT in the ranges ..
    I am facing a syntax error with not operation in some system s
    code looks like below !
    i am not facing this problem when there in  no not in ranges.
    Thanks .
    RANGES: RA_FFIDS FOR /VIRSA/ZFFUSERS-ZVIRFFID.
    data : BEGIN OF IZVIRFFTRANSLOG OCCURS 0.
            INCLUDE STRUCTURE /VIRSA/ZFFTNSLOG.
    DATA:   DESC LIKE RS38M-REPTI,
          END OF IZVIRFFTRANSLOG.
    data : IT_ZFlight_T LIKE IZVIRFFTRANSLOG OCCURS 0 WITH HEADER LINE.
    IF NOT IT_ZFlight_T_TCODE[] IS INITIAL.
        DELETE IT_ZFlight_T_TCODE WHERE ZVIRFFID NOT IN RA_FFIDS.
       DELETE IT_ZFlight_T WHERE ZVIRFFID NOT IN RA_FFIDS.
    ENDIF.

  • Delete from internal table

    Hi,
    I want to delete from internal table some regords.
    I write code:
    delete  isrot where bldat < '01.09.2005'.
    it doesn't work, what is wrong?
    regards,
    Joanna

    hi,
    you write the statement like....
    <b>delete FROM isrot where bldat < '01.09.2005'.</b>
    now it will work...
    To select the lines that you want to delete using a condition, use the following:
    <b>DELETE FROM <target> WHERE <cond> .</b>
    All of the lines in the database table that satisfy the conditions in the WHERE clause are deleted. The FROM expression must occur between the keyword and the database table.
    You should take particular care when programming the WHERE clause to ensure that you do not delete the wrong lines. For example, if you specify an empty internal table in a dynamic WHERE clause, all of the lines in the table are deleted.
    If at least one line is deleted, the system sets SY-SUBRC to 0, otherwise to 4. SY-DBCNT contains the number of lines deleted.
    follow this link for more information on internal table operation.
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3aef358411d1829f0000e829fbfe/content.htm
    regards,
    Ashok Reddy
    Message was edited by:
            Ashok Reddy

  • Deleting from Internal Tables

    Hi SDN Friends... Today I bring an easy question. But I still reward as always.
    Supose I have two internal tables of same type. Only one field.
    They re filled like the example below.
    Itab1
    01
    02
    03
    04
    05
    06
    Itab2
    02
    04
    06
    08
    10
    I want to remain only with the register that are containned in both table.
    FinalItab
    02
    04
    06
    What is the best way to do this in case of performance?
    Message was edited by:
            Jose Oliveira

    Let me join this funny
    Copy all above and these to conpare performance also!
    REPORT ZTEST.
    *[ DECLARE ]*******************
    DATA: begin of tab01 occurs 0,
            value type I,
          end of tab01.
    DATA: begin of tab02 occurs 0,
            value type I,
          end of tab02.
    *[ PREPARE ]*******************
    tab01-value = '1'.
    append tab01.
    tab01-value = '2'.
    append tab01.
    tab01-value = '3'.
    append tab01.
    tab01-value = '4'.
    append tab01.
    tab01-value = '5'.
    append tab01.
    tab01-value = '6'.
    append tab01.
    tab02-value = '2'.
    append tab02.
    tab02-value = '4'.
    append tab02.
    tab02-value = '6'.
    append tab02.
    *[ BEFORE ]*********************
    Write 'TAB01'.
    Loop at tab01.
      write / tab01-value.
    endloop.
    Write / 'TAB02'.
    Loop at tab02.
      write / tab02-value.
    endloop.
    *[ PROCESS ]********************
    data: min like tab02-value,
          max like tab02-value.
    sort: tab01, tab02.
    loop at tab02.
      max = tab02-value.
      DELETE tab01 where value > min and value < max.
      min = tab02-value.
    endloop.
    *[ AFTER ]**********************
    Write /'** AFTER DELETE **'.
    Write 'TAB01'.
    Loop at tab01.
      write / tab01-value.
    endloop.
    Write / 'TAB02'.
    Loop at tab02.
      write / tab02-value.
    endloop.

  • Memory Limitation on EXPORT & IMPORT Internal Tables?

    Hi All,
    I have a need to export and import the internal tables to memory. I do not want to export it to any data base tables. is there a limitation on the amount of memroy that is can be used for the EXPORT & IMPORT. I will free the memory once I import it. The maximum I expect would be 13,000,000 lines.
    Thanks,
    Alex (Arthur Samson)

    You don't have limitations, but try to keep your table as small as possible.
    Otherwise, if you are familiar with the ABAP OO context, try use Shared Objects instead of IMPORT/EXPORT.
    <a href="http://help.sap.com/saphelp_erp2004/helpdata/en/13/dc853f11ed0617e10000000a114084/frameset.htm">SAP Help On Shared Objects</a>
    Hope this helps,
    Roby.

  • Deleting from Internal Table (dynamic)

    Hi,
    I have an Internal table, which will contain daily movements for plants per material.
    The internal table will contain 4 plants per material, with more than 1 material.
    Now, i have four columns. If all of those columns for that material and for all plants for that material equal zero, i want to delete the specific record.
    For example
    Material     Plant      Daily 1  Daily 2  Daily 3  Daily 4
    102            1           0          0           0          0
    102            2           0          0           0          0
    102            3           0          0           0          0
    102            4           0          0           0          0
    So, these 4 records should be deleted. However, say on of the daily columns will equal 1, then keep the 4 records (they are linked by material and plant.)
    How do I do this?
    Points will be rewarded and all help will be greatly appreciated.
    Thanks,
    John

    Check this.
    DATA: BEGIN OF itab OCCURS 0,
            matnr LIKE marc-matnr,
            werks LIKE marc-werks,
            daily1 TYPE i,
            daily2 TYPE i,
            daily3 TYPE i,
            daily4 TYPE i.
    DATA: END OF itab.
    DATA: itab_per_matnr LIKE itab OCCURS 0 WITH HEADER LINE,
          wa_itab        LIKE itab.
    itab_per_matnr[] = itab[].
    LOOP AT itab INTO wa_itab.
    *-- check if there is at least one non-zero record for this material
      LOOP AT itab_per_matnr WHERE matnr = wa_itab-matnr
                               AND ( daily1 > 0 OR
                                     daily2 > 0 OR
                                     daily3 > 0 OR
                                     daily4 > 0 ).
        EXIT
      ENDLOOP.
      IF sy-subrc <> 0.
        DELETE itab WHERE matnr = wa_itab-matnr.
      ENDIF.
    ENDLOOP.

  • Deleting from Internal table.....

    Hi All,
    I have two internal tables with same structure like: IT_REC_LIST and IT_REC_LIST_DEL.
    I have 10 records in this internal table: IT_REC_LIST and same 5 records in this internal table: IT_REC_LIST_DEL. I don’t have any key fields.
    So I want to delete those 5 records from IT_REC_LIST. Could you please let me know hw to write the code, when I write like below its going for dump.
    DELETE IT_REC_LIST [] FROM IT_REC_LIST_DEL [].
    Akhitha.

    Hello,
    You can do like :
    loop at IT_REC_LIST .
    read table IT_REC_LIST_del with key field1 = IT_REC_LIST-field1.
    if sy-subrc eq 0.
    delete IT_REC_LIST.
    endif.
    endloop.
    <REMOVED BY MODERATOR>
    Vasanth
    Edited by: Alvaro Tejada Galindo on Feb 19, 2008 5:28 PM

  • Deletion from internal table

    Hi,
      My requirement is that I have to delete the duplicate values before doing any manupilation of data.. so for this I have written the code...
    *Deleting all the duplicate entries comparing group code, GL *& GL Suffix
      IT_INPUT_TEMP[] = IT_INPUT[].
      SORT IT_INPUT_TEMP BY GRCODE GL GLSUF.
      DELETE ADJACENT DUPLICATES
             FROM IT_INPUT_TEMP COMPARING GRCODE GL GLSUF.
    Now with the remaining values in the internal table I have to check the 3rd field i.e. GLSUF & if it = '00000' (5 zeros)... i have to delete those entries...
    For this I have written...
    Deleting enteries where the GL Suffix is zero.
      IF IT_INPUT_TEMP-GLSUF = 00000.              
        DELETE IT_INPUT_TEMP.                      
      ENDIF.                                                                               
    It gives me a dump saying "Invalid_Table_Index"...
    Prior to this I have also checked up by using Index function.
    Deleting enteries where the GL Suffix is zero.
      IF IT_INPUT_TEMP-GLSUF = 00000.              
        DELETE IT_INPUT_TEMP index l_tabix.                      
      ENDIF.
    Can anyone tell me where I am wrong??..
    Thank You & Regards,
    -S.

    Hi S,
    Your code extract
    * Deleting enteries where the GL Suffix is zero.
    IF IT_INPUT_TEMP-GLSUF = 00000.
      DELETE IT_INPUT_TEMP.
    ENDIF.
    Either this should be in a loop(which is unnecessary if all you are trying to achieve is deleting records), or you can try the option with 'WHERE' clause as mentioned in the above post.
    DELETE FROM IT_INPUT_TEMP WHERE GLSUF = '00000'.
    Regards,
    Srinivas

  • Deleting Space - Internal Table

    Hi All,
    I wish to know how to delete the leading / trailing spaces in <b>Internal Table's</b> field & bolding the field name in Report Output.
    Ex: In report output - when i output BSID-WRBTR via an Internal table how to delete the blank spaces.
    I appreciate ur time.
    Regards
    Tina

    hi Tina,
       Use <b>Condense</b> Statement
    i.e,
    <b>The CONDENSE statement deletes redundant spaces from a string:</b>
    CONDENSE <c> [NO-GAPS].
    This statement removes any leading blanks in the field <c> and replaces other sequences of blanks by exactly one blank. The result is a left-justified sequence of words, each separated by one blank. If the addition NO-GAPS is specified, all blanks are removed.
    DATA: STRING(25) VALUE ' one two three four',
    LEN TYPE I.
    LEN = STRLEN( STRING ).
    WRITE: STRING, '!'.
    WRITE: / 'Length: ', LEN.
    CONDENSE STRING.
    LEN = STRLEN( STRING ).
    WRITE: STRING, '!'.
    WRITE: / 'Length: ', LEN.
    CONDENSE STRING NO-GAPS.
    LEN = STRLEN( STRING ).
    WRITE: STRING, '!'.
    WRITE: / 'Length: ', LEN.
    Output:
    one two three four !
    Length:           25
    one two three four !
    Length:           18
    onetwothreefour !
    Length:           15
    Note that the total length of the field STRING remains unchanged, but that the deleted blanks appear again on the right.
    Regards,
    Santosh

  • Problem regaining memory space after deleting photos

    While on vacation, I copied 9 mb photos, in iPhoto albums, from a family member's Mac to my iPad 2 . Once back home, I deleted the albums and photos using my own computer.
    Even though the photos are now gone, my iPad still shows that I have 9 mb of photos.  So, even though the photos are not showing up on my iPad, the disk space is still reserved for the deleted photos.  How do I get it to give me the disk space back?  I no longer have access to the other Mac (that uploaded the photos).
    It was difficult to delete those photos as there were several thousand in a variety of folders.  I ended up syncing to my own iPhoto which had very few photos. That did remove the albums & photos, but did not give back the 9 mb of memory they resided in.
    Any ideas?
    Thanks.

    Not related ... but may be related ...  Here's my problems:
    Okay ... so, because I had less than a 1 Gig left (as reported by iTunes) on my 64Gig iPad, and the majority of the space was being used by "Photos" ... I decided to not keep my PC photos directory in sync with my iPad (Windows 7). So, in iTunes, I unchecked the option to sync computer photos to the iPad. I got the standard popup warning message that my iPad would not contain those albums after the next sync. I clicked OK and proceeded to sync expecting to have lots of space freed up.
    But weird things happened after syncing.
    (1) I still have all my photos on my iPad .... nothing disappeared at all. (And performed multiple syncs to try to force the change ... still nothing has been removed from my iPad.)
    (2) Somehow, I gained 20 Gigs of free space, as reported by both iTunes and my iPad as well.
    Anyone know what's going on here?
    I do have iMovie and another movie making app, Avid. Both of these contain projects that refer to photos in albums that were supposed to be removed after the sync ... but I can't imagine that would keep them there. Anyone have any ideas?
    I also installed the iPad app, iPhoto. I noticed that it build a directory listing and continuously want to update that listing from time to time.
    Would any of these things cause the iTunes photo sync changes to be ignored? And, how did I get free space to report back with an additional 19Gig or so, when there's no change at all.
    Unsure what's going on ...

  • Working in MUD: after deleting column whole table gets lost

    Good morning community,
    we do have a problem with the obiee admin tool.
    we just migrated to version 11.1.1.6.6.
    Now a colleague of mine worked with the MUD. He checked out the RPD-file and wanted to delete a column from a table within the presentation layer. Then he checked in this change again. He Uploaded the file to the server and everything is working fine.
    Now the problem:
    When he checked it out again, he saw that the full table was "deleted", but not only in the presentation layer, also in the business modell and the physical layer.
    He opened the RPD file locally and there everything was okay.
    Our first idea that the admin tool lost the link of these tables to the project couldn't be confirmed.
    So we are asking you :-)
    Maybe someone of you had this problem too and can explain how he solved it.
    Thank you and have nice day,
    Sven

    Hi Sven,
    Then he checked in this change again. He Uploaded the file to the server and everything is working fine.It should not be the case please confirm below
    1. Uploaded means ? directly moved to MUD server instead of doing checking or from MUD to system where BI installed (NQSconfig.ini) ?
    2. I'm sure he deleted the table instead of column (track it from MUD History in file option -->)
    3. Link will break when (Tables in BMM & Physical ) a fact table is deleted so automatically associated dims will go off
    4. Get the latest version . XXX (from MUD server) then change it to .rpd and deploy to get rid of issue
    thanks,
    Saichand

  • How to reduce table size after deleting data in table

    In one of the environment, we have 300 GB tabe which contains 50 columns. some of the columns are large object columns. This table contains data for the past one year and every month it is growing by 40 gb data. Due to this we have space issues. we would like to reduce the table size by keeping only recent two months data. What are the posiible ways to reduce the table size by keeping only 2 months data. Database version 10.2.04 on rhel 4.

    kumar wrote:
    Finally we dont have down time to do by exp/imp method.You have two problems to address:
    <ul>
    How you get from where you are now to where you want to be
    Figuring out what you want to do when you get there so that you can stay there.
    </ul>
    Technically a simple strategy to "delete all data more than 64 days old" could be perfect - once you've got your table (and lob segments) down to the correct size for two months of data. If you've got the licencing and can use local indexing it might be even better to use (for example) daily partitioning by date.
    To GET to the 2-month data set you need to do something big and nasty - this will probably give you the choice between blocking access for a while and getting the job done relatively quickly (e.g. CTAS) or leaving the system run slowly for a relatively long time while generating huge amounts of redo. (e.g. delete 10 months of data, then shrink / compact). You also have a choice between using NO extra space to get the job done (shrink/compact) or doing something which effectively copies the last two months of data.
    Think about the side effects you're prepared to run with, then we can tell you which options might be most appropriate.
    Regards
    Jonathan Lewis

  • Table activation problem after deleting ariw from table

    Hi,
    I have inserted a new field(xxxx) into custom table and activated it..
    But ,when i tried to enter values for this new field in se16,this  field doesnt exist there.But in se11 i was able to view..
    So i deleted that field from tht table and inserted again,,
    Now iam geting message that
    xxxx field was deleted
    Alter table is not possible..
    Diagnosis shows that
    The structure of the table changed at field level. This change requires a conversion of the table. This situation can occur for example if the data type or field length of the domain upon which the field is based was changed. A conversion is also generally necessary if the key of the table changed.
    Procedure
    Convert the table using the Database Utility (SE14).
    Can you people let me know how i can cahge the table ..
    Regards
    parnith..

    Hi Parnith,
    Suppose you have entered a new field (or deleted a field) in your table in SE11(and table already contains data).
    Now, your next step should be activating that table first.
    For that :
    1. Just click on save.
    2. Goto Utilities -> Database Utility.
        Click on that.
    3. Click on Activate and Adjust database.
    Now you will see your field added to your table.
    Now you can simply Goto contents of the table and modify the records and fill the newly added field for each record.
    Hope it helps.
    Regards
    Hemant Khemani
    Edited by: Hemant Khemani on Apr 25, 2008 10:09 AM

  • Photos consuming memory even after deleted.

    i have deleted all my photos and vedios,but in useage it still shows 93 mb under photos.i did everything from syncing to itunes to factory resetting my iphone but it still shows 93 mb under photos whereas i have no photos.what should i do?

    Where are you seeing this 93MB figure? In iTunes in the storage bar thingy or on the iPhone itself under Setings/General/Usage? Look at the "Photos and Camera" and "Videos" categories under Usage on the iPhone.
    The Settings Usage figure is the one to trust, the usage bar in iTunes often gets confused and reports incorrect figures. You can sometimes fix iTunes by simply relaunching it, other times it won't fix itself until you do a new USB sync operation for the device.

Maybe you are looking for