Delete in loop

Hi,
I have a delete statement inside a loop like
LOOP AT DATA_PACKAGE.
    lv_tabix = sy-tabix.
    clear gt_mattab.
    READ TABLE gt_mattab
    WITH KEY MATERIAL = DATA_PACKAGE-MATERIAL.
    IF SY-SUBRC NE 0.
      DELETE DATA_PACKAGE index lv_tabix.
    ENDIF.
  ENLOOP.
Can you please help me in deleting the data packages with out using it in the loop?
Will that increase the performance of the code and how?

Hi Prasad,
Let me explain exactly what happens if u delete a record from the internal table.
If u defined your internal table like TYPE STANDARD TABLE OF or TYPE SORTED TABLE OF then it will work on INDEX mechanism.
So if have 100 records in ur internal table then each record will be identified with its position i.e INDEX. When u delete a record from the table then it has to recreate the indexes for all other records(Except in case of deletion of last record) after that record. It is the majar disadvantage of delete statement. If u use delete statement inside loop this process has to happen equal to number of deletions.
So there is one more solution for this which will be faster than
DELETE inside the loop. Instead of deleting the records from the original table APPEND the records to another internal table.In this case it has to create INDEX for one time for one append in contrary to DELETE whcih has to recreate INDEXS for all rows.
Check the logic below. Implement and use SQL trace to moniter the performance(transaction ST05).
LOOP AT DATA_PACKAGE.
lv_tabix = sy-tabix.
clear gt_mattab.
READ TABLE gt_mattab
WITH KEY MATERIAL = DATA_PACKAGE-MATERIAL.
CHECK SY-SUBRC EQ 0.
APPEND DATA_PACKAGE TO DATA_PACKAGE1.
ENLOOP.
Also if u dont have else part and no code after ENDIF then always use CHECK statement which is much faster than IF.
Thanks,
Vinod.
Edited by: Vinod Kumar Vemuru on Mar 20, 2008 6:32 PM

Similar Messages

  • Logic Pro X 2013 delete custom loops

    How do I delete custom loops from both my library and the UI?

    Apple loops are stored in these locations...
    YourHD/Library/Audio
    YourHD/Users/'you'/Library/Audio
    YourHD/Library/Application Support/Logic
    YourHD/Library/Application Support/Garageband
    if you cannot find one of your own...
    Use Find Any File (FAF) to locate it...
    http://apps.tempel.org/FindAnyFile/
    FAF makes life much easier when trying to find things on your Mac

  • How do you delete Duplicate loops from AMG (third party loops)?

    I bought two packages from AMG but after installing them in GarageBand I noticed that some of their loops appear twice in the loop browser. I guess there was a copy of each of these loops in both AMG packages. I've tried playing some of them - just to make sure they're really copies of each other and they sound exactly the same. There are not many of these duplicate loops but they are scattered throughout the different categories in the loop browser.
    Is there a way to just delete each duplicate as I come across it in the loop browser or do I have to do something else to get rid of the duplicates?
    Thanks in advance for any help you can provide.
    Regards,
    Jeff

    I guess it will remain a mystery that I will have to live with unless someone can give me a clue as to where GarageBand is putting these loops or doing to these loops (like re-naming them something else) after I install them.
    When I drop in new loops the computer does give me a message that says it's putting them in the Apple Loops folder but when I look in that folder the loops that I just installed are not there. When I search for them using a Smart Folder or Spotlight or 'command F" they don't show up. I also tried searching for individual loops with the "AMG" in the front of the name of the loop and without the "AMG" in the front of the name of the loop and they still don't show up in any of the searches - yet they are there in GarageBand ready to use.
    I just don't know.
    Thanks everyone for trying to help me. I appreciate your time and effort.
    Regards,
    Jeff

  • Deleted my loops...

    i accidently deleted my apple loops files while trying to retreive them.
    now they are in a hidden part of my imac which i cant find.
    My question is how can re-download them from the dvd?
    there is no part of garage band that helps u do that...

    2enty3 wrote:
    yup, i've looked through the support area including that specific topic
    but it was that topic which made me accidently lose my loops.
    i put them in a hidden temporary file which i cannot acces anymore.
    i'm just wondering whats the fastest way to re-download the loops from a dvd.
    Well, if you want to reinstall them, there're a few steps to take:
    First of all, (Save Your Compositions In Desktop) by dragging. Then go to Application File and drag (Garageband) to the trash.
    Step 2: Go to (Macintosh Hard Drive) and click (Library) in library scroll down to (receipts) and click.
    Step 3: Anything with (GarageBand Name) drag to trash.
    Step 4: Insert (Mac OS X Install Disc 1) have ( Disc 2) on standby.
    Step 5: In pop-up window, pick( Install Bundle Software only).
    Step 6: The next window say (Welcome To Mac OS X Installer) just click continue.
    Step 7: In the next window is the (License agreement) click continue, then click agree.
    Step 8: The next window will say (Select A Destination) just click continue.
    Step 9: The next window will say (Easy Install On Macintosh HD) click (Customize) at bottom.
    Step 10: The next page will say (custom install on Macintosh HD) okay, just under this title... in smaller print, you will see (Package name) and under that you will see *black arrow*, blue box with a black line and next to that box it says (Bundle Application) click the (Black Arrow).
    Step 11: A list of applications will appear, uncheck all the boxes except (GarageBand) if you also want (GarageBand Demos) keep checked, if not, uncheck, depends if you ever uses them.
    Then click upgrade at bottom and let process, get ready to insert Disc 2, can't remember if you have to restart your computer, if so, the computer will mention this after installing. Then go back to Application file and receipts to verify the re-installments.
    Unfortunately! you just can't install (GarageBand Loops Only), not this route. ( GarageBand 3) should convert back to GB'08, if you have ilife '08 installed already or when you open up your compositions it will ask you if you want to save in updated version.
    I hope this is what your looking for, if not, disregard!

  • How do I remove/delete the loops I've downloaded?  I don't use them and they are taking up too much space on my hard drive.

    I wanted to see what was in the loops folders but now will never use them and I need the space. 

    Yes, I am logged in as the administrator.  When I drag a loop to the trash it does nothing.  The trash doesn't recoginize the item as trash and doesn't pop up and say trash like it does when I drag items from other programs to the trash.

  • Display chart via express vi - deletes first loop run

    The issue I have in this vi , is that I didn't want the second chart to be deleted, I'm recording in the
    2nd sequence.
    I'm working all the time in the same xy-graph, so is my first chart being erased when going into the
    2nd sequence ?
    Would be glad if you have an answer.
    stefan
    Attachments:
    express_graph.vi ‏169 KB

    Nevertheless I finally can't realize a continuous displaying of my 2 functions inside one
    xy graph window.
    I want to write this as only one line in a graph - so I don't really want to distinguish between
    counting up and down from the graph point of view.
    But the issue in the following example vi is, that I don't know how to link the express vi and
    the xy-chart output so that the programm is writing me the calculated x and y values in one
    chart one by another without being deleted during the runtime of the programm.
    Right now I'm getting the first fuction during counting up, after that the consistence is being interrupted... and even the values which have to be calculated later on during runtime seem to be there, before they are calculated - really confusing.
    Would be glad to get some hint from you....
    Attachments:
    simulation_graph_1.vi ‏209 KB

  • What's the trick?  Can't delete loops from Garageband loop browser.

    Am I missing something? I've tried to delete 3rd party loops directly from the Garageband loop browser, but could not. It wouldn't work in Garageband 08, and it won't work in '09.
    These loops were all added to the library by drag and drop into the loops browser.
    Is there something I need to do with file permissions?

    I think you can only delete loops from the browser that you created yourself with GB.
    Just delete the loops in the Finder and re-index everything.

  • Deleting Loops

    May someone please tell me how to delete the loops in Garageband that came with Soundtrack Pro? The the thing is, I uninstalled Soundtrack pro and it's loops. But Garageband still has SP's loops in the loop browser, but the loops are gone. Poof! Not in the hard drive. So the loops are still under GB, but you can't listen to them because I deleted them along with Soundtrack Pro. Which is worthless, so which is why I want to delete them.

    reindex them:
    http://www.bulletsandbones.com/GB/GBFAQ.html#reindex

  • Adding / deleting loops - where Garageband is relevant....

    All - this is a question involving Garageband, but only because I have heard Logic will "inherit" GB projects, so I'm assuming (not having bought it yet, pending this question possibly), that Logic operates its loops area the same way.
    I stumbled on this (archived) thread....
    http://discussions.apple.com/thread.jspa?threadID=1896042
    ... trying to find out why I couldn't:
    a) delete a loop folder that I added:
    I know where the Library\Audio\Apple Loops\User Loops folders are, and have
    - deleted a couple folders I dragged to the Loop Browser,
    - deleted the index files, etc,
    ...but there is still one folder showing up in the "User Loops" menu section, and all its files, and this folder is NOT in the above Library\Audio\Apple Loops\User Loops folder path. Where is it, and its files?
    Also, I thought I read that you could delete individual loop files just using the Delete key. That doesn't respond either, but it could be because I'm using a Windows keyboard.
    b) see other loop folders show up that I tried to add:
    After seeing two folders show up that I dragged to the L.B., no other folders dragged will show up, in the browser or in the Library\Audio\Apple Loops\User Loops folder/area. I tried
    - copying a folder full of files (these are all .wav files by the way) to the
    above ...\User Loops path, then
    - dragging that to the L.B., which started a "Garageband is reindexing... "
    message... but it never showed up in the L.B., nor did it make a new index
    file.
    All very odd and inconsistent. If Logic uses the same sort of loop add/delete browser functionality, it's doubtful if I'm going to buy it, if I can't even get this problem solved. I need to be able to use my own drum loop files, and see them. Thanks in advance for any help. It's GB '09 v5.1 by the way.

    Typically I have had this happen when the loops I have tried to add, were not proper Apple Loops for some reason... I assume you have been using the ALU to create the Apple Loops yes? if so, did you enter info in all the fields needed?
    There can be other reasons though...
    For example,
    Are the loops in other time sigs to 4/4 for example? If so make sure you select ANY in the Signature drop down menu in the Loop Browser to see them...otherwise you only see loops in 4/4 and they won't show up when you look for them. The same applies to to the scale filter in the browser too...Set that to ANY too...
    Finally, to confirm it is an error of some kind, be it user or Logic...have you checked the actual Apple Loops Folder to make sure the missing ones do actually reside there?

  • How to delete an Apple Loop ?

    Hello !
    First of all I use Garageband 10.1. I just created an apple loop and i want to delete it. How can i do this ?
    Thanks in advance !

    Theodore,
    quit GarageBand and delete the loop from your user library. The loops get installed in the folder
              ~/Library/Audio/Apple Loops/User Loops/
    After deleting the loop, reindex all loops. You can do that in GarageBand from the op-up menu at the top f the Loop Browser.
    You user library may still be hidden, as is the default:
    Quit GarageBand .
    Select the "Home" folder icon (the little house)  in the Finder's sidebar and press the key combination ⌘J to open the "view options". Enable "Show Library Folder".
    Then open the Home folder and open the Library folder inside and navigate to
    ~/Library/Audio/Apple Loops/User Loops/
    and remove your loop.
    -- Léonie

  • How to delete the row in table control with respect to one field in module pool programming?

    Hi,
    Can I know the way to delete the row in table control with respect to one field in module pool programming
    Regards
    Darshan MS

    HI,
    I want to delete the row after the display of table control. I have created push button as delete row. If I click on this push button, the selected row should get deleted.
    I have written this code,
    module USER_COMMAND_9000 input.
    DATA OK_CODE TYPE SY-UCOMM.
    OK_CODE = SY-UCOMM.
    CASE OK_CODE.
         WHEN 'DELETE'.
            LOOP AT lt_source INTO ls_source WHERE mark = 'X'.
                APPEND LS_SOURCE TO LT_RESTORE.
                DELETE TABLE LT_SOURCE FROM LS_SOURCE.
                SOURCE-LINES = SOURCE-LINES - 1.
            ENDLOOP.
    But I'm unable to delete the selected rows, It is getting deleted the last rows eventhough I select the other row.
    So I thought of doing with respect to the field.

  • Removing built in loops ?

    Hello all,
    I was just wondering if there was a way to remove/delete the loops that came with ios GarageBand .
    I know there's a way to reset and replace them but for now they're just taking up space on my device.
    Thanks

    Why go to the time and effort of removing it and the chance of damaging something else? Just tape a piece of paper over the camera. That way if you ever decide you want to use it for something, you can just pull the tape off.

  • Duplicate loops in GarageBand 11

    My GB Loop Browser shows duplicate loops, I would like to remove the duplicates. Not sure how or where.
    I know it's been asked many times but I can't find a GB11 specific solution. Previous versions of GB appear to store Apple Loops in different locations.
    Much appreciated
    AB

    No, the loops have been stored in the same place for years: HD/Library/Audio/Apple Loops.
    The first thing you should do is find out if you actually have duplicates in that folder. If yes, clean up so you have only one copy of each loop.
    The next thing is to quit GB and delete the Loop Index (also in the Audio folder). When you start up GB now, it should come with no loops. Drag your cleaned-up Loops folder onto the Loop Browser for re-indexing.

  • Loops not work - File type not supported

    Hi guys and girls
    one of the imacs (10.6.7) at the site I work at has begun to display the following message when you try to select any of the loops from within garageband.
    "file type not supported" and then you have no other option other than to abort. I have tried deleting the loop directory before dragging the loops back into garageband which has always fixed any issues with loops in the past, however the error still displays.
    Can anyone shed any light on this issue?

    The message I get is "Cannot open the file. Verify that the path and file name are correct and try again".
    Please see the Microsoft support doument Windows Media Player 9 Series for Mac OS X Readme. Scroll down to the section on Playing Protected Files.
    Sometimes you can view the source code for the web page to locate the specific media file. If you copied that address and then pasted that address in File > Open URL in Windows Media Player, you may get to listen to or watch the file. This trick does not always work.

  • Newly installed GB 11 - LOOPS ARE GONE and won't download updates

    i just installed GB 11 and tried to open files. virtually all my loops are grayed out. "The software instrument or loop is not currently installed on your computer - would you like to install the complete set of loops on your computer?" i click "Download Now". it tells me to check software update but nothing shows up in soft. update. i've tried restarting and opening other files but my loops are gone.
    did i just lose all my loops?

    Right on, Pbassjams. my sentiments exactly! that's the same response they told me at the apple store. and you go home and load the disc and say to yourself: "What the **** are they talking about? there are no loop options". i did find out however that you can go into your HD library folder - then open Audio folder and then you'll see apple loops. you can actually select all the loops in there and manually DRAG and DROP them into your loops section in GB. this may solve the problem or you could have a new annoying problem. you'll have each loop listed twice. if that's the case, here's what another apple user wrote in discussions:
    This sounds like a problem with several generations of GB content mixed in your loops folder.
    Apple at one point in time changed the loops from .aif to .caf. So you definitively need only one version of each loop, it'll save you a lot of disk space to delete the duplicates. So I would proceed like this:
    • Clean up your loops in the Finder by deleting the .aif versions of loops that you also have as .caf. (Sort the folder by kind, that should separate them.)
    • Delete the Loops Index folder completely.
    • Start up GB, it'll tell you you have no loops.
    • Drag your purged Loops folder into the Loop Browser window, GB will now create a new Loops index that will only contain the ones that are actually in that folder.

Maybe you are looking for

  • HT1206 how do i add multiple phones to my itunes account?

    how do i add multiple phones to my account?

  • My iCal calendar no longer syncs with my iPhone

    I bought an iPhone and an iMac just recently.  For the last two weeks they have been syncing whenever they ar both in the same WiFi network.  But latrely, they no longer sync when I change something in either calendar.  Any idea why?  They are both s

  • Windows Explorer View, Server 2012 and WebDAV

    I am using SharePoint Server 2013 on Windows Server 2012. I cannot get Windows Explorer View working from client machines on this server. These machines are Windows 8, running IE 10 (I am also having problems on my Windows 7 / IE 9 machine). I have d

  • Page break in script

    Moved to correct forum by moderator Hi all, We have a problem in script where we need to increase he main window size where it is being populated with items, when we increase the main window the footer is getting over written in main window,we need t

  • Unable to download documentation of Oracle 8i or 9i

    Hi, I'm unable to download Oracle 8i or 9i documentation at all. It gives some registration error. Kindly help. Many thanks regards Pramila