Problem with loop condition

Hi :
   i am selecting the records based on s_date, but i want to display records for each week for which i am using R_DATE.If i enter 1month duration on selection screen, i wil display records for each week based on r_date.
But my program is not entering the loop.Its displaying all the records together for the duration s_date only.
In the loop, i am collecting the data into other internal table so that i can download the records into excel sheet.
DO v_weeks TIMES.
   CLEAR v_newdat.
   CLEAR v_date1.
    CLEAR datef5.
    CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
      EXPORTING
        date      = date2
        days      = 7
        months    = 0
        signum    = '+'
        years     = 0
      IMPORTING
        calc_date = datef5.
    REFRESH r_date.
    r_date-low = date2.
    r_date-high = datef5.
    r_date-sign = 'I'.
    r_date-option = 'BT'.
    APPEND r_date.
LOOP AT it_tab  where erdat IN r_date.
      it_tab1-v_cnt1 = v_cnt1.
      it_tab1-v_cnt2 = v_cnt2.
      it_tab1-v_cnt3 = v_cnt3.
      it_tab1-v_cnt4 = v_cnt4.
      it_tab1-date2 = r_date-low.
      it_tab1-datef5 = r_date-high.
      APPEND it_tab1.
      CLEAR v_cnt1.
      CLEAR v_cnt2.
      CLEAR v_cnt3.
      CLEAR v_cnt4.
      CLEAR v_cnt.
      CLEAR v_newdat.
      CALL FUNCTION 'RP_CALC_DATE_IN_INTERVAL'
        EXPORTING
          date      = datef5
          days      = 1
          months    = 0
          signum    = '+'
          years     = 0
        IMPORTING
          calc_date = v_newdat.
      date2 = v_newdat.
    ENDLOOP.
Thanks.
Raghu

Hi Suresh,
   it_tab has the records for the dates entered in S_DATE, but i want to collect records based on r_date into other internal table it_tab1 so that i can download to excel.
thx

Similar Messages

  • Problem with or condition in if statement

    Dear Oracle experts,
    I have a strange problem with Oracle 10g1R1 :
    The script below should normally write the value 1, 2, 3, 4, 5, 7, 9, 10 into my table.
    But itwrites all the values from 1 to 10 into my table.
    Only if I use only one condition without the 'or' the
    if condition is successful.
    Is this a normal behaviour of the database ?
    If yes, then why ?
    Best regards,
    Daniel Wetzler
    create table messages (results varchar2(30));
    declare
    var1 number;
    begin
    for i in 1..10 loop
    dbms_output.put_line(i);
    if (i != 6) or (i != 8)
    then
    insert into messages results values (i);
    end if;
    end loop;
    commit;
    end;
    /

    You want to use AND for that condition, not OR
    SQL> begin
      2  for i in 1..10 loop
      3     if (i != 6) and (i != 8)
      4     then
      5        dbms_output.put_line(i);
      6     end if;
      7  end loop;
      8  end;
      9  /
    1
    2
    3
    4
    5
    7
    9
    10

  • Problem with looping logic

    Hello all,
    Ok reposted using code tags, sorry about that.
    I'm trying to write some code to take in a 2D int array, loop through the array to identify where certain blocks of numbers begin and record that location so that I an jump straight to it at a later time. The number blocks go up iteratively from a point from 0 to 9 and are surrounded by nodata values(-9999).
    The problem is that when I print out the numbers they are only being recognised up to 6 (7th number) and when I check the locations against the original text file they dont match. I think it's just a problem with my logic but I'm not sure why.
    The text file is converted to ints and placed in an array from a buffered file reader in a seperate class. I can put this up if needed.
    Any help would be much appreciated.
    Thanks.
    Duncan
    *  Class imports text file which contains a collection of values, either nodata(-9999) or a location
    *  represented by numbers moving away from a point; 0 closest then 1, then 2 etc.
    *  records the first location of each number to avoid having to loop through the whole file each time.
    *  i.e. can later jump straight to the first recorded location of each number.
    *  In current text file there are 10 numbers(0 - 9) but for some reason it stops finding them after
    *  6(seventh no.) and having checked the location values against the original text file these are wrong
    *  by a fair way as well.
    import java.io.*;
    //import java.awt.*;
    //import java.awt.event.*;
    public class Hydrograph {
         int width = 0;
         int height = 0;
         int dZeroC, dZeroD = 0;
         int dOneC, dOneD = 0;
         int dTwoC, dTwoD = 0;
         int dThreeC, dThreeD = 0;
         int dFourC, dFourD = 0;
         int dFiveC, dFiveD = 0;
         int dSixC, dSixD = 0;
         int dSevenC, dSevenD = 0;
         int dEightC, dEightD = 0;
         int dNineC, dNineD = 0;
         public Hydrograph() {
              /* Ignore this bit it's being used for something else
              //File file = new File("c:/Users/Duncan/Documents/MODULES/MSc Dissertation/Code/A1.txt");
              //File file = new File("M:/java/code/A1.txt");
              ArrayRead ar = null;
              ar = new ArrayRead(file);
              int rows = ar.getRows();
              int columns = ar.getColumns();
              int steps = ar.getSteps();
              int[][][] threeDIntArray = ar.getThreeDIntArray();
              // Creates a new instance of delay class which takes in a text file and converts
              // it to int form, placing it into a 2D int array.
              Delay dLay = null;
              dLay = new Delay();
              width = dLay.getWidth();
              height = dLay.getHeight();
              int[][] twoDDelayFile = dLay.getTwoDintArray();
              int delayCount = 0;
              // Loops through 2D int array to identify when number first equals 0, then passes
              // the height and width values to storeDelayPos method below. Then finds for 1, 2
              // 3, 4,...etc by adding 1 to delayCount.
              System.out.println(" ");
              for (int a=0; a<width; a++) {
                   for (int b=0; b<height; b++) {
                        if (twoDDelayFile[a] == delayCount) {
                             int c, d = 0;
                             c = a;
                             d = b;
                             storeDelayPos(c, d, delayCount);
                             System.out.println(delayCount);
                             delayCount++;
                             break;
                   //System.out.println(" ");
              System.out.println(" ");
              System.out.print(dZeroC + " " + dZeroD);
              System.out.println(" ");
              System.out.print(dOneC + " " + dOneD);
              System.out.println(" ");
              System.out.print(dTwoC + " " + dTwoD);
              System.out.println(" ");
              System.out.print(dThreeC + " " + dThreeD);
              System.out.println(" ");
              System.out.print(dFourC + " " + dFourD);
              System.out.println(" ");
              System.out.print(dFiveC + " " + dFiveD);
              System.out.println(" ");
              System.out.print(dSixC + " " + dSixD);
              System.out.println(" ");
              System.out.print(dSevenC + " " + dSevenD);
         // Takes in width, height and delayCount value and sets variables according to
         // the value of delayCount.
         void storeDelayPos (int setC, int setD, int setDCount) {
              int dCount = 0;
              dCount = setDCount;
              switch(dCount) {
                   case 0:
                        dZeroC = setC;
                        dZeroD = setD;
                        break;
                   case 1:
                        dOneC = setC;
                        dOneD = setD;
                        break;
                   case 2:
                        dTwoC = setC;
                        dTwoD = setD;
                        break;
                   case 3:
                        dThreeC = setC;
                        dThreeD = setD;
                        break;
                   case 4:
                        dFourC = setC;
                        dFourD = setD;
                        break;
                   case 5:
                        dFiveC = setC;
                        dFiveD = setD;
                        break;
                   case 6:
                        dSixC = setC;
                        dSixD = setD;
                        break;
                   case 7:
                        dSevenC = setC;
                        dSevenD = setD;
                        break;
                   case 8:
                        dEightC = setC;
                        dEightD = setD;
                        break;
                   case 9:
                        dNineC = setC;
                        dNineD = setD;
                        break;
                   default:
                        System.out.println("OUT OF BOUNDS");
                        break;
         public static void main (String args[]) {
         new Hydrograph();

    Hi,
    I am working on a hydrograph program in java as well... I am trying to represent rainfall data. Do you think that you could share some of the code that you came up with, so that I don't have to go through the whole process.
    thank you so much,
    Kevin

  • Probleme with price condition

    hello,
    I have just created a info record for vendor 201031 and purchasing org Z001 and material 200000001 with price conditions (PB00, RA00, FRB1).
    when I have execute tcode MEKE (condition by vendor) for vendor  201031and the purchasing org  Z001 I had this message: “No condition types with access sequences found”.
    thank you to explain it to me what is  this problem ?  I owe acivre something? should I update vendor data ?
    NB: if you have examples of document “step by step” for price conditions, thank you to send it to me on: [email protected]
    in advance thank you .
    Said

    Hi ,
    Pl go through this link.
    http://www.sap-img.com/materials/steps-for-mm-pricing-procedures.htm
    Thanks
    Dipak

  • Problems with looping mp3s without gaps

    I am building an 8 track Flash audio mixer where the sounds for each track are selected by the user from a list component and then loaded into a Sound variable at runtime.  This can be done while the mixer is playing or stopped, and of course, it adds a lot of flexibility for making music.  All actionscript is in external .as files and sounds are looped using the SOUND_COMPLETE event.
    So far, all loading/playing functions work perfect, but I`m having problems with gaps at the beginning/end of my mp3 files.  I was told this was an inherent problem with mp3 files, so I tried using MPTrim to clean the silence up.  I also tried starting the loop a bit late - sound.play(80, 1) - but the results are usually inaccurate and unpredictable.
    When I import a wav file into the library and then export it as an mp3 file embedded in the .swf file, it sitll has a short gap.  When I built a previous mixer in Flash MX (actionscript 1) there was no gap and all sounds looped perfectly!  Of course, in this later case, all sounds were embedded inside movie clips on the stage and scripting was done on the timeline, so maybe that made a difference.
    What is going on with AS3?  I have spent long nights trying to find a solution to this, but to no avail!
    I read a blog where the writer went through all the steps I have and just gave up, but I know there is a solution.  I have seen this sort of thing done on Flash mixer sites before (even sites with full-on audio sequencers) so I know it can be done!
    Is there anything I can do to get around this problem?
    Thanks in advance,
    Matt

    mp3 files can have header info at the start, in addition to dead space at the start and end.  if you're certain you've removed all dead space then you should be able to compensate (reliably) for header info by using the offset parameter in the play() method (after you sound's onLoad() method executes.  but you wouldn't use 80:  that first parameter is in seconds, not milliseconds.

  • Problem with Guard Condition (Fields Disabling)

    Hi All
    I have a screen where I am creating a notification... so I enter all my fields and data as below:
    If ALL fields are filled out then the call to my RFC will create the notification and pass back a notification number (EX_QMNUM)
    I then pass back EX_QMNUM to the input of my READ_S1 RFC. Since we have a custom table attached I thought it was best to retrieve the latest data from the database after point of save.
    However if they don't fill in the necessary criteria then I pop up an error (EG. Please fill in customer number). I put a GUARD CONDITION on the call back to the READ_S1 RFC. The guard seems to work as my breakpoint/RFC does not get hit... however it then CLEARS my fields and DISABLES everything. This is what it looks like after the save (with guard condition in place). This means I lose all my data and no save occurs.
    What am I doing wrong here? Is this a bug with the guard condition?
    Guard Condition (which seems to be working apart from the fact it disables my RGA fields)
    I'm not completely sure about IF conditions so let me know if this is wrong?

    Hi Brad,
    Thanks for the input, I have tried this now.
    1. In the case the guard evaluates to "false", I experience the fields being blank, but not grayed out. So the user is able to refill the input and submit. This means something else in your model causes the "grayed out" behavior.
    2. In general, in case you know the conditions to valid input in the client side, you could model this way:
    Valid input => the data services run. example guard to service: =ISNULL(@customer)==false
    Invalid input => the popup shows. example guard to popup: =ISNULL(in1@customer)==true
    3. Is it possible in your case to validate the input before running the first query? This will enable to use the Validation feature as in Input Validation. If possible it's the best way in terms of user experience, in my opinion.
    Thanks,
    Udi

  • Problem with pricing condition type in case of proforma invoicing

    Hello All,
    the problem is related to a pricing condition type in case of proforma invoice where the details are as follows -
    Name of Condition Type - ZADC - Add 10% on Cost                                         Access seq.   Z038 Diff
                                                                                    Plus/minus    A Positive
    Cond. class -  A Discount or surcharge
    Calculat.type -  A Percentage
    Cond.category - Blank
    Manual entries      D Not possible to process manually
    Amount / Percent - Checked
    Item Condition - checked
    Scale Basis - Quantity
    Currency Conversion - Checked
    Quantity Conversion - Checked
    This condition type has been kept as statistical in the pricing procedure. Still in the proforma invoice the condition type is not getting reflected automatically , whenever I am updating with " carry out new pricing " option the condition type is getting populated.In case of other commercial invoices this very condition type is getting populated automatically without any updates.Along with this point to be noted is that the Condition type in which the actual costi is captured has been kept active.
    What more needs to be configured or what are the changes to be done to populate the condition type automatically as statistical during the time of proforma invoicing?
    Thanks & Regards
    Priyanka Mitra

    Hi,
    Kindly do the pricing analysis and check whether you have the following error such as
    Inactive condition type because of subsequent price,
    Regards,
    Ravi

  • Problems with the condition for a switch in our IntegrationProcess

    Hi,
    we're relatively new in using the XI-IntegrationBuilder and we have a small problem.
    We try to define a switch-condition to perform two different Transformations depending on a specific value of a message element.
    The condition looks like this:
    (IncomingRequest./p1:MT_XI_REQUEST/status = donormal)
    Both 'sides' of the condition are of the type (xsd:string).
    But it seems the condition is not working in the right way.
    It always uses the Transformation 'merge' (pls see image of IntegrationProcess->here the Transformation is shown as 'me').
    <a href="http://www.edwebservice.de/uploads/a1a956a10f.jpg">Image of sampleprocess</a> (this is only a testprocess to show  what we want to do)
    For testing we already run the process without the switch (making it linear), by using each transformation occurring in the switch on its own. Both tests worked well and returned the expected different values. But as mentioned above when we're using both Transformations in the switch, always the Transformation 'merge' is performed.
    It does NOT matter if the Transformation 'merge' is placed in the 'if' or in the 'otherwise' branch. It does NOT matter what value (true/false) the condition should return.
    Maybe its a basic desing-problem of our process? 
    <b>Any suggestions will be appreciated</b>
    Regards!
    Georg
    Our systemenvironment:
    Runtime
    Java version:1.5.0_01
    Java vendor:Sun Microsystems Inc.
    Version
    Service pack:15
    Release:NW04_15_REL
    Latest change:15767
    Sync time:200603080654
    ps: we already checked the OSS note 890760 for resolution. but this didn't solve the problem.

    Hi!
    @Peter:
    1) the namspaces are the same. we ckecked it already.
    2) status is an element NOT an attribute
    3) it is the same value (no blanks etc.)
    we will try to run XI with 1.4.2
    @Udo:
    We know how to use XPath a litte bit and were to customize an expression in the conditioneditor. We only thought that you could mean a 'special functionality' of XI
    Thanks for your ideas so far!
    Regards!
    Georg

  • Problem with multiple condition type for VAT &CST

    Hi,Gurus,
    pl. suggest  the procedure for the following problem.we configured  seperate  pricing procedures for our product material and scrap material.We have configured same condition types for VAT(ie.condition type:ZVAT) and CST(cond type:ZCST), in both pricing procedures. Now We want to maintain  seperate condition types for VAT and CST for pricing procedure for Product material and Scrap material. I have created two new condition types for scrap sales ZSCT- cst for scrap and ZSVT-vat for scrap by copying the same from existing conditions ZCST & ZVAT, and the same is included in the scrap pricing procedure. And also maintained OB40,OBCN,OVK1,OVK3,OVK4, FTXP,FV11 and VK11.
    now I am facing the following problems.
    1. while creating the Material master & customer master, in tax category sub screen all conditions i.e. conditions defined for  product material( ZCST,ZVAT) and defined for scrap material (ZSCT, ZSVT) displaying and these are compulsory fields.
    2. While creating the sale order for scrap material, system is considering the TAX classes from ZVAT/ ZCST (defined for product material) and taking the condition value from the condition type ZSVT/ ZSCT with the TAX class values of  ZVAT/ZCST.
    Now I would like to know is there any procedure  to assign the Material type and Customer  Account group to Tax category.
    Thanks & Regards
    sam

    Hello Sam,
    The Access Sequence Assigned to your New Condition types ie, ZSCT and ZSVT are same as the Previous Condition type ZVAT and ZCST.
    After Adding new condition type in the Tax category in the Masters you have to take care of the Sequence of the Condition type.
    If ZSCT and ZSVT is on the 3rd and 4th number in the masters the Condition table you are using in the access sequence should have fields  Taxclassification3-Customer and taxclassification3- material. For ZSCT
    Likewise Taxclassification4-Customer and taxclassification4- material. For ZSVT
    Please add New Condition table in the access sequence with the required Field
    And next when you are maintaining the condition record for say ZSCT you will have to maintain condition record for the condition table which has Taxclassification3-Customer and taxclassification3.
    In Document the values will be flown correctly after changing this.
    Hope I have Solved your Query.
    If any Doubt please revert.
    Regards,
    Rohit Dongre

  • Problem with tax condition in TAXINN

    Hi,
    This is related to India.
    We are using TAXINN tax procedure. We maintained the following steps:
    1.all conditions in the procedure – JMOP, JMX1, JECP,JEX1, JSEP, JHX1, JVRD assigned account keys for the required accordingly.
    2.made tax codes – V0 , V1
    3.assigned accounting keys to G/L accounts in OB40
    4.made condition record with Plant / vendor/ material combination for all above conditions.
    When I am making PO by entering all values including tax codes  I could not able to see values flowing for JEX1 (Set off condition for Ecess), JHX1(Set off condition for Sec Ecess), JVRD (VAT RM Deductible condition). When I go to Analysis Pricing and check for these conditions values are appearing for those conditions & for those combinations. But I got message “ Condition record exists, but has not been reset” . Because of this value is not flowing.
    Can any body throw light on this.
    Regards

    Hi Friends,
    I solved this problem by doing / adding following customization:
    SPRO.. Logistics genaral .. Tax on goods movement... India.. Basic settings ..Determination of excise duty.. condition based excise determation.. classify condition types
    Maintained for the following :
    TAXINN .. JHX1.. AT1 set off condition Total
    TAXINN... JEX1... Ecss set oof condition Total
    TAXINN... JVRD .. A/P RM VAT Deductible
    Then assign Tax codes to Compnay codes in
    SPRO.. Logistics genaral .. Tax on goods movement... India.. Basic settings ..Determination of excise duty.. condition based excise determation..
    Regards

  • I'm having a problem with loops and indexes. (indices? ha)

    I'm building a Frequency Histogram table. I have a Histogram method below me, but it's showing up errors for the lines I put in bold. The error is "cannot find "i" variable". What should I do? Thanks in advance for the help.
    public void histogram(int numClasses){
    int frequency[];
    int k = 0;
    double midpoint = 0;
    frequency = new int[numClasses];
    int classWidth = 0;
    classWidth = (((int)this.max() - (int)this.min()) + 1) / numClasses;
    for (int i = 0; i < data.size(); i++){
    if ((0 <= i) && (i < numClasses)){
    if ((((this.min() - 0.5) + (data.get(i)*classWidth)) <= data.get(i)) && ( data.get(i) < ((this.min() - 0.5) + ((data.get(i)+1)*classWidth))))
    k = (int)((data.get(i) - (this.min() - 0.5) / classWidth));
    frequency[k]++;}}
    for (i = 0; i < numClasses; i++){
    midpoint = (int)this.min() - 0.5 + (k + 0.5) * classWidth;
    System.out.println(""+midpoint+" |");
    for (int j = 1; j < frequency; j++){
    System.out.println("*");
    System.out.println();

    for (int i = 0; i < data.size(); i++) {
       <snip>
        for (i = 0; i < numClasses; i++){
    }It looks like you are reusing the variable i in the same scope, but it's hard to tell with the lack of [cod[b]e] tags and no formatting.
    Try using a different variable for the second loop there, like n or sokething.

  • Problem with pricing condition table - Urgent

    Hello,
    I have created a new condition table ' 627 ' in ECC, and i want to transfer the condition table to CRM.
    I did initial download for objects "DNL_CUST_CND" , "DNL_CUST_PRC".
    how can i transfer the condition table.
    Full points will be rewarded.
    regards
    yaswanth.k

    Hi,
    You have to create the new Adapter Object in R3AC5 for the newly created conditional table 627.
    Take the standard adapter like DNL_COND_A011.
    create the new Z adapter like ZDNL_COND_A627.
    In the table/structure tab replace the A011 by A627 and do remaining settings as it is.
    now u can carry out the inital download.
    i think this will solve your problem.
    Let me know the status?

  • Problem with loop previews...

    When I click on a loop in the browser, usually nothing happens. Sometimes I get to pre-listen, but 9 times out of 10, zilch. And unless it is one of that minority of loops I can pre-listen to, GB won't let me drag it to empty space in the timeline: if it's an audio loop I can drag it to an audio track, but if it's a MIDI loop I can't do anything with it.
    My loops are all perfectly ok in Logic. I just fired up GB for the first time in about a year, remembering how I liked the creative workflow using it as a sketchpad, and this has happened. I should point out that it's the first time I've launched GB since I installed 10.5.
    Has anyone encountered anything similar?

    Oliver,
    Have you tried opening a different song, & then checking to see if the loop browser is active? Or if that doesn't help, trying a different user account?
    KableTree

  • Problems with template condition

    Hi,
    I would like to set a condition for a report template by the column header content.
    I have tried the following statement:
    instr(#COLUMN_HEADER#, 'TITLE')>0
    and I have got the error message:
    "ORA-06550: PLS-00103: Encountered the symbol "#" when expecting one of the following: ( ) - + ..."
    Do you have any idea why it doesn't work?
    Thx!

    In plain english :-) :
    I want to create a report with news on the start page of a htmldb application. So I have created a table with 3 columns: DATE, HEADLINE, CONTENT. Now I want to create a template for the layout. Every record in the news table should be showed in the following way:
    HEADLINE DATE
    CONTENT
    My idea was to create 3 conditional templates for every column of a record depending on the column's name. For example a new table row (<tr>) for the content column etc.
    The column template conditions based on PL/SQL expression (e.g. instr(#COLUMN_HEADER#, 'CONTENT')>0) don't work... :-(

  • Rounding problem with statistical condition (Hint 80183)

    Dear all,
    we have implemented OSS hint 80183 with the variant 2. As long as a price is valid in the calculation scheme (e.g. EK01),  the rounding variance in NETP is calculated correctly. If the price is not contained in the scheme, the system uses the condition VPRS (although statistical) for the rounding (see variable NETTOPREIS in formula 019).
    if nettopreis is initial.
    nettopreis = ykbetr * 100. "in currency YWAERS
    endif.
    YKBETR contains the value of VPRS, although it is statistical.
    If we remove VPRS from the scheme, we get error V1208 'Error in converting exchange rate from __  to EUR'.
    How can we prevent that the system calculates the rounding variance with the statistical conditions?
    Thanks in advance
    Stefan

    solved in exit

Maybe you are looking for

  • Benefit and limitation of temp table in sql server 2008

    I have a datagrid in front end of asp.net . when user select a row it shows another gridview (multiple row ) where user have to put some data. when user click CLOSE button  i have to keep all data of 2nd gridview in reference with 1st gridview row id

  • Issue with FTP Adapter ListFiles files with spaces in the filename

    Hi I have an FTP adapter that does a ListFiles of all the files in a directory. It comes back and everything works fine however it removes all spaces from the filename meaning when I do the GET afterwards this fails as it is a different filename. The

  • Flash player problem on website

    Hey, i just installed new version of flash player on my browser and still can play flash video. I'm put the video from youtube in my site http://www.itfrom.net/ and the video can't play correctly. Also i can't play youtube video. Is i have installed

  • Exchange logic board

    I've got a power book G4 alu 1,67 bought in July 2005 whose logic board died 3 months ago. I heard that some logic boards had a defect and could be changed free by APPLE, but I do not find this information on the site. Could you help me ? Thanks Neug

  • App server shut down

    Hi does anybody knows why when i start app server 9 from console by typing . ./adadmin start-domain domain1 it runs fine, but if i close console app server shut down?? i'm using solaris 10 on ultra20, but same problem on sunfire v100 is there any way