Can we use Loop Statement for Ranges

Hi Friends,
I have a range say R_Range. I need to loop at each line item and get the values in another range R_New_Range, i have to count the number of items in R_new_range. How is it possible.
I know range is nothing but an internal table. So we can direcly use Move statements or so ...,
But my question is .....
My R_range has values as below
'I' 'EQ' '001'
'I' 'EQ' '002'
'I' 'BT' '003' '007'
'I' 'EQ' '008'
I have to move all these values to R_New_range and my count of items should be '8'.
How can i do that????????
Expecting ur answers....
Thanks in advance
Cheers,
R.Kripa.

hey friends,
Its nice to see the replies.... but i think i had confused u all with the question
Now i'll explain u all in detail ....
See i have 15000 projects ( eg., AAA111... ) and 100 GL accounts ( eg., 123443... ) .....
I have to get the costs from COSS and COSP tables for all the projects - GL account combinations which leads to some 1500000 entries ..... So it is giving me a SQL Dump "DBIF_RSQL_INVALID_RSQL" .........
Description of the Dump is
Error in the module RSQL accessing the database interface
An exception occurred. This exception is dealt with in more detail below
. The exception, which is assigned to the class 'CX_SY_OPEN_SQL_DB', was
neither                                                                
caught nor passed along using a RAISING clause, in the procedure        
"GET_COSP_COSS" "(FORM)"                                               
Since the caller of the procedure could not have expected this exception
to occur, the running program was terminated.                          
The reason for the exception is:                                        
The SQL statement generated from the SAP Open SQL Statement violates a  
restriction imposed by the database system used in R/3.                                                                               
Possible errors:                                                        
o The maximum size of an SQL statement has been exceeded.              
o The statement contains too many input variables.                     
o The space needed for the input data exceeds the available memory.    
o ...                                                                               
You can usually find details in the system log (SM21) and in the        
developer trace of the work process (ST11).                             
If an error occurs the developer trace often informs you about the      
current restrictions.                                                   
So now i want to fine tune the program so that the execution works perfectly and get me the values for all the data 1500000 :-|
Now :
My Projects are stored in the form of a range R_Range
I have to loop at this range and then process 100 records at a time and then again take other 100 records .... i'll count till 100 records by getting loopaing at the range and for each loop pass i'll increment the counter ....
I am clear till this .....
If record consist of 'EQ' option .... then ofcourse we can consider the total record to be 1 record and we can add 1 to counter ......
But if the record consist of 'BT' option ...... then how can we loop that and get the number of -low numbers in that range and add to my counter ????
Hope iam clear with my question
If not do revert back ....
Thanks in advance for the replies
Cheers,
R.Kripa.
My Doubt is ....

Similar Messages

  • Can you use if statements for css classes?

    I'm trying to make a table field change color depending on what info the field is pulling from the database.  Here is my code:
    <table>
    <?php do { ?>
          <tr>
            <td><input name="hiddenField" type="hidden" id="hiddenField" value="<?php echo $row_getSystems['path_id']; ?>" />
              <strong><?php echo $row_getSystems['system']; ?></strong></td>
            <td><?php echo $row_getSystems['jumps']; ?></td>
    <?php
      if ($row_getSystems['security'] < 0.5) {
      ?>
      <td class="alert"><?php echo $row_getSystems['security']; ?></td> <? ;}
      elseif ($row_getSystems['security'] < 0.7)  {
      ?>
            <td class="noalert"><?php echo $row_getSystems['security']; ?></td> <? ;}
      else {
      ?>
      <td class="good"><?php echo $row_getSystems['security']; ?></td> <? ;} ?>
            <td><?php echo $row_getSystems['belts']; ?></td>
            <td><?php echo $row_getSystems['station']; ?></td>
            <td><?php echo $row_getSystems['deadend']; ?></td>
            </tr>
          <?php } while ($row_getSystems = mysql_fetch_assoc($getSystems)); ?>
      </table>
    I added the spaces to make the part I wrote stand out better.
    When I try to view it live - it says:
    Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\mining\systems.php on line 101
    Any ideas on how to do this?  Cause clearly, I'm not doing it correctly. 
    Thanks!

    Nevermind, I figured out how to do it.  Here is the correct code.  I presume this is the best way.  Hopefully. 
    <table>
      <?php do { ?>
          <tr>
            <td><input name="hiddenField" type="hidden" id="hiddenField" value="<?php echo $row_getSystems['path_id']; ?>" />
              <strong><?php echo $row_getSystems['system']; ?></strong></td>
            <td><?php echo $row_getSystems['jumps']; ?></td>
            <!-- Table Background Changes -->
                        <td style=" color: #fff;
                        <?php
                        if ($row_getSystems['security'] < 0.5) {
                        echo "background-color: #C00"; }
                        elseif  ($row_getSystems['security'] < 0.7) {
                        echo "background-color: #F90"; }
                        else {
                        echo "background-color: #060";
                        ?>
            ">
                          <strong><?php echo $row_getSystems['security']; ?></strong></td>
            <!-- End of Changes -->
            <td><?php echo $row_getSystems['belts']; ?></td>
            <td><?php echo $row_getSystems['station']; ?></td>
            <td><?php echo $row_getSystems['deadend']; ?></td>
            </tr>
          <?php } while ($row_getSystems = mysql_fetch_assoc($getSystems)); ?>
      </table>

  • 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

  • Can we use return statement in procedure?

    Can we use return statement in procedure or we can use more than one return statement in procedure?

    HamidHelal wrote:
    NOReally? Did you at least test it? You can use RETURN in procedure or in anonymous PL/SQL block. The only restriction is you can't specify return value:
    SQL> begin
      2      dbms_output.put_line('Before return');
      3      return;
      4      dbms_output.put_line('After return');
      5  end;
      6  /
    Before return
    PL/SQL procedure successfully completed.
    SQL> create or replace
      2    procedure p1
      3      is
      4      begin
      5          dbms_output.put_line('Before return');
      6          return;
      7          dbms_output.put_line('After return');
      8  end;
      9  /
    Procedure created.
    SQL> exec p1;
    Before return
    PL/SQL procedure successfully completed.
    SQL> begin
      2      dbms_output.put_line('Before return');
      3      return 99;
      4          dbms_output.put_line('After return');
      5  end;
      6  /
        return 99;
    ERROR at line 3:
    ORA-06550: line 3, column 5:
    PLS-00372: In a procedure, RETURN statement cannot contain an expression
    ORA-06550: line 3, column 5:
    PL/SQL: Statement ignored
    SQL> create or replace
      2    procedure p1
      3      is
      4      begin
      5          dbms_output.put_line('Before return');
      6          return 99;
      7          dbms_output.put_line('After return');
      8  end;
      9  /
    Warning: Procedure created with compilation errors.
    SQL> show err
    Errors for PROCEDURE P1:
    LINE/COL ERROR
    5/9      PL/SQL: Statement ignored
    5/9      PLS-00372: In a procedure, RETURN statement cannot contain an
             expression
    SQL> SY.

  • HT3354 how can i use one table for reference to another

    how can i use a table for a referance to another eg when i type a word in a cell, i will like it to match the word with another table then return the information in the cell i am using

    you can use vlookup() (or any of the lookup family of functions) to locate an item based on a key value:
    Here is an example of something you can do with two tables:
    The table on the right is title "Data" and stores a list of names with age and favorite color.
    The table on the left uses the value in the first column to lookup up information in the table Data
    in the table on the left:
    B2=IFERROR(A2&" is " & VLOOKUP(A2, Data :: A:D, 2, 0)&" years old and likes the color "& VLOOKUP(A2, Data :: A:D, 3, 0), "NOT FOUND")
    I know this look complicated.  so I'll break it up into smalled pieces:
    first the "&" is called the concatenate operator and joins two strings.  like this:
    a string is a set of characters between double quotes.
    so "string 1" & "string 2" becomes "string 1string2"  or "Sam " & "Jones" becomes "Sam Jones"
    you can use cell references instead of strings directly in which case the concatenation is performed on the contents of the cells.
    so if cell A1 contains "Hi " and the cell A2 contains "There"  then A1 & A2 will result in "Hi There"
    so you could add the formula
    A3=A1 & A2
    this is short hand for select cell A3 then type everything including the A3 so that A3 contains "=A1 & A2" (omit the double quote)
    OK.  So the formula I provided concatenates several items together:
    it concatenates A2, then the string " is " then a formula, then the string " years old and likes the color " then a formula
    the two formulas (highlighted in blue) perform a lookup of the value in cell A2 in columns A thru D of the table named "Data".  If if finds the value in cell A2 in the first column of the lookup range in the table Data (column A) then it returns the value from the same row but in the second or third column.
    all that is in a function calld iserror() to trap the condition where the calue you enter in A2 does not exist in the table Data:
    You will find the Numbers users guide and function reference helpful.  You can download then from Apple here:
    http://support.apple.com/manuals/#productivitysoftware

  • Can I use case statements in triggers?

    I created this trigger, it works BUT I don't like those parentheses at the begining, I would like
    to change those parentheses for case statements, well that is my question, can you use case statements in triggers, how you would translate the following in case statement?
    FOR EACH ROW
    WHEN ( (new.sgbstdn_levl_code = 'UG')
    and
    ( (NEW. SGBSTDN_STST_CODE NOT IN ('GR','SA','AS','IS') )
    OR
    ( (NEW. SGBSTDN_STST_CODE = 'IS' ) AND
    (NEW. SGBSTDN_STYP_CODE IN ('N' , 'T' )) AND
    (OLD. SGBSTDN_STST_CODE = 'AS' ) ) ) )
    ==================================================================================================
    CREATE OR REPLACE TRIGGER CC_STUD_WITHDRAWAL
    AFTER UPDATE OR INSERT ON SATURN . SGBSTDN
    FOR EACH ROW
    WHEN ( (new.sgbstdn_levl_code = 'UG')
    and
    ( (NEW. SGBSTDN_STST_CODE NOT IN ('GR','SA','AS','IS') )
    OR
    ( (NEW. SGBSTDN_STST_CODE = 'IS' ) AND
    (NEW. SGBSTDN_STYP_CODE IN ('N' , 'T' )) AND
    (OLD. SGBSTDN_STST_CODE = 'AS' ) ) ) )
    DECLARE
    v_params gokparm.t_parameterlist;
    event_code gtveqnm.gtveqnm_code%TYPE;
    firstname spriden.spriden_first_name%TYPE;
    lastname spriden.spriden_last_name%TYPE;
    middlename spriden.spriden_mi%TYPE;
    id spriden.spriden_id%TYPE;
    CURSOR get_stud_name IS
    SELECT
    spriden_id ,
    spriden_last_name ,
    spriden_first_name ,
    spriden_mi
    FROM
    saturn.spriden
    WHERE spriden_pidm = :NEW.SGBSTDN_PIDM
    AND spriden_change_ind IS NULL;
    BEGIN
    IF goksyst . f_isSystemLinkEnabled ( 'WORKFLOW' ) THEN
    event_code := SUBSTR ( gokevnt.F_CheckEvent ( 'WORKFLOW' ,'CC_STUDENT_WITHDRAW' ),1,20);
    OPEN get_stud_name ;
    FETCH get_stud_name INTO id , lastname , firstname , middlename ;
    CLOSE get_stud_name ;
    ----pass parameters to the event
    v_params ( 1 ).param_value := 'CC_STUDENT_WITHDRAW' ;
    v_params ( 2 ).param_value := '' ;
    v_params ( 3 ).param_value := 'Student Withdrawal:' || lastname || ',' || firstname || ' ' ||
    middlename ;
    v_params ( 4 ).param_value := :NEW.sgbstdn_pidm ;
    v_params ( 5 ).param_value := id ;
    v_params ( 6 ).param_value := lastname ;
    v_params ( 7 ).param_value := firstname ;
    v_params ( 8 ).param_value := middlename ;
    v_params ( 9 ).param_value := :NEW.sgbstdn_term_code_eff ;
    v_params ( 10 ).param_value := :NEW.SGBSTDN_STST_CODE ;
    v_params ( 11 ).param_value := :NEW.SGBSTDN_STYP_CODE ;
    gokparm.Send_Param_List ( event_code , v_Params );
    END IF;
    END;
    /

    You could delete a fair number of extraneous parentheses.
    CREATE OR REPLACE TRIGGER cc_stud_withdrawal
      AFTER UPDATE OR INSERT
      ON saturn.sgbstdn
      FOR EACH ROW
      WHEN     NEW.sgbstdn_levl_code = 'UG'
           AND (   NEW.sgbstdn_stst_code NOT IN ('GR', 'SA', 'AS', 'IS')
                OR (    NEW.sgbstdn_stst_code = 'IS'
                    AND NEW.sgbstdn_styp_code IN ('N', 'T')
                    AND OLD.sgbstdn_stst_code = 'AS'))

  • What query can we use ...for over 30 days

    select PROPERTY,RELAVANTDATE ,
    sum(NOTICES) over (
    partition by property
    order by RELAVANTDATE
    range between interval '30' day preceding and current row
    ) "SUM"
    from Test_Data
    what query can we use ...for over 30 days
    can i use following or preceding

    SCOTT@soti_9> WITH Test_Data AS (
      2    select 10100 as property, to_date('25-JAN-07') as RelavantDate, 20 as notices from dual union all
      3    select 10100 as property, to_date('25-DEC-07') as RelavantDate, 5 as notices from dual union all
      4    select 10100 as property, to_date('02-JAN-08') as RelavantDate, 10 as notices from dual union all
      5    select 10100 as property, to_date('01-DEC-08') as RelavantDate, 10 as notices from dual union all
      6    select 10100 as property, to_date('02-DEC-08') as RelavantDate, 20 as notices from dual union all
      7    select 10100 as property, to_date('31-DEC-08') as RelavantDate, 20 as notices from dual union all
      8    select 10100 as property, to_date('03-JAN-09') as RelavantDate, 30 as notices from dual union all
      9    select 10100 as property, to_date('25-JAN-09') as RelavantDate, 20 as notices from dual
    10  )
    11  select PROPERTY,RELAVANTDATE ,
    12    sum(NOTICES) over (
    13      partition by property
    14      order by RELAVANTDATE
    15      range between current row and interval '30' day following
    16    ) "SUM"
    17  from Test_Data
    18  ;
      PROPERTY RELAVANTD        SUM
         10100 25-jan-07         20
         10100 25-dec-07         15
         10100 02-jan-08         10
         10100 01-dec-08         50
         10100 02-dec-08         40
         10100 31-dec-08         70
         10100 03-jan-09         50
         10100 25-jan-09         20
    8 rows selected.Regards,
    Dima

  • Can i use select statements in LDB

    Hai All,
       Can i use select statements and internal table in a LDB program.
    my requirement is that if i enter company code , fiscal year and reporting periods.
    generally fiscal year will be jan to dec.but in my requirement the fiscal year is apr of previous year to march of currentyear.
    so as i require the last years data can iuse select statement in that ldb program or is there any solution for this.
    Thanks in Advance
    kiran

    Hi Kiran,
    To retrive records from ldb you have to use the
    GET <node> statement. This will invoke the selection screen of the node. An alternate solution is to use the function module LDB_PROCESS.
    Please see the following link for help and example
    http://help.sap.com/saphelp_nw04/helpdata/en/64/237f8cd43711d1950b0000e8353423/content.htm
    Thanks
    Vinod

  • Can you use time capsule for your mac and have readynas backup your pc's on the same network

    Can you use time capsule for your mac and use readynas to back up your pc's on the same network

    Sure, that is trivial setup.. they both have different names and IP addresses.
    You should be able to use ReadyNas for TM backup but you should check the latest state of play for that.

  • Can I use one account for both my labtop and my ho...

    can I use one account for both my labtop and my home computer?
    Solved!
    Go to Solution.

    Softthunder wrote:
    can I use one account for both my labtop and my home computer?
    Hello,
    Yes you can. You can access your account using any Skype enabled computer/device in any country worldwide.
    TIME ZONE - US EASTERN. LOCATION - PHILADELPHIA, PA, USA.
    I recommend that you always run the latest Skype version: Windows & Mac
    If my advice helped to fix your issue please mark it as a solution to help others.
    Please note that I generally don't respond to unsolicited Private Messages. Thank you.

  • HT204053 Dear Support Team, every time i tried to logon Icloud its gives me wrong user name or password and at the end it show me error " This Apple ID is valid but is not an ICloud Account" then how can i use one account for same Apple ID and ICloud???

    Dear Support Team,
    Every time i tried to logon Icloud its gives me wrong user name or password and at the end it show me error " This Apple ID is valid but is not an ICloud Account" then how can i use one account for same Apple ID and ICloud?
    Thanks

    It is not possible to create a new iCloud account using a Windows machine. You must create the account using a Mac (10.7.5 or more) or an IOS device (iPhone etc). Once that is done you can sign into and use the account on your Windows machine.

  • Can we use Perform statement in start routine ,Form and endform.

    Hi,
    Can we use Perform statement in start routine ? Then write the ABAP code between Form and Endform.
    Example : Can I use Perform ABC in start routine. Then define ABC at the end of start routine.
          Form ABC,
          ......<ABAP> code .....
          Endform.

    Hi,
    In BI 7.0 we have start routines defined using Class where you might be able to create your own performs, but in case of BW3.5 Start routines are defined using Form so there I don't think it will allow you to create one more form.
    But you can surely try both the approaches.
    Reards,
    Durgesh.

  • Can I use touch ID for App Store without using a passcode?

    It seems that the ony way I can use the touch ID for App Store and iTunes is if I have a passcode to get into my phone. I don't want a passcode, it get in and out of my phone too often to have to unlock it all the time and I hate manually typing in my password for App I buy. Why can't it do both, isn't the touch ID just as secure for purchases even if you don't have to unlock the phone to get to it??

    From the article:
    You can set up Touch ID in iOS Setup Assistant or by tapping Settings > Touch ID & Passcode. To set up Touch ID, you must first set a passcode. Touch ID is designed to minimize the input of your passcode, but you need a passcode for additional security validation, such as enrolling new fingerprints.
    So yes, that's how it's designed. You must have a passcode, though as long as you understand the caveats:
    In addition, you will need to enter your passcode to unlock your iPhone in these conditions:
    After restarting your iPhone 5s
    When more than 48 hours have elapsed from the last time you unlocked your iPhone 5s
    To enter the Touch ID & Passcode setting
    and
    You can't use Touch ID for purchases if Require Password in Settings > General > Restrictions is set to Immediately.
    you should be able to use Touch ID without needing your passcode. If none of those circumstances is true and you're still being asked for your passcode to make a purchase from the iTunes Store, it would seem that something is amiss with your iPhone.
    Regards,

  • Can I use same account for android and PC and how ...

    Can I use same account for android tablet and PC and how do I link both?

    You can use the same Apple ID for both phones, you would then be able to use the purchased Apps/Content on both phones without having to pay again.

  • I have two iphone one is iphone 5 and othere is iphone 4 . can i use same id for both ? And do i have to purchase the application again for iphone 4 which i have buyed for iphone 5.??

    i have two iphone one is iphone 5 and othere is iphone 4 . can i use same id for both ? And do i have to purchase the application again for iphone 4 which i have buyed for iphone 5.??

    You can use the same Apple ID for both phones, you would then be able to use the purchased Apps/Content on both phones without having to pay again.

Maybe you are looking for

  • Equivalent of java.sql.ResultSetMetaData

    Hi, I'm looking for something which is equivalent to java.sql.ResultSetMetaData in Toplink. Does anyone know how this can be done ? Thanks, -Prashant

  • Why Skype can't find a webcam?

    Hello everyone! Please help me!! I am trying to figure out about webcam but I couldn't figure it out and I don't know why.. Because I have a built-in webcam in my laptop. I used webcam in Skype for few years until suddenly, video call (Skype) stop me

  • Inspection lot not created (QA32)

    HI , QM/PP Expert, 1.for the raw material Inspection lot is not created while posting . I have done settings in mat. mast. 2.Can tell while doing MIGO we have change stock type or system teckes automatically. Nitu..........

  • I have Final Cut Studio 2 which I've never installed. Can I upgrade it to the latest version of Final Cut Studio?

    I have Final Cut Studio 2, which I've never installed. Can I upgrade it to the latest version of Final Cut Studio, or would I need to buy the latest version? Thanks, Caoim

  • Topics become 'unlinked' from their template

    After generating webhelp, some topics (but not all of them) are no longer linked to their template. This is an intermittent problem. Using RH 5.0.2 to generate a 250+ topic Web Help file. On approximately 180 of these topics I have applied the same t