Multiple loop in one loop

Dear experts,
Please find the code below.This is text variable customer exit.Can u ple help me to put these multiple loops into one loop.Do u suggest this code is ok?
Appreciate your help.
WHEN 'ZSTXTPE01AA'or 'ZSTXT0FISCPER305AA'or 'ZSTXT0FISCYEAR01AA'
INCLUDE Z_VARIABLES_TEXT
DATA: vtype i,
      fisper i,
      fisyear i
IF I_STEP=2.
LOOP AT I_T_VAR_RANGE INTO loc_var_range WHERE VNAM='ZS0VTYPE01AA'
vtype=LOC_VAR_RANGE-LOW
ENDLOOP.
CLEAR L_S_RANGE.
L_S_RANGE-LOW= vtype.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
LOOP AT I_T_VAR_RANGE INTO loc_var_range WHERE VNAM='ZS0FISCPER305AA'
fisper=LOC_VAR_RANGE-LOW
ENDLOOP.
CLEAR L_S_RANGE.
L_S_RANGE-LOW= fisper.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
LOOP AT I_T_VAR_RANGE INTO loc_var_range WHERE VNAM='ZS0FISCYEAR01AB'
fisyear=LOC_VAR_RANGE-LOW
ENDLOOP.
CLEAR L_S_RANGE.
L_S_RANGE-LOW= fisyear.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
ENDIF.
Rgds
ACE

LOOP AT I_T_VAR_RANGE INTO loc_var_range
WHERE VNAM IN('ZS0VTYPE01AA', 'ZS0FISCPER305AA','ZS0FISCYEAR01AB')
vtype=LOC_VAR_RANGE-LOW.
endloop.
L_S_RANGE-LOW= vtype.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
L_S_RANGE-LOW= fisper.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
L_S_RANGE-LOW= fisyear.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
try the above code
also
What u r doing inside ur loop endloop?

Similar Messages

  • Multiple loops in one loop for text variables

    Dear experts,
    Please find the code below.This is text variable customer exit.Can u ple help me to put these multiple loops into one loop.Do u suggest this code is ok?
    Appreciate your help.
    WHEN 'ZSTXTPE01AA'or 'ZSTXT0FISCPER305AA'or 'ZSTXT0FISCYEAR01AA'
    INCLUDE Z_VARIABLES_TEXT
    DATA: vtype i,
          fisper i,
          fisyear i
    IF I_STEP=2.
    LOOP AT I_T_VAR_RANGE INTO loc_var_range WHERE VNAM='ZS0VTYPE01AA'
    vtype=LOC_VAR_RANGE-LOW
    ENDLOOP.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW= vtype.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    LOOP AT I_T_VAR_RANGE INTO loc_var_range WHERE VNAM='ZS0FISCPER305AA'
    fisper=LOC_VAR_RANGE-LOW
    ENDLOOP.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW= fisper.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    LOOP AT I_T_VAR_RANGE INTO loc_var_range WHERE VNAM='ZS0FISCYEAR01AB'
    fisyear=LOC_VAR_RANGE-LOW
    ENDLOOP.
    CLEAR L_S_RANGE.
    L_S_RANGE-LOW= fisyear.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'EQ'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDIF.
    Rgds
    ACE

    Hi ACE BW,
    You can try to use the SELECT statement and then include the LOOP inside it.
    Thanks,
    Daniel

  • How to Change multiple keys on one loop in one track

    Several one-to-one lessons fail to reveal how I can change loops key independent of other loops. Example, take a loop and loop it four times in one track, trying to make first loop E, second loop A, third loop B, fourth loop C. Seems when I change one, they all change to the new key. Anyone know how to create independent control over each segment?
    Message was edited by: TomRin

    See this support article:
    Record multiple takes:  http://help.apple.com/garageband/index.html#gbnda1184253

  • More than one loop in audio file

    Please, allow more than one loop in a wave file. This functionality was present in the Adobe Audition 3.0, but it is gone now. The sampler tab is gone from the metadata. Please, bring it back. Even though, the user can set more than one region marker in the wave file, only one of them is internally set to be understood as a loop and there is no way how to set more loops in a wave file. Please add this functionality back into the Audition.

    Only one audio file can be used in a Lightroom slideshow.
    You'll have to combine multiple songs into a single audio file (e.g. using Audition) then use the single audio file in the Lightroom slideshow.
    For more flexibility, you can use commercial software such as ProShow Web, Gold or Producer which comes with a free Lightroom plugin
    ProShow Gold - Create Fast and Fun Photo Slideshows
    ProShow Web - Instant Photo and Video Slideshows from your Mac or PC
    Plug-ins for ProShow

  • Drawback of putting producer and consumer in one loop. [Ethernet IP]

    The "Create Assembly Instance" exapmple vi have two separte loops. One for the input (producing data) and the other for the output (consuming data). Would it be possible to combine everything into one loop? Are there any drawbacks to using one loop for the input and the output?
    and i know one drawbacks will be that both consumer and producer will have to have the same rate.. 

    That's an interesting piece of code.  It's not so much a producer/consumer as it is two separate loops handling input and output.  Take a look at this link to see what producer/consumer is: http://www.ni.com/white-paper/3023/en/  You can also find the code by going to File->New and opening the "From Template" folder under VI.
    What controls your state machine?  With events not being possible on a RT system, I'd expect you'd have some form of polling.  Polling would still use a time period between polls.  Granted, the network requirement would definitely break determinism, as you've already noted.  If you're doing this, why not put it into a timed loop?  Timed loops aren't always determinstic.  That's why there is a "Finished Late?" terminal.  It's not the loop that makes the code deterministic, it's the way you put your program together. By moving it into a timed loop, you gain the ability to give it a priority.  I'll explain why this is important in a minute.
    You're welcome to combine the two into a single loop if you still meet your timing requirements.  That's a design choice that is up to you.  I don't know what your other Ethernet/IP "stuffs" is, but I'd likely combine this into my output loop if possible.  I'm assuming it has something to do with the data you care to send.
    The overhead from the loop isn't enough to worry about the worload on the CPU.  Ultimately, the code within the loop determines how rough you're being on the CPU.  That's true in one loop or in four loops.  Splitting code into multiple loops just lets you prioritize code.  If everything is in a single loop, it all must run before the next iteration.  If your code is split into ten loops, as an example, only what is inside each loop must be run on that loop's iteration.  Using priority, as you've mentioned, ensures you determine which loop runs first.  Let's say that loop completes and gives the other loops time to run on the CPU.  Before they complete, the loop wants to run again.  The CPU will go back to that loop and run.  By splitting the loops up, you've ensured this piece of your code will run even if the CPU can't handle processing all of the code within that period.  Rather than hurting determinism, you've aided it.  The parts of your code that you aren't worried about being deterministic happen when the CPU has time for them.  The parts that you NEED to be deterministic happen deterministically and push those other parts of the code out of the way.
    Looking at the example code you're showing, I'd really want to know what it is you plan to do with the code and what you need to be deterministic.  I'd assume you plan to read the data, process it, and send a corresponding output.  If you need ALL of this to be deterministic, I'd put it within a single loop or use queues to send data from the input loop (commented as consumer) to the output loop (commented as producer).  This decision would really just depend on how fast you care to acquire data and how deterministic you desire the output to be.  Without using the queues, you create something called "race conditions."  When you send an output, is that related to the newest input or one before it?  You simply cannot tell.  
    Jeff B.
    Applications Engineer
    National Instruments

  • How can I move data from one loop to another?

    I am using LabVIEW to record and display data.  The problem that I have run into is that if I try to collect and display the data all in one loop data points are lost because the loop takes so long to execute.  I decided to break my program into two independent loops and the data is recorded at proper speeds, but now I cannot get the data out of the first loop and into the second loop.

    See my example for one method of how to setup the Queue which Omar suggested. You'll also see many other ways, most of which should be avoided until you get more experience.
    Communicating Between Loops
    Richard

  • How can I set one loop's frequency as a slave of another loop ?

    I have 2 loops in parallel. The first runs at 500Hz. The AIread controls the frequency. How can I set the second one at 100Hz ? It is very easy to set it with local variable, but really not clean. The second loop must not use the CPU while waiting the next 100Hz tick. Is it possible ? I am trying to use occurrence, but the second loop will always (I think) use CPU while waiting next tick !
    Is it possible to set one loop in one thread and the other one in another thread ? Then set each thread to a CPU (I use a bi-xeon PC)
    Thanks

    cariboo wrote in news:5065000000080000001EBE0000-
    [email protected]:
    > I have 2 loops in parallel. The first runs at 500Hz. The AIread
    > controls the frequency. How can I set the second one at 100Hz ? It is
    > very easy to set it with local variable, but really not clean. The
    > second loop must not use the CPU while waiting the next 100Hz tick. Is
    > it possible ? I am trying to use occurrence, but the second loop will
    > always (I think) use CPU while waiting next tick !
    > Is it possible to set one loop in one thread and the other one in
    > another thread ? Then set each thread to a CPU (I use a bi-xeon PC)
    > Thanks
    One solution is to place a case inside the loop which run at 500 Hz. Put
    your 100Hz code inside the True case. Use the "Quot
    ient & Remainder"
    funtion and the iteration counter to execute the true case every fift
    execution of the 500Hz loop.
    This may not work if the 100Hz code use to much time, it will then delay
    the 500Hz loop.
    I would go for the occurences solution. The wait will use some CPU
    resources while waiting but i don't think that should be any problem (when
    done correctly).
    Rolf

  • Exiting more than one loop at a time?

    I have craeted a Simulated Annealing program. The pseudo code is this:
    int          temperature = x;
    double  coolingFactor = y;
    int          iterationsAtTemperature = z;
    int          currentChromosomeFitness = a;
    do{
        for(int counter=0; counter<iterationsAtTemperature; counter++){
            ...... generate new solution ......
            ...... evaluate new solution ......
            ...... swap with old solution if fitter ......
            // ESCAPE IF A SOLUTION OVER A CERTAIN FITNESS IS FOUND
        iterationsAtTemperature++;
        temperature = temperature * coolingFactor;
    )while(temperature > 0);I would like to know how to escape all of the loops when a solution over a certain fitness is found. Any ideas in how to escape not only the inner for loop but also the do-while loop in one.
    Cheers

    One way:
            int x = 0,y = 0;
            done: for (int i = 0; i < 100; i++) {
                for (int j = 0; j < 100; j++) {
                    if (i == 50 && j == 50) {
                        x = i;
                        y = j;
                        break done;
            System.out.println(x + "," + y);

  • In the attached VI why does one loop coerce the data type while the other doesn't?

    In the attached VI why does one loop coerce  the data type while the other doesn't?
    Solved!
    Go to Solution.
    Attachments:
    AAA.vi ‏8 KB

    I'm guessing you created the Enum on the front panel.  If you right-click it and create an indicator, it will match the type, and be an enum.  LabVIEW represents enums as U16, but because the types aren't identical (for example, your enum has 3 values, but a U16 has 65,536 values), LabVIEW automatically coerces (or converts) the smaller (enum) representation into the larger (U16) value.

  • I have been sampling new imported drum loops. And if I adjust region to song or time strecth it updates the audio file in the library. How to stop this? I lost the original setting to one loop. automatically doing it ??

    I have been sampling new imported drum loops. And if I adjust region to song or time strecth it updates the audio file in the library. How to stop this? I lost the original setting to one loop. automatically doing it ??

    This "original file cannot be found" thing happens if the file is no longer where iTunes expects to find it. Possible causes are that you or some third party tool has moved, renamed or deleted the file, or that the drive it lives on has had a change of drive letter. It is also possible that iTunes has changed from expecting the files to be in the pre-iTunes 9 layout to post-iTunes 9 layout,or vice-versa, and so is looking in slightly the wrong place.
    Select a track with an exclamation mark, use Ctrl-I to get info, then cancel when asked to try to locate the track. Look on the summary tab for the location that iTunes thinks the file should be. Now take a look around your hard drive(s). Hopefully you can locate the track in question. If a section of your library has simply been moved, or a drive letter has changed, it should be possible to reverse the actions.
    Alternatively, as long as you can find a location holding the missing files, then you should be able to use my FindTracks script to reconnect them to iTunes .
    tt2

  • Output strings from loop into one string

    im trying my best to explain my problem so ber in mind:)
    hey having a bit of trouble with outputing strings from loop
    example
    i typed ab into the textbox
    the output should be 12
    but since it is in a loop it would only output the last string and in this case is 2
    im trying to get both strings from the loop and output strings from loop into one string.
    here is some of my code to understand my problem
    // characters a to f
         char[] charword = {'a','b','c','d','e','f'};
         String charchange ;
      // get text from password textbox
                          stringpassword = passwordTextbox.getText();
                          try {
                          // loop to show password length
                          for ( int i = 0; i < stringpassword.length(); i++ ){
                          // loop to go through alfabet     
                          for (int it = 0; it < charword.length; it++){
                             // if char equals stringwords
                               if (stringpassword.charAt(i) == charword[it]){
                                    System.out.print("it worked");
                                    // change characters start with a
                                    if (charword[it] == 'a'){
                                         charchange = "1";
                                    // change to 2
                                    if (charword[it] == 'b'){
                                         charchange = "2";
                                        }

    Not sure how you are displaying the result but you could display each value as soon as you find it.
    if (charword[it] == 'a'){
        System.out.print("1");
    }If it is in a text field then use append. Or if you really need a String with the entire result then use concatenation.
    if (charword[it] == 'a'){
        charchange += "1";
    }

  • Transforming one loop in another one

    is it theoretically possible to transform any loop into any other loop?
    For example: a while loop in a do-while loop or a for-loop in a while loop?
    Tnx

    YertleTheTurtle wrote:
    I don't think you understood my question correctly. I think I did understand your question.
    I don't need to write an algorithm to convert one loop in any given other loop. I just need to know if it is possible to change one loop in another by modifying the code.One easy, scientific way to answer an "Is it possible to ..."-style questions is to provide an algorithm that does what is asked for and works in ever case. If such an algorithm exists, then the answer to the question is "Yes, it's possible".
    I was trying to direct you to a rather simple (but possibly not ideal) algorithm to do that conversion.
    for example:
    int example = 5;
    do
    example++;
    while ( example<5 )
    First step: convert the loop to an endless loop:
    int example = 5;
    do {
      example++;
    } while (true);Second step: add logic "manually"
    int example = 5;
    do {
      example++;
      if (!(example < 5)) {
        break;
    } while (true);Third step: convert endless do-while loop into any other endless loop you want (left as an exercise for the reader).
    Of course this is an easy example but i need to know if it is theoreticaly possible to to this for any given loop into any other given loop.Well, step 1 and step 3 are trivially possible in every case. The only thing you need to make sure is that step 2 is possible in every case. And I personally am pretty sure that it's possible in every case.

  • How does one loop playback of small selections within the timeline?

    How does one loop a selection of footage from within the timeline? I'm trying to edit students' tapping hands and pencils on desks into small timed chunks that will play back as seamless loops and I need to be able to slowly shorten or elongate sections of footage as it plays and repeates until the loop matches the timing of the song we are making. I'm using PE8 and can't seen to find an easy way to do this. Surely there is one! Is there?

    I appreciate the help everbody, but It looks like I didn't state my question effectively. Let me try again.
    It will be easier if I explain what it is I am used to. This is what I need to know how to do in PE8, because the school in which I teach AV has chosen PE8 for my classes and won't let me install anything else.
    In Sony Vegas - all versions, you can click and drag to quickly make a selection of video and audio. You can do this while video is rolling and you can then choose to have your A&V loop within this selection. I have seen replies on this forum where this feature within Vegas was treated as if it were a dumb thing. It's not dumb once you realize what it can be used to do for you. While continuing to loop within your slelection, you can move this selection throughout your timeline, rough tuning where you want your loop to be. If your loop needs to be exactly 66 frames, for instance, you could first set this selection at 66 frames and then move it up and down the timlene until you find the best place to cut. Or, in the case of trying to find where some sound within your selection makes a seamless loop, you can increase or decrease the size of your selection on the fly as the selection continues to repeat.
    How do you do that in PE8? If it can't do it, can the full version of Premiere?
    Thanks again for the help.
    -Chris

  • Store the previus result in one loop

    Hello,
    I need to work with the previus result of one function in one loop. How could I do it???
    Really that I must to do Is compare the temperature in one moment with the previus moment temperature, and Could I to store the most up of them and accept to it the next time that I call this loop??
    Could someone help me???
    Thanks
    Gonzalo

    Gonzalo,
    please take a look here.
    Norbert B.
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Synchronising two time loops in one vi

    Hiii, Everybody
                I am facing the problem for synchronising the timed loop, actually, i want one loop to generate the data and another timed loop to used that generated data to make a buffer of type fifo, but when i run these two loops, it hangs, what happens is upto 200 records, it runs good, but after that both the loop gets hanged, instead i want both to run synchronously without hanged, here with this i am attaching my vi and in the vi i have given some description, and i am also attaching drivers, which are in the vi, which help you to run it.
    Thanks,
    Nishant
    Attachments:
    2026_buffer_multitask.vi ‏1198 KB
    2026vi.llb ‏319 KB

    Hiii, Altenbach
          Ya i am attaching the globla vi, some of it are in this post and rest of them will be in next post.
    Thanks,
    Nishant
    Attachments:
    Digital Global.vi ‏21 KB
    Cluster_global.vi ‏410 KB
    Global AD.vi ‏89 KB

Maybe you are looking for

  • FLV files won't play on testing server

    I've created a site with several videos on multiple pages. They play on my local computer but will not work when uploaded to my server. I get an error in opening the page and a "plug-in cancelled" message in the Activity window in Safari. Other FLV f

  • Connecting oracle 10g express edition to jdeveloper

    I am having all kinds of problems connecting oracle 10g express edition with my jdeveloper 10.1.3.3. I can query the database from my command line so I know it is set up, but for whatever reason jdeveloper will not connect with it. When I try to conn

  • What/any new features in AirPort Extreme 5th Generation?

    Apple Support has deleted tech specs for 2G & 4G AirPort Extremes, so it's difficult to compare those previous gens to the latest. Can anybody comment on what/any new features are in AirPort Extreme 5th Generation?

  • Design-time stylesheets...

    Design-time stylesheets allow you to see what your included element will really look like, while you're working. However, the stylesheet is forgotten if you hit F12 to preview. What's displayed has no styles associated with it. Is there any way to te

  • High z-index fixed position footer, links in container above not active

    I have a site with a fixed position footer with highest z-index.Links that are close to the footer (but in the container above footer) do not show as active unless I scroll upward away from footer. Once away from footer a little, they become active.