Efficient logic in a loop

Hello all,
I have a program where I have logic something like
loop at itab.
   sort itab ascending by prueflos.
    clear   : t_qamr, t_qamv, t_qapo, t_qasr, t_qapp.
    refresh : t_qals, t_qamr, t_qamv, t_qapo, t_qasr, t_qapp.
    CALL FUNCTION 'XYZ'
      EXPORTING
        I_PRUEFLOS    = itab-prueflos
      IMPORTING
        E_QALS        = t_qals
      TABLES
        T_QAMR        = t_qamr
        T_QAMV        = t_qamv
        T_QAPO        = t_qapo
        T_QASR        = t_qasr
        T_QAPP        = t_qapp
      EXCEPTIONS
        LOT_NOT_FOUND = 1
        OTHERS        = 2.
     if sy-subrc = 0.
     endif.
endloop.
The table itab can have duplicate prueflos. I don't want to run the FM XYZ for same inspection lots again and again as this FM takes considerable amount of time to run. For this I sorted the itab ascending by prueflos so that the duplicate prueflos would be one below the other. Now my idea is - if we come accross a duplicate prueflos, use the values t_qamr, t_qamv, t_qapo, t_qasr, t_qapp from previous iteration in the loop.
Could someone put there efficient ideas in. Let me know if something is not clear.
Thanks

Some suggestions.
Do not sort the same itab you are looping inside of your loop.  Sort once before you start looping.
After you sort, use
DELETE ADJACENT DUPLICATES FROM itab COMPARING prueflos.
and you'll have unique prueflos to loop through.
sort itab ascending by prueflos.
DELETE ADJACENT DUPLICATES FROM itab COMPARING prueflos.
loop at itab.
    clear   : t_qamr, t_qamv, t_qapo, t_qasr, t_qapp.
    refresh : t_qals, t_qamr, t_qamv, t_qapo, t_qasr, t_qapp.
    CALL FUNCTION 'XYZ'
      EXPORTING
        I_PRUEFLOS    = itab-prueflos
      IMPORTING
        E_QALS        = t_qals
      TABLES
        T_QAMR        = t_qamr
        T_QAMV        = t_qamv
        T_QAPO        = t_qapo
        T_QASR        = t_qasr
        T_QAPP        = t_qapp
      EXCEPTIONS
        LOT_NOT_FOUND = 1
        OTHERS        = 2.
     if sy-subrc = 0.
     endif.
endloop.

Similar Messages

  • Do you have to add effects to Logic Pro X loops when mixing a song?

    Hi everyone,
    I have a question that has been puzzling me and I cannot seem to find an answer for! I have searched high and low on the internet and still cannot find the answer and so I would be grateful to everyones help with this issue.
    My question is that you hear so much about the fact that when you are recording and mixing a track that different instruments for example the Bass Drum and the Bass guitar occupy similar frequencies and we are told that this is why you have to add effects to these instruments when mixing but what I want to know is are they talking about just organic instruments like real drums and a real bass guitar that you manually play and record to Logic Pro X`s audio tracks? Or should you treat the Loops exactly the same? And should you also add effects to the Logic Pro X loops when you are mixing those specific tracks?
    For example if I add a Drum Loop or Bass Loop to a project and then start mixing the song should I add any effects for example EQ, Compression to these Loops? And what would be the best effects to add to the Bass and the Drums when mixing to help them stand out in the mix?
    Many thanks.

    Jamiesroom wrote:
    ... when you are recording and mixing a track that different instruments for example the Bass Drum and the Bass guitar occupy similar frequencies and we are told that this is why you have to add effects to these instruments when mixing ...
    Whoever told you that overly generalized rule, please stop listening to that person .
    The way you post your question (and they are good questions) points out a big problem nowadays. There is so much cookie cutter solutions out there like if you have this, then use that, if you want to get this sound, press that button. The problem with that is that you you often have no idea why you are doing that in the first place.
    Let me give you a simple example about gardening (sorry about that). If I grow tomatoes and look up on the internet how often to water them, I can find an answer "water the tomatoes once a week". I might do that and result is that the tomatoes will die. What I didn't take into account is that the advice was given from someone growing tomatoes in Russia, and I live in California where I might need to water them once a day. So, the answer you are looking for is not "how often to water the tomato", instead you have to learn how much water, depending on your climate, the tomato needs"
    Your music is the tomato. So the question is not what button to press (how often to water), but what button needs to be pressed, depending on your specific recordings (your climate).
    If your bass drum and and bass guitar are more further apart frequency wise, then there might be no need to EQ them, it depends
    Nobody should or could tell you what to do, unless he or she sits next to you at the mix and "hears' what is going on and what needs to be done.
    Don't get me wrong, I don't say that there is a lot of great advice and general guidelines out there. The problem is when you apply that blindly without knowing a little bit why that advice is give and how to apply that, or if it applies to your situation at all.
    In addition: The skills and knowledge about the theory is as important as the skills and experience of listening and judging your recording/mix and decide what action to take.You have to learn what to listen to and what you hear. If you don't know how distortion sounds then you miss out on fixing that issue. If you don't know how a pumping compressor sounds, then you miss out on fixing that issue.
    I think you get the idea
    Hope that helps
    Edgar Rothermich
    http://DingDingMusic.com/Manuals/
    'I may receive some form of compensation, financial or otherwise, from my recommendation or link.'

  • How do you add Jam Packs to the Logic Express 8 Loop Library?

    I'm new to both Logic Express and Jam Packs. I just installed the new Voices Jam Pack and it is installed in the audio folder in my user library but it isn't recognized by logic, since the loops don't show up in the loop browser. I do not know how to add them to my loop library so if anybody knows how to add them I would greatly appreciate any advice. Also, when I installed logic express, my garageband loop library disappeared; is this just because all the loops were converted to a new format for logic to use?

    Simply drag & drop your Voices Jam Pack folder into the LE8 loops browser and they will be indexed and added to the library. See page 644 in the manual for more information.
    Re: GarageBand loops, you can check your HD/Library/Audio and your ~/Libray/Audio for all your Apple loops to make sure you still have your GB loops in either .aif or .caf formats. I still have both versions on my iMac, but if I remember correctly, when I installed LE8 I created a new folder for Apple loops in order to preserve my originals. Once you find your GB loops, try dragging & dropping them into GB's loop browser. If their format was changed perhaps GB just needs you to point to them.

  • Is there any way to remove items in a Logic Pro X loop?

    Hi everyone,
    I am using one of Logic Pro X`s many loops and I just wondered if there is anyway to edit this loop to remove a sound effect/musical component of it? The Logic Pro X loop in question is one of the drum loops "Hands High House Beat" and although I love the beat itself. I would like to remove the electric piano chord in the beat and just keep the rest of the drum beat as it is. I have tried doing this manually but its proving problematic!
    Any tips would be gratefully received.
    Many thanks.

    Hi JD321,
    Its a Blue audio Loop called Hands High House Beat.
    So that means I should try filtering right? I am not familiar with Filtering. How would I go about remove components of this loop while keeping other components?
    A step-by-step guide would be great.
    Many thanks.

  • Logic Pro, Apple Loops, and Restoring from Time Machine

    I recently had to restore my Mac from a Time Machine backup, and like most things touched by Apple, the restoration worked flawlessly for all my stuff, with a few exceptions. Some 3rd party apps I use had problems with file permissions but most of it was quickly sorted out in under half an hour.
    However, Logic Pro refuses to see the Apple Loops I have installed on my system. My Loops are stored in two folders at the following locations:
    /Library/Audio/Apple Loops/Apple/Apple Loops for Soundtrack/
    /Library/Audio/Apple Loops/Apple/Apple Loops for Soundtrack Pro/
    GarageBand has no problem seeing these, but Logic Pro can't find them, and won't let me show it where they are. The Apple Loop Utility found them alright, although I did have to show it where the files were kept. Any idea what's wrong?

    You may need to rebuild the loops index.
    Open up Logic and display the Loops Browser
    Open up FInder and locate the folder containing the loops as you describe
    Drag the loops folders onto the Loops Browser
    That will rebuild the index and all should be well.
    Pete

  • Logic pro 9 loops dissapeared

    After i installed logic pro 9 and the loops ( some still says incomplete) i got a window that i should wright in my apple pass and all my loops turned grey and i cant get them back. I have the loops on the computer but i cant get them into logic. I have also tried to install the loop packages one by one but it still doesnt work what can i do?

    Welcome to the Support Communities.
    Broke-N wrote:
    ...but if your running an older machine...
    Source: How to Use You're and Your

  • Logic pro 8 loops in garageband 3

    I cannot get most of the loops shown in garageband 3 to play. These are new loops since I installed Logic pro 8. The loops are not greyed out but they will not play. Also since installing Logic pro, I no longer have a jazz kit in Garageband. Any suggestions would be most appreciated.
    Thanks,
    Glenn Parsons

    Also since installing Logic pro, I no longer have a jazz kit in Garageband. Any suggestions would be most appreciated.
    Not sure if this is your problem specifically, but check this out:
    http://discussions.apple.com/message.jspa?messageID=6602988#6602988

  • Can I open Remix Tools 2 in Logic Pro's Loop Browser?

    I have no problem opening up GarageBand's Jam Pack Remix Tools 2, but can only figure it out through "Import Audio File" and it's in the form of one extremely long list of files.
    Is there anyway to open up this Remix Tools 2 in the same fashion of opening up "Jam Pack Management" that came with Logic Pro when I bought it? That looks a lot more organized and I'd rather click on "beats" or "bass" versus scrolling down the listen of Remix Tools 2 in alphabetical order trying to find each "beat" or "bass" contained in every file.
    I'd like to open this up Remix Tools 2 through "Audio" -> "Loop Browser" but don't understand the means to get it there or if it is possible even. Any help would be grateful.

    Wait, so how do I delete this thread? My question was answered in a previous thread (although from when I read it I didn't understand what it meant at the time).

  • Can't load Logic Pro X loops.

    I can't get my Logic loops to appear in FCP X 10.1.1
    I have repeatedly opened Logic Pro X and FCP X and also trashed the preferences to no avail.
    Dragging the "Logic" folder to the FCP X music browser does no good as not even a + sign will appear.
    I'm desperate as I have a vital deadline in 5 minutes!

    OK I've got a result but it's left my Music and Sound browser looking very untidy.
    I couldn't get Logic to load itself and eventually had to drag my Apple Loops folder into the top part of the window (which I had forgotten existed as it was hidden) where it is now residing as a Folder, which can be deleted if I wish.
    Unfortunately there are a number of items listed such as Garageband and Logic etc. which are not folders but are empty and I cannot delete these.
    Is there any way of deleting items that are not actually Folders?

  • HT200280 Logic Pro X loop cannot played any loops. How do I fix this?

    Hey guys,
    I have a really frustrating problem regarding my loops database. Initially, I was attempting to create an alias for my loops and move the files to an external hard drive in order save some space on my hard drive, and did so through using "Terminal" to create the link. I've since moved the loops back to their original location, but my loops in the loops browser are greyed out and they will only reappear if I plug the external drive back in. So let me run down my troubleshooting process...
    I've reindexed the loops in Logic but the LoopsDatabaseV08.db file populates in the external drive
    I've tried to drag the loops directly to Logic, but I guess this method only works with older LogicI've also tried this same method in GarageBand, but no luck
    I've attempted to uninstall/remove everything related to Logic, and reintstall the program. Again, no luck
    I feel the issue may be linked to what I messed around in "Terminal," if I'm correct could someone help with the code to correct this. Or if anyone has any other suggestions, all are welcome.
    Thanks

    Shut down your Mac... Unplug any external midi  keyboards and/or controllers...  and then restart your Mac
    Now test with Logic Pro and a new project and see if this behavior continues.. If not you know what the cause is... and you will need to check the settings for your external devices..
    You may need to delete Logic's CS prefs and re-add your external devices once more if you cannot solve the issue with your midi devices on the devices themselves...
    Quit Logic Pro
    In the Finder, choose Go to Folder from the Go menu.
    Type ~/Library/Preferences in the "Go to the folder" field.
    Press the Go button.
    Remove the com.apple.logic.pro.cs file from the preferences folder.
    Restart the computer.
    Note: If you cannot find this file you did not follow the steps exactly as described!
    Failing that, power down (not just put to sleep) any iOS devices you have and test with a new project in LPX again. If that resolves the issue then you have/had one or more midi/controller/remote apps running in the background of your iOS device.. Make sure you quit the apps, not just close them when you are finished using them....
    http://osxdaily.com/2013/09/28/quit-apps-in-ios-7/

  • How To Set the Resultstate of Business Logic CO for Loop Decision Action

    Hi,
    I'm using a pre-conditional loop block in my GP process and using a Business Logic CO for the loop decision action. My expectation is the business logic CO should be executed at background and based on its resultstate the loop flow will happen. I've 2 resultstates in the loop decision (bus logic CO) - Continue and Break. I'm setting these two resultstates in the following way :
    Continue : BOOL(@currentLevel < @totalLevel)
    Break : !BOOL(@currentLevel < @totalLevel)
    currentLevel and totalLevel are the two input parameters (unsigned int type) of the business logic CO. If I test the CO it works fine and displays the correct resultstate. But at runtime the process gets paused at the loop decision action CO. I see the loop decision action link in my GP workcenter and UWL and on clicking of it nothing happens. If I refresh the screen still it's there as before.
    Anybody who can throw any light on this issue will be highly appreciated. And reward points guranteed for any help to solve the issue
    Thanks in advance,
    Dipankar

    Hi,
    Well I solved this issue myself ! After lot of research I found out that the resultstates should be in all small case <b>continue</b> and <b>break</b> and NOT Continue or Break.
    But now I've a different issue:
    I've an initial action under a sequential block. Then the pre-conditional loop block with a loop decision action and a loop body block(seq block).
    The expectation is initially the decision action should get the output param passed by the initial action and then in the iterations it will get the values passed by the output params of the loop body action. To achieve that I have mapped the output param of the initial action to the input param of the decision action and the input and output param of the loop body action. But it seems that the loop decision action though mapped to both the output of the initial action and the loop body action takes the value only from the initial action over the iterations and the values from the loop body action are not getting passed to the loop decision action. The context parameter value of the loop decision action remains static and it becomes an infinite loop.
    Any help to resolve this issue will be highly appreciated.
    Thanks,
    Dipankar

  • Logical Database-GET-LOOP.

    Hi,
    I am debugging a standard code where PYF logical database is used.
    START-OF-SELECTION.
    GET REGUH.
      CHECK SEL_ZAWE.
      CHECK SEL_UZAW.
      CHECK SEL_HBKI.
      CHECK SEL_HKTI.
      CHECK SEL_WAER.
      CHECK SEL_VBLN.
      PERFORM PRUEFUNG.
      PERFORM EXTRACT_VORBEREITUNG.
      PERFORM SORTBANK.
    GET REGUP.
      PERFORM SORTBOLETO.
      PERFORM EXTRACT.
    END-OF-SELECTION.
    SORT BY
        REGUH-ZBUKR                      
        REGUH-UBNKS                      
        REGUH-UBNKY                      
        REGUH-UBNKL                      
        REGUH-UBKNT                       
        REGUD-XEINZ                       
        REGUH-ZBNKS   
        REGUH-ZBNKY
        REGUH-ZBNKL
        REGUH-ZBNKN
        REGUH-LIFNR
        REGUH-KUNNR
        REGUH-EMPFG
        REGUH-VBLNR
        REGUP-BELNR.
    LOOP.
    AT END OF REGUH-VBLNR.
    ENDAT.
    ENDLOOP.
    Can anyone here please let me know
    1.whether it is looping on REGUH or REGUP.Is it on REGUH ?
    2.How to see the records in debugging for this loop.
    I mean as in internal table where we will get to see all the records that it is looping (loop at itab..endloop),how to see
    all the records that are considered for this loop in debugging.
    3.Does it loops both REGUH and REGUP ?
    Thanks,
    K.Kiran.

    INSERT
      reguh
      regup
      regud-gjahr
      regud-xabwz
    INTO daten.
    this create a structure (field group) for DATEN with every fields of reguh and regup, and two fields of regud.
    EXTRACT daten.
    move current values of the above mentionned structures to the group field and append it into the extract.
    LOOP.
    ENDLOOP.
    will read the extract, here DATEN, so in each loop the whole data of the above mentionned structures will be available.
    There are also SORT and AT options similar to those of internal tables, and a AT field_group when multiple structures were defined by INSERT statements.
    Read some documentation at [Extracts|http://help.sap.com/abapdocu_70/en/ABENABAP_EXTRACTS_EXTENDED.htm]
    Regards,
    Raymond

  • How do you change the key of a Logic Pro X loop?

    Hi everyone,
    I am working on a song in Logic Pro X using one of the loops and I just wanted to know how to change the key of the loop to fit in with the key of the song? The key of my song is C Major while the Loop is in G Major.
    Any tips would be gratefully received.
    Many thanks.

    Jamiesroom wrote:
    How do you change the key of one specific loop using the Key/Transpose in the Inspector? Step by step instructions would be great.
    Many thanks.
    Here is the step-by-step instruction:
    Step 1: Select the MIDI Region and set the Transpose value in the Region Inspector to the left.
    Step 2: There is no Step 2
    If you are a newbie, then I would recommend to have a look at my Graphically Enhanced Manual "Logic Pro X - How it Works" where I explain everything in great details with lots of easy to understand diagrams and screenshots, including a separate chapter about Apple Loops.
    BTW: If you have a proper Apple Loop, then it should automatically adopt to the key of your Project. A transpose is not necessary, unless you want to overwrite a phrase to a specific key.
    Hope that helps
    Edgar Rothermich
    http://DingDingMusic.com/Manuals/
    'I may receive some form of compensation, financial or otherwise, from my recommendation or link.'

  • Logic for nested loops

    Hi guy's,
    I required tipical logic pls any body help me,
    I have to fethch EBELN ,BEDAT from EKKO and  MATNR from EKPO
    based on that i have to go KEKO table based on MATNR
    I have to fetch KALNR and KADKY ,  BEDAT should be between range of BIDAT and KADAT.
    Based on KALNR   i have to go for CKIS table now i fetch  COMPONENT MATERIALS and ELEMT
    If i get the ELEMT 000 again i have to take COM.MATNR  again we have to go KEKO I have to get take KALNR KADKY and
    again i have to go for CKIS .
    I have to continue this logic up to in ELEMT = 010 .Here iam geting the problem.
    MATNR   ELEMT        I have to continue this loop up to elemt become 010 . how many tables i have to declared how to read
    A             000                the tabel.Pls any body help me.
    B              010
    C              010
    D              000
    Thanks
    santhosh
    Edited by: santhosh kumar on Sep 2, 2009 10:13 PM

    Hi,
    You have all the tables and field names and the link between each of the tables. Why dont you start with the select query as per the requirement? You can always revert back if you are stuck up anywhere. Generic questions are not allowed here.
    Regards,
    Vikranth

  • Logic x stuck looping 1 beat

    I just switched to Logic after 18 years on DP.  I think I've got a bug.  I create a software instrument track, recorded a few bars, playback works for awhile then out of nowhere it will play 1 beat then loops.  bam bam bam bam bam...just playing beat 1 over and over again.  Hit record, can record as long as I like, playback, same thing.  Been fighting with this since I bought it about a week ago.  Sometimes I can quit for a few hours then it works...for awhile, then it will start doing it again.
    Any ideas?  Thx
    Core 2 Duo iMac, 4 gigs RAM
    Mavericks

    Hi, I'm pretty sure you've engaged cycle play…..
    http://help.apple.com/logicpro/mac/10/#lgcp59e41e86
    Pressing the letter c on your keyboard, usually, toggles the cycle function on/off btw.
    Have a nice day!

Maybe you are looking for

  • Grouping Open Items in F110

    Hello Experts, Requirement: Single Payment to be generated for all the Invoices falling due on a particular day for the vendor. Configuration Settings made: In FBZP for the Payment method T, the Single Payment for marked items is not flagged. Payment

  • SALES-ORDER-TO-CASH-RECEIPT(S2C)

    Dear SRM Experts, How does the integration happen with S2C with SRM?.I need your valuable inputs. Regards, kiran

  • Display Page X of Y in footer area

    Hi All, I am new to ABAP OOPS. I am using OLE programing method. I want to display Page no in the form of Page X of Y at Footer area of the word file. I used one program which displayed every thing except Page no in footer area. Footer area should be

  • Can't play or preview music and movies in Finder window

    I notice I can't play or preview music in the finder window. When I hit "play", the slider moves, but I don't hear any sound. Music is playing fine in iTunes. I also can't preview and play movies in the finder, like .mov files. In addition, I can't p

  • No iPhone Receipt

    I dont have my receipt. But will i still get the coverage?