Confusion in loop inside loop

Hi Experts,
i have some confution in below code:
here am trying to calculate  Actual Billing and Planned Revenue. but here for each value am looping it_final table inside the main loop.
but the prob is if i loop it_final for one value it is giving value, but if i try to loop 2 times for 2 values, it is not giving first value also.  
i.e if i comment loop for Planned Revenue then Actual Billing is displaying, if i try for 2 values, then its giving zeros for 2 values.
so could anyone check is there any mistake i did.
CLEAR: it_prps, it_final, wa_final, wa_it_prps.
  LOOP AT it_prps.
    CASE month.
      WHEN '08'.
  ACTUAL BILLING
        LOOP AT it_final INTO wa_final
         WHERE posid = it_prps-posid
            AND wrttp = c_04
            AND beltp = c_02
            AND versn = c_0
            AND ( vorga = c_coin OR vorga = c_rku2 ).
          CLEAR act_billing.
          IF sy-subrc IS INITIAL.
            MOVE wa_final-wlp08 TO t_act_billing.
            act_billing = act_billing + t_act_billing.
          ENDIF.
          CLEAR: it_prps, it_final.
        ENDLOOP.
*************PLANNED REVENUE
        LOOP AT it_final INTO wa_final
                         WHERE posid = it_prps-posid
                         AND wrttp = c_01
                         AND beltp = c_02
                         AND versn = c_0
                         AND ( vorga = c_sdor OR vorga = c_rkp5 ).
          CLEAR plan_rev.
          IF sy-subrc IS INITIAL.
            MOVE wa_final-wlp08 TO t_plan_rev.
            plan_rev = plan_rev + t_plan_rev.
          ENDIF.
          CLEAR: it_prps, it_final.
        ENDLOOP.
ENDCASE.
ENDLOOP.
WRITE:/10 'Actual Billing is',act_billing.
WRITE:/20 'Actual Cost is........', actu_cost.
Thanks in advace,
sudharsan.

Hi SUDHARSAN RAO
U r clearing the headers and tables. So u cannot use the values on the nested loops  as u have cleared the values. There wont be anything in the workare ur using in where clause.
Please see the below comments that I kept.
LOOP AT it_prps.
ACTUAL BILLING
LOOP AT it_final INTO wa_final
WHERE posid = it_prps-posid
AND wrttp = c_04
AND beltp = c_02
AND versn = c_0
AND ( vorga = c_coin OR vorga = c_rku2 ).
CLEAR act_billing.
IF sy-subrc IS INITIAL.
MOVE wa_final-wlp08 TO t_act_billing.
act_billing = act_billing + t_act_billing.
ENDIF.
CLEAR: it_prps, it_final.
Here IT_FINAL is cleared by u... should not be cleared
ENDLOOP.
*************PLANNED REVENUE
LOOP AT it_final INTO wa_final
WHERE posid = it_prps-posid
AND wrttp = c_01
AND beltp = c_02
AND versn = c_0
AND ( vorga = c_sdor OR vorga = c_rkp5 ).
CLEAR plan_rev.
IF sy-subrc IS INITIAL.
MOVE wa_final-wlp08 TO t_plan_rev.
plan_rev = plan_rev + t_plan_rev.
ENDIF.
Again ur clearing both tables.
CLEAR: it_prps, it_final.
ENDLOOP.
ENDCASE.
ENDLOOP.
WRITE:/10 'Actual Billing is',act_billing.
WRITE:/20 'Actual Cost is........', actu_cost.

Similar Messages

  • Confused about loops - David Nahmani book

    I bought LE8 the other day, and I'm trying to go through David Nahmani's excellent book.
    In the first chapter - building the 'My New Day' song - you have to insert some loops including 'Deep Electric Piano 05' from the loop browser. Now I only seem to have 'Deep Electric Piano 01' which just doesn't sound right!
    Yet, if I load the pre-done version from the book's DVD, then the 05 one is there and sounding good.
    Now, I have (I think!) installed the loops from the DVD by dragging the correct folder to the loop browser.
    Anyone got any ideas on this?
    Now I know there are differences between LE and Logic Pro, but I think this is supposed to work.
    Thanks.

    OK, I sorted it out. I hadn't downloaded the complete Garageband loop pack.

  • Confused about "files inside a JAR"

    I have a program that has a Properties file which I would like to "save" into the JAR file, so it is not outside the JAR.
    I know this can be done, because I've seen some Java programs that save their configuration between sessions, but not via a file inside its directory. This leads me to believe the file is maintained within the JAR itself, which would be REALLY handy and secure.
    Is this a correct assumption? If so, how would I do it? Here's a "test program" that we can play with, how would I save MyProperties' properties field into the MyProgram JAR?
    package SBX;
    import java.util.*;
    import java.io.*;
    public class MyProgram {
        // Instance Variables
        public MyProperties myProp = new MyProperties();
        public String stringOne = "Will this be loaded?";
        public String stringTwo = "How about this one?";
        // Main Method
        public static void main(String[] args) {
            new MyProgram();
        // Constructors
        public MyProgram() {
            if ((new File("properties.txt")).exists()) {
                myProp.updateProgram(this);
            System.out.println("1) " + stringOne);
            System.out.println("2) " + stringTwo);
            myProp.updateProgram(this);
            System.out.println("3) " + stringOne);
            System.out.println("4) " + stringTwo);
            myProp.updateProperties(this);
            // Now that we've "updated" stringOne & stringTwo and "updated" myProp and saved it,
            // we should be able to get the values "ONE" and "TWO" for print outs 1 & 2 when we next
            // run the program, instead of "Will this be loaded?" and "How about this one?", as we got during the first run.
            // However, the thing I need help with is saving the Properties to the JAR file so it's not accessable
            // outside of the JAR file. How can this be done?
    class MyProperties {
        // Instance Variables
        private Properties properties;
        // Constructors
        public MyProperties() {
            Properties defaults = new Properties();
            defaults.setProperty("stringOne", "ONE");
            defaults.setProperty("stringTwo", "TWO");
            properties = new Properties(defaults);
            try {
                FileInputStream fis = new FileInputStream("properties.txt");
                properties.load(fis);
                fis.close();
            catch (Exception e) {
                System.out.println("No properties file found, ignore this; one will be saved when the program exits.");
        // Methods
        public void updateProgram(MyProgram prg) {
            prg.stringOne = properties.getProperty("stringOne");
            prg.stringTwo = properties.getProperty("stringTwo");
        public void updateProperties(MyProgram prg) {
            properties.setProperty("stringOne", prg.stringOne);
            properties.setProperty("stringTwo", prg.stringTwo);
            try {
                FileOutputStream fos = new FileOutputStream("properties.txt");
                properties.store(fos, "A header");
                fos.close();
            catch (Exception e) {
                e.printStackTrace();
    }Thanks for any help!
    PS...writing demo programs is kind of fun :)

    Fossie,
    Yup... you can jar up your properties file... you just need to add it to manifest file and jar (the program) takes care of the rest... google that there's loads of existing articles.
    BUT, I don't think you can modify the properties file in the jar... it may be possible, but I just don't know how. Instead (I think) you ship your default properties file in the jar, but still save a local properties file to the same directory as the jar (obviously won't work for applets)... then you load your defaults, and the local settings over the top.
    and PS I don't see how sticking a properties file in the jar would "secure" it in any fashion... it's just a zip file after all... would you care to elaborate?
    Cheers,
    Keith.

  • Question: Priority Queue "deleteMin()" trouble

    Hello, I am having trouble formulating a delete() method here, which could also be called deleteMin() here.
    The priority queue, is suppose to have quick insertion O(1) time, and slow deletion O(N) because it's going to have to search through the unordered array, find the minimum object then delete it once "delete()" is called.
    However, I am stuck on trying to come up with the logic for my delete() method....
    Here's what I am thinking...
    I need to examine all the items and shift half of them, on average, down to fill in the hole once the minimum item is found.
    How would I find the minimum item, and once found how would I delete this? Any direction or statements you can show me to clear this up would be appreciated. Please see my code below :) Please excuse my empty javadocs as of right now, I do those last.
    Thank you
    * This class is to demonstrate.....
    * @version 1.0
    public class PriorityQ {
         private int maxSize;
         private long[] queArray;
         private int nItems;
          * Javadoc here
         public PriorityQ(int s) // constructor
              maxSize = s;
              queArray = new long[maxSize];
              nItems = 0;
          * Javadoc here
         public void insert(long value) {
              queArray[nItems] = value;
              nItems++;
          * Javadoc here
          public long remove () {
          * Javadoc here
         public long peekMin() {
                   return queArray[nItems - 1];
          * Javadoc here
         public boolean isEmpty() {
                   return (nItems == 0);
          * Javadoc here
         public boolean isFull() {
                   return (nItems == maxSize);
    } // end class PriorityQ
    class PriorityQApp {
                 public static void main(String[] args)
                    PriorityQ q1 = new PriorityQ(5);
                    q1.insert(30);
                    q1.insert(50);
                    q1.insert(10);
                    q1.insert(40);
                    while( !q1.isEmpty() )
                       long item = q1.remove();
                       System.out.print(item + " ");  // 10, 20, 30, 40, 50
                       }  // end while
                    System.out.println("");
         } // end main()
    } // end class PriorityQApp
    // //////////////////////////////////////////////////////////////Edited by: Cole1988 on Feb 21, 2009 9:03 AM

    Sorry no one got to you sooner.
    Using your instance variables:
    public long remove()
         long minValue = Long.MAX_VALUE;
         int minIndex = 0;
         for(int i = 0; i < nItems; i++) //Here we iterate through all the items to find the smallest one
              if(queArray[i] < minValue) //If this particular value is less than the smallest one found so far,
                   minValue = queArray; //This value is now the smallest one found so far
                   minIndex = i; //minIndex now contains the index of the smallest one found so far
         /*Now we can remove the smallest term, because after the above iteration, minIndex is the index number of the smallest value and minValue is the smallest value.*/
         for(int i = minIndex + 1; i < nItems; i++) //Starting at the term right AFTER the smallest one
              queArray[i-1]=queArray[i]; //Copy the value into the space right BEFORE it
         nItems--; //The number of items has decreased by one
         return minValue;
    }Note: This code does NOT resize your array after you remove an item; depending on how you'll implement it, you'll need to check if you're about to overflow the array by comparing nItems with queArray.length and resize your array accordingly.
    It seems like you're a bit confused about loops and iterating through arrays; I'd recommend reviewing a good Java book or online tutorial and practicing with some basic array iterations before you go any farther. You've got the basic grasp of things, it just hasn't "clicked" for you yet. :)
    Let me know if you need any more help or if you don't understand anything about what I just said.
    Regards,
    Alvin                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Flatten multicam weirdness

    I am finishing up a multicam project. Setup and editing of the multiple cameras went very smoothly. This was a 45 minute concert video. After getting all the camera cuts right I wanted to flatten the sequence and then trim out the dead areas.
    When I flattened the sequence there were sections where the clips had diagonal bars and no video played in those sections. I undid the flatten and opened up the nested multicam sequence and found that in those areas there were some gaps on tracks that were not active tracks. (i.e. camera3 was active camera 1 had a small gap. I found if I put black video in the gap things seemed to work.
    This happens on my work computer and home computer Both are mac pros, one is an 8 core 2008 machine running 10.8.4 the other is a 12 core running 10.9. Both are runing  Premiere 7.2.1
    I ahve plugin on my project, so to verify that it wasn't the plugins I built a multicam sequence with just video and flattened that and got the same result.
    One thing I also discovered is if I double click on the sections with diagonal lines and no video, they will open in the source monitor and play fine there. If I drag that clip back to a timeline it goes back to the diagonl line no video state.
    Any ideas?

    Can some other Premiere users or preferably someone in the Adobe staff please make this test:
    - Make a sequence and put som black video in it, name the sequence seq1
    - Put seq1 into a new sequence, name it seq2
    - Right click and enable multicam for the seq1 clip inside seq2
    - Flatten the seq1 clip and notice that everything works fine
    - Undo the flatteing, go into seq1 and make multiple edits using the razor tool (not moving any clips, just making cuts)
    - Go to seq2 and perform the flatten feature once again and see what happens
    In previous versions of PRP you would end up with the exact same source clips and edits in seq2 as in seq1 after flatteing, which is what you really want. In PRP 7.2.1 you end up with one single clip with diagonal lines beacause of the timecode being misplaced. Somehow the flatten feature in Premiere 7.2.1 gets confused by edits inside of a multicam sequence.

  • SubVi with feedback nodes used more than once inside a While Loop

    All,
    I have a subvi that does a set of operations and uses 3 feedback nodes. I am using this subvi inside a While Loop a total of 4 times. I've noticed that all instances used share the same result at each corresponding feedback node but I would like to have an individual result from each of them. Is there an easy way to go around this problem? I have come up with ways to avoid this: a) create a different vi for each time the subvi was used. b) use global variables instead of feedback nodes. Is there any easier way to go around this issue?
    ExamplePlease note that both subvi's are the same) If on my first subvi I calculate a maximum value and get 1.29 (then goes to feedback node) on my second subvi i get 1.01 my feedback node at the second subvi still registers the maximum value to be 1.29. (and I want it to be 1.01!)
    Hope this is not too confusing, I've been scratching my head with this for a while, can't find the "easy" button. Thanks in advance.
    -Pop
    Im using 9.0.
    Solved!
    Go to Solution.

    Attaching the code would be helpful. Anyway, I am not sure how multiple feedback nodes are supposed to operate so I will defer that to others to answer. As far as being able to use distinct values or instances if you are using a subVI you could mark it as reentrant. That way each call to it will behave as it it were a copy of the VI and it will have its own memory space. This should include the feedback node. You may be ending up with a single subVI and in reality a single feedback node. If you need to pass data between calls than simply wire the data through. You could also use an Action Engine to store and retrieve values. An AE is a MUCH better solution than a global variable.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • LOOP inside FORALL in bulk binding

    Can I use a loop inside forall in bulk bind updates?
    as I understand, forall statement strictly loops through the length of the bulk limit size for the immediately following statement only.
    I am attempting to use a loop there to update more than one table.
    cursor c is select id from temp where dt_date > sysdate-30;
    BEGIN
    loop
    fetch c into v_id;
    limit 1000;
    forall i in 1..v_id.count
    UPDATE table_one set new_id = v_id(i);
    exit when C%NOTFOUND;
    end loop;
    end;
    I want to update another table table_two also immediately after updating table_one like this:
    forall i in 1..v_id.count
    UPDATE table_one set new_id = v_id(i);
    BEGIN select nvl(code,'N/A') into v_code from T_CODES where ID_NO = v_id(i); EXCEPTION WHEN NO_DATA_FOUND v_code='N/A'; END;
    UPDATE table_two set new_code =v_code;
    exit when C% not found.
    This is not working and when I run it, I get an error saying encountered BEGIN when one of the following is expected.
    I got around this by having another FOR loop just to set up the values in another array variable and using that value in another second forall loop to update table_two.
    Is there any way to do this multiple table udpates in bulkbinding under one forall loop that would enable to do some derivation/calculation if needed among variables [not array variables, regular datatype variables].
    Can we have like
    forall j in 1.. v_id.count
    LOOP
    update table 1;
    derive values for updating table 2;
    update table 2;
    END LOOP;
    Thank You.

    Well, without questioning reasions why do you want this, you are confusing bulk select and forall. You need:
    begin
        loop
          fetch c bulk collect into v_id limit 1000;
          exit when v_id.count = 0;
          forall i in 1..v_id.count
            UPDATE table_one set new_id = v_id(i);
        end loop;
    end;
    /SY.

  • Bug: Export to QT with a looping video inside

    Hi,
    I posted on this exact same problem about a year ago for Keynote 2.x (or was it 1.x ?). The problem (feature, bug?) was and still is:
    I have a self running Keynote presentation (3.0.1). Inside this presentation are in some places looping QT movies. When I export the entire presentation to QT, the looping videos inside only run once (i.e. do not loop).
    As this did not get fixed in 3.0, either:
    a) this is a feature, not a bug
    b) no one from apple reads this list
    Regards,
    Gert

    Welcome back to the discussions, Gert.
    a) it's not a feature or a bug.
    When you export to QuickTime, you are taking all of the media and laying it out linearly. Since a loop isn't linear (start, play, end, back to beginning, play, end, etc), it gets removed.
    COULD Apple do this? Yes, but it would also mean that the exported movie would now be in an extra number of files and past experience indicates that this might be more confusing to the consumer (export a presentation with a background movie track and you'll see a "soundtrack" file).
    b) well someone has to read and moderate it to make sure we're not getting out of line, but this is a user to user discussion board first and foremost.

  • Last value from a loop and values inside the loop

    Hi
    Sorry about the confusing heading above, but its late at night and better words do not occur to me rightaway. Let me explain my situation.
    I have a single instrument (a voltage source) that is being swept from one value to another for an experiment. It has three VI's : 1. enable o/p. 2. Set a voltage output level. 3. diable o/p.
    I am using the error in and error out pins of instrument vis to properly sequence operations. I connect the error out pin of VI 1 to the error in pin of VI 2. Each of these errors is a cluster of three values.
    When I try to wire the error out from VI 2 inside the loop to VI 3 outside the loop, the wiring breaks as I am then trying to connect an array (a 1 dimensional n member array of error outs) to a single error in pin. Trying to connect it to an array outside the loop is obviously the same. (I am making an assumption here - while the loop is running, I do not need to make certain of the sequencing of operations by putting a feedback node on VI 2 - that would mean something quite different in any case.).
    So, how do I pass the last value (in this case, the error out cluster from the last stage) to error in pin of VI 3 ?
    I have read that it might be possible using shift registers. I am quite new to LabVIEW. A somewhat detailed description of what I need to do would be nice.
    Thanks.

    Hello,
    There are basically two options:
    Handle the errors outside the for-loop
    Handle the errors inside the for-loop
    For you solution 1 is the easiest achievable, after the for loop use the 'Merge Errors' VI this will change the 1d-array into a cluster. The downside is that if an error occured later states of the loops don't know this
    Solution 2 uses the shift register you mentioned. To use this you have to right-click on the right hand-side tunnel of the error wire (where it leaves the for-loop) and select shift register, sequentially your mouse pointer changes into an downpointed arrow, click on the entry tunnel on the left of the for-loop. What happens is that an error in the for loop is remembered into the next iteration (use execution highlighting to watch these)
    Here is some code:
    A good start might be:
    The link to the LabVIEW Learning Center is here
    Ton
    Message Edited by TonP on 09-25-2006 08:01 AM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!
    Attachments:
    Example_BD.png ‏5 KB

  • Sy-index inside a loop

    Hi All,
    I am trying to enhance a datasource and in that I am writing a loop inside another loop. I am trying to get
    the loop number of the inner loop by using the sy-index inside the inner loop. But, the sy-index is not being changed and it is always remaining as 1.
    I even checked the sy-index in the outer loop and it is the same even there. I do not have any idea why the sy-index is not changing according to the loop number.
    Any Ideas????
    Best Regards,
    Nene.

    Nene,
    I suggest to use your OWN counters ( when using may loops) like
    l_****_out = l_****_out + 1.
    and
    l_****_in = l_****_in + 1.
    Regards,
    Hari

  • How can I make a control inside a loop in a subVI change value when the calling VI's control changes?

    Hi.
    I think this is a pretty basic LV question, but I have not been able to find a good solution.
    I am attaching VIs that show the problem I am having, but obviously, the real application is a lot complicated, which forces me to try to do it this way.
    The issue is: I have a subVI with a Boolean control inside a loop.  When the control is true I want some action to take place.  When the subVI is run on its own, it works fine, acting properly when I set the boolean control to true via the LV FPGA interface from the host.  However, when I use it as a subVI, in which the top-level VI calls several instances of the subVI, I have the Boolean controls in the top level VI.  What is happening is that the false Boolean value with which the top-level VI starts is passed into the subVIs, and not updated, even though the control is inside the loop.
    Can any one suggest a good solution?
    Thanks,
    AlejandroZ
    Attachments:
    CallingVI.vi ‏7 KB
    subVI.vi ‏8 KB

    Hi.
    I know the example I posted might seem silly, but it was just to illustrate the problem I am having.  In reality this is the application:
    I have some LV FPGA code which uses a few FPGA IO to implement a serial link to communicate with a device.  Most of the time we are getting data from the device, so the serial link is used to send a read command, read in the data and put it into a FIFO.  However, I also wanted the VI to support sending data to the device, so I added an array control to put the data you want to send, and a boolean control to tell it you want to send it.
    Since sending and receiving data are done using the same FPGA IO, they cannot be independent operations, because they would garble each other. Therefore, in the subVI I have a loop in which I first read data if there is any to read, then check the boolean write control to see if there is data to write.
    As I mentioned, this works perfectly for talking to a single device.  However, we run into the issue of this topic when trying to replicate this for several devices.
    One easy solution is to not have the loop in the subVI, and have it in the calling VI (I am favoring this simple solution right now).  The only reason why I have not done this yet, is that the subVI has more than one loop, so I am going to have to create several subVIs.  I just posted to see if there was an even simpler solution...
    There have been some other possibly good solutions proposed here, though I am not sure if they work in LV FPGA.
    Thanks for all your responses.
    AlejandroZ

  • Synchronous RFC Receiver inside of a Loop in BPM

    Hi there,
    we have a RFC -> XI scenario where a BPM needs to receive messages from a RFC inside of a loop, to bundle these messages, just like the first example here: <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/08/16163ff8519a06e10000000a114084/frameset.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/08/16163ff8519a06e10000000a114084/frameset.htm</a>.
    But the problem is that the RFC is set as synchronous (best effort), thus we need to use a receiver in "Open S/A Bridge" mode, but this mode is not available for receivers inside a loop.
    Actually, we have managed to get the scenario working by creating another BPM which just receives the RFC messages in a S/A Bridge, sends the asynchronous message to the main BPM and sends a response back to RFC, closing the S/A bridge. But I think this solution is kind of "messy".
    Is there any other cleaner way of doing it?
    Thanks in advance,
    Henrique.

    Hi Henrique,
    Read this page carefully:
    http://help.sap.com/saphelp_nw04/helpdata/en/43/d92e428819da2ce10000000a1550b0/frameset.htm
    "Do Not Transfer Application Logic
    Do not use integration processes to transfer application logic from the application systems to the Integration Server.
    No Replacement for Mass Interfaces
    Check whether it would not be better to execute particular processing steps, for example, collecting messages, on the sender or receiver system."
    I so recommend to rewrite the sending interface to collect the messages before sending.
    Andother idea is sending the messages with an asynchronous call.
    Regards
    Stefan

  • LOOP DOUBT INSIDE  PACKAGE

    CREATE PACKAGE EMP_PKG AS
    CURSOR EMP_CUR IS
    SELECT EMPNO,DEPTNO,SAL,HIREDATE
    FROM EMP
    WHERE DEPTNO=30;
    PROCEDURE P_EMP;
    PROCEDURE P_GET_SAL(V_EMPNO NUMBER);
    PROCEDURE P_GET_LOC(V_EMPNO NUMBER);
    Now inside my Package Body
    INSIDE THE MAINPROCEDURE P_EMP
    I WILL BE CALLING THE BELOW TWO PROCEDURES
    PROCEDURE P_EMP
    BEGIN
    FOR I IN EMP_CUR LOOP
    P_GET_SAL(I.EMPNO);-- DO I NEED TO LOOP AGAIN IN P_GET_SAL PROC?
    P_GET_LOC(I.DEPTNO);
    END LOOP;
    END;
    NOW WHAT IAM DOING IS
    in my P_GET_SAL Procedure is
    PROCEDURE P_GET_SAL(V_EMPNO NUMBER)
    V_SAL EMP.SAL%TYPE;
    BEGIN
    FOR I IN EMP_CUR LOOP
    SELECT SAL INTO V_SAL FROM EMP
    WHERE EMPNO=I.EMPNO --DOUBT HERE
    END;
    I WANT TO KNOW WHETHER I NEED TO LOOP AGAIN
    HERE OR INSTEAD OF THAT
    PROCEDURE P_GET_SAL(V_EMPNO NUMBER)
    V_SAL EMP.SAL%TYPE;
    BEGIN
    SELECT SAL INTO V_SAL FROM EMP
    WHERE EMPNO =V_EMPNO;
    END;
    SINCE iam calling V_EMPNO WITH CURSOR FROM MY
    MAINPROCEDURE ..
    WILL THE PROCEDURE USES THE CURSOR VALUES
    AND LOOP ITSELF FOR EVERY EMPLOYEE TO
    GET THE SALALRY ?
    PLEASE LET ME KNOW SINCE MY PACKAGE IS MORE THAN 3000
    LINES I cant proceed unless its confirmed i can
    do so ..

    Hi all,
    Thanks for Looking into my Problem
    I Got answer by MySelf ..i dont need to loop again my sub procedures
    if i try to do that iam getting the error
    ERROR at line 1:
    ORA-06511: PL/SQL: cursor already open
    Thank you all once again ..

  • Loop at internal Table inside Script

    Hi
       I am filling a table in a subroutine in a program  and calling it through 'Perform' from my Script,now the main issue is , How to display the table in my script ? 
                I want to loop through an internal table & display its content on my script , but i can't make changes in the calling program by any means.

    Hi Ajitabh ,
    With PERFORM inside SAPSCRIPT you can only pass individual fields and also get back individual fields .
    Check This
    http://help.sap.com//saphelp_470/helpdata/EN/d1/802fd3454211d189710000e8322d00/frameset.htm
    Only "USING" and CHANGING" options are allowed and that too only symbols available / defined in sapscript can be passed .
    Even if you populate an internal table in the program you are calling with "PERFORM" there is no way to pass this internal table back to sapscript , also in SAPSCRIPT there is no way to loop .
    If you are sure about the no of lines you are going to populate and all lines have only one column ( only one field ) you can try something like this .
    /: PERFORM GET_VALUE IN PROGRAM <ZNAME>
    /: USING &VAR1&
    /: USING &VAR2&
    /: CHANGING &ITAB1&
    /: CHANGING &ITAB2&
    /: CHANGING &ITAB3&
    /: CHANGING &ITAB4&
    /: ENDPERFORM
    Anothe way is to loop in the main print program and call WRITE_FORM . But I guess your main print program is a SAP std program which you dont want to copy and change.
    Cheers.

  • How do we use if statement in labview?moreover can i use if statement inside for loop?

    how do we use if statement in labview?moreover can i use if statement inside for loop?

    The if statement in LabVIEW is the Case structure. You can find that on the Structures palette right next to the For Loop. If you're still on the same subject about terminating a for loop early, then what you do is enclose your functions inside the loop with a case statment and make one of the case's empty except for one or more constants that you might have to wire. Hopefully, the attached picture will explain what I mean. Also, as I mentioned in one of your other posts, I think this technique is not as good as using a while loop. The array in the attached example is the same size no matter what and you may have to handle stripping extra or invalid elements.
    Attachments:
    For_Loop_with_Case.jpg ‏21 KB

Maybe you are looking for

  • Oracle 11g wallet open failed

    Hi All: I have being having issues with oracle wallet on oracle 11g Release 2. I have an application that cannot connect to the database due to the wallet. Wallet is now becoming a nightmare for developers of application connecting to oracle. SQL> st

  • Advance Ship Notification (ASN) and Purchase order Respone(POR) in SRM7.0

    Hi Gurus, we have upgraded the SRM from Version 3.0 to SRM7.0. My client earlier was using the Purchase order confirmation and ASN as customized process.(Zprcoess) In SRM 7.0 they want to implement standard ASN and POR in SRM 7.0. For ASN in SRM 7.0

  • Install error in Air application created in Flex builder

    Hi all, When I export the release version of an AIR project, and attempt to run the resulting AIR file, I get the error "The application could not be installed because the AIR file is damaged. Try obtaining a new AIR file from the publisher." This ha

  • I dont really think that the math header has syntax errors.

    Hi, This is a very serious accusation from make. Mini:Evaluator develop$ make bison -d grammar.y grammar.y: conflicts: 24 shift/reduce flex rules.l cc -0 -o Evaluator grammar.tab.c lex.yy.c -ly -ll -lm In file included from grammar.y:3: /usr/include/

  • DAQ question

    Hi NG, I was hoping that some kind soul would grace me with some in- struction or some pointers to links or something. Problem: I'm running an SCXI chassis with multiple(5) cards in it. Two of the cards are 1120's. One of 1120 modules is in slot one