Syntax for if condition

Hi all
please help me in the syntax for if condition
if A=0 and B=0 then C=0 otherwise C=A+B
thanks
sreelatha

Hi Sri Latha , just use the following syntax in your formula editor,
( A == 0 ) AND ( B==0 )* 0 + ( A <> 0 ) AND ( B <> 0 ) * ( A + B )
It will work for u , but i think u don't need to use above formula , u can simpley use
C = A + B as already mentioned in the previous post..
Regards..

Similar Messages

  • Syntax for EVALUATE function - placing condition in it

    Hello All,
    I have a formula in discoverer like this
    SUM(col1)
    OVER(PARTITION BY col2, col3, col4
    ORDER BY col5 ASC
    RANGE BETWEEN col6-3 AND col6
    I need to implement the same in BI,
    I have used this to implement the SUM part
    EVALUATE( 'SUM(%1) OVER ( PARTITION BY %2,%3,%4) ORDER BY %5)' as double,
    col1,
    col2,
    col3,
    col4)
    But, couldn't get the syntax for 'RANGE BETWEEN' clause..
    i have tried like this
    EVALUATE( 'SUM(%1) OVER ( PARTITION BY %2,%3,%4) ORDER BY %5 RANGE BETWEEN %7 AND %6 )' as double,
    col1,
    col2,
    col3,
    col4,
    col5,
    col6,
    col7)
    Its throwing an error 'ORA-00905: missing keyword at OCI call OCIStmtExecute.'
    can anyone please suggest me some ideas to resolve this.
    Thanks in advance,
    Raghu

    Hi Goran,
    Thanks for the reply, it was of great help..
    Can you once check this please
    EVALUATE( 'SUM(%1) OVER ( PARTITION BY %2,%3,%4,%5
    ORDER BY %6 RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW )' AS DOUBLE,
    "Global Distributor Sales (by Period)"."Net Sales",
    Specialist."Specialist Group Name", Specialist."Specialist Manager Name",
    Specialist."Specialist Name", "End Sold-To Customer"."Sold-To Customer
    Account Name", "Process Fiscal Period Calendar"."Fiscal Period")
    This is giving the running sum of values with in the partition window..
    but, can you suggest, how to modify the query, so as to get the values of 'Sales' between
    2 fiscal periods back and the current fiscal period..
    in the discoverer it is used like this,
    SUM(Net Sales SUM)
    OVER(PARTITION BY Specialist Group Name,Specialist Manager Name,Specialist Name,"Sold-To Customer Account Name",GPH Segment2
    ORDER BY "Fiscal Period (7)" ASC
    RANGE BETWEEN NUMTOYMINTERVAL("Fiscal Period Of Year"-1,'MONTH') PRECEDING AND CURRENT ROW )
    which gives the values between 2 periods back and current period
    Thank you,
    Raghu

  • Date Syntax for SUMIFS Function

    Converting my accounting from Excel to Numbers. Huge data sets ...
    I have a SUMIFS function that works properly using a manually typed date but I cannot figure out how to use the Today() function.
    This works: SUMIFS(Amounts, Account, B3, Check Date, B5) where B3 is the code for the specific account and B5 contains <=12/31/2009 - note there are no quotes around the expression.
    BUT, I don't want to manually enter the date everyday. I want to use the Today() function for condition. It works if I use Today() in B5 but returns only the totals for today's transactions. I need to be able to use "less than or equal to Today" for the condition but I cannot figure out the syntax.
    If we can figure that out, then I want to use "less than or equal to Today PLUS X" where X is a variable I can enter in B7 to look at projected cash flow 7, 14 or 21 days out.
    Any help? Thanks

    Jane Knox wrote:
    Yvan!
    That worked. Thank you! When I posted the question I thought you would be the one to answer.
    Thanks for the feedback.
    I'm sure that Ashka, Badunit, Barry, Fruhulda, Jaxjason, Jerrold … are able to respond the same.
    The difference is that I was in front of my computer when they weren't
    I would NEVER be able to figure that out
    Not surprising, the syntax required to use a reference to a cell in a testr is not described in delivered resources.
    Very different from Excel...
    Happily, Numbers isn't duplicating Excel behaviour. A world with a single kind of spreadsheet would be really annoying
    Yvan KOENIG (VALLAURIS, France) samedi 26 décembre 2009 18:12:19

  • Macro syntax for non-negativity

    Hi,
    Could some one copy past the syntax for non-negativity like this
    If KF1 < 0, then KF1 = 0 else KF1
    This condition needs to be applied on top of existing macro for KF1 that does some arithmatic whose result could be < 0.
    would appreciate if you copy paste the steps.. that you may already have in any of your macro books.
    I also take this opportunity to request the macro experts to compile a wiki document on macro syntax.. A piecemeal approach would also do without relating to WHERE such a macro could be used. I find this learning the macro syntax by trial and error a rather unproductive and painful experience.
    If some of you could volunteer lets build a fantastic reference document on the macros where everyone can contribute and come with with something really useful.
    The final list can then be classified into artithmatical, conditional, control, abap macros. A brief description alongside each macro and some expert comments on possible application can be later expanded. newer and alternate ways of realzing the same macro creatively and in lesser steps could be regularly appended. I could moderate if such a thing is correct and agreeable
    Regards,
    Loknath

    I cant have more than 10 questions open. so closing this though there arent any responses

  • Syntax for page level process to invoke an on-demand app level process?

    I want to use a page level process (if that's the right thing to do) to run an application process on-demand each time certain pages load. What is the proper syntax for the page level process?
    I tried many variations of the following but it does not pass syntax checking.
    1.
    APPLICATION_PROCESS=GLOBAL_UPDATE;
    2.
    begin
    APPLICATION_PROCESS=GLOBAL_UPDATE;
    end;
    What is the proper syntax?
    Thanks,
    Linda

    Linda - If you want to run an application process when certain pages load, just create an application process (PL/SQL type) with the desired firing point, e.g., On Load: Before Header and in the process condition use a condition type like "Current Page Is Contained Within Expression 1 (comma delimited list of pages)". No need to create either a page process or an on-demand application process to do this.
    Scott

  • Syntax for the macro - request suggestions...

    Dear All, Good morning..
    I request your help in craking the below issue..
    <i><b>Description:</b></i>
    Calculation of a KF based on the following formula:
    <b>Dlr Inv(M01/2007)= Max( ( sp.plan(m01/2007)+Dlr Inv(M12/2006) ) ; Threshold Dlr Inv(M01/2007) )- Un constrained sales( M01/2007)</b>
    If you observe in the above calculation, for calculating current month Dlr Inv, we are using previous months Dlr Inv..OK.
    <i><b>Requiremet:</b></i> Calculation of the above , plus, the above calculation may produce a negative number...So, when there is negative number generated in the curent month calculation, i should make it to zero, display zero and carry  that zero for next months calculation...
    I wrote a macro, which is doing above calculation perfectly(as it is simple )...except carrying zero to next month's calculation...As long as the above calculation is generating positive value, there is no issue at all..
    <i><b>Issue:</b></i> In some cases , the above formula results a negative number, in that case, i am able to make it zero,  and able to carry that zero for next calculation, if the negative is generated for the first column..problem is , if there is any negative generated in between,let us say, for  June/2006,  then its making it zero, but that zero is displayed for the subsequent months from there onwards, irrespective of  the result is positive or negative..If i chage any number at that period for any KF, and execute macro, then it is working..Here i used auxiliary row...
    I have written 3  macros with diff logic...If you want i can post them again ....
    I would like to know the following things regarding macro syntax..
    <b>1)Can we go for a condition after a result in the same step...?
    </b>
    <b>Example: 
    Step:(M01/2007-M12/2007)(12 iterations)
    Row 1= Row2 -Row 3
    IF
    Row 1 < 0
    Row 1 = 0
    ENDIF</b>
    If i execute IF condition in another step,It won't serve my purpose because, it comes to second step after completing all iterations in first step...I want , <b>IF</b> condtion to be checked after the first iteration..
    In my case, macro successfully activated  but no result for that condition..It is executed only up to result for the first time when i tested in Utilities--->test Macros..in the macro builder..if i execute it for the second time, then it gives result..Surprised..!!!
    2) <b>Is it possible to write syntax in the following way..</b>
    IF
    (condition)
    ( Row  1 + Row 2) < 0
    ResulT : Row 3=0
    In my case,
    It is not accepting +, - .....
    Kindly suggest...
    I am confident that i crack this with your mighty help..
    Thanks for reading..
    regards,
    umamahesh
    Message was edited by: Uma Mahesh
            Uma Maheswar kumar
    Message was edited by:
            Uma Maheswar kumar

    HI Vinayak,
    Thanks very much for responding..
    I appreciate your reply and time spent on this...
    Your solution goes to indefinate internal loop..
    In your solution, Vi-2 is the previuos years cell ref: which again needs calculation...
    Your solution works good if i have to use current motns calculation of one  KF in another...
    say
    A= B+C;(current month)
    D=AE( current momth)...then instead of AE, better we use, D=(BC) E...Actually i am not facing any problem in taking the previous months updated value...i am facing problem with IF loop in case of negative...
    I will try your option and come back to you...

  • Syntax for a loop

    Hey folks,
    I've heard about for loops being the best way to accomplish what I need. With my coding level, i'm looking to have that when all the checkbox states are true, then go to a specific frame.  the issue is when I was using event listeners inside each of the mouse click events, it would trigger on the ninth click as all conditions would have been met. The syntax for a loop appears daunting, is there any way to execute my function so it's always "listening" or will execute eimmeidatley if the conditions are met?
    OFbandSEVENclose.addEventListener(MouseEvent.CLICK, OnFRYERbandSEVENclose);
    function OnFRYERbandSEVENclose(e: MouseEvent): void
    gotoAndPlay(1);
    OFbandSEVENcheckONE.visible = false;
    OFbandSEVENcheckTWO.visible = false;
    OFbandSEVENcheckTHREE.visible = false;
    OFbandSEVENcheckFOUR.visible = false;
    OFbandSEVENcheckFIVE.visible = false;
    OFbandSEVENcheckSIX.visible = false;
    OFbandSEVENcheckSEVEN.visible = false;
    OFbandSEVENcheckEIGHT.visible = false;
    OFbandSEVENcheckBUTTON1.addEventListener(MouseEvent.CLICK, checkbuttonONE, false, 0, true);
    function checkbuttonONE(e:Event):void
        if( OFbandSEVENcheckONE.visible == true){
            OFbandSEVENcheckONE.visible = false;
        }else{
            OFbandSEVENcheckONE.visible = true;
    OFbandSEVENcheckBUTTON2.addEventListener(MouseEvent.CLICK, checkbuttonTWO, false, 0, true);
    function checkbuttonTWO(e:Event):void
        if( OFbandSEVENcheckTWO.visible == true){
            OFbandSEVENcheckTWO.visible = false;
        }else{
            OFbandSEVENcheckTWO.visible = true;
    OFbandSEVENcheckBUTTON3.addEventListener(MouseEvent.CLICK, checkbuttonTHREE, false, 0, true);
    function checkbuttonTHREE(e:Event):void
        if( OFbandSEVENcheckTHREE.visible == true){
            OFbandSEVENcheckTHREE.visible = false;
        }else{
            OFbandSEVENcheckTHREE.visible = true;
    OFbandSEVENcheckBUTTON4.addEventListener(MouseEvent.CLICK, checkbuttonFOUR, false, 0, true);
    function checkbuttonFOUR(e:Event):void
        if( OFbandSEVENcheckFOUR.visible == true){
            OFbandSEVENcheckFOUR.visible = false;
        }else{
            OFbandSEVENcheckFOUR.visible = true;
    OFbandSEVENcheckBUTTON5.addEventListener(MouseEvent.CLICK, checkbuttonFIVE, false, 0, true);
    function checkbuttonFIVE(e:Event):void
        if( OFbandSEVENcheckFIVE.visible == true){
            OFbandSEVENcheckFIVE.visible = false;
        }else{
            OFbandSEVENcheckFIVE.visible = true;
    OFbandSEVENcheckBUTTON6.addEventListener(MouseEvent.CLICK, checkbuttonSIX, false, 0, true);
    function checkbuttonSIX(e:Event):void
        if( OFbandSEVENcheckSIX.visible == true){
            OFbandSEVENcheckSIX.visible = false;
        }else{
            OFbandSEVENcheckSIX.visible = true;
    OFbandSEVENcheckBUTTON7.addEventListener(MouseEvent.CLICK, checkbuttonSEVEN, false, 0, true);
    function checkbuttonSEVEN(e:Event):void
        if( OFbandSEVENcheckSEVEN.visible == true){
            OFbandSEVENcheckSEVEN.visible = false;
        }else{
            OFbandSEVENcheckSEVEN.visible = true;
    OFbandSEVENcheckBUTTON8.addEventListener(MouseEvent.CLICK, checkbuttonEIGHT, false, 0, true);
    function checkbuttonEIGHT(e:Event):void
        if( OFbandSEVENcheckEIGHT.visible == true){
            OFbandSEVENcheckEIGHT.visible = false;
        }else{
            OFbandSEVENcheckEIGHT.visible = true;
    // SHOW FINAL SCREEN===============================================
    function OFbandSEVENCOMPLETE(e:Event):void
        if( OFbandSEVENcheckONE.visible == true && OFbandSEVENcheckTWO.visible == true && OFbandSEVENcheckTHREE.visible == true&& OFbandSEVENcheckFOUR.visible == true && OFbandSEVENcheckFIVE.visible == true && OFbandSEVENcheckSIX.visible == true && OFbandSEVENcheckSEVEN.visible == true && OFbandSEVENcheckEIGHT.visible == true){
            gotoAndPlay(12);
    stop();

    Yes all are on one frame, the movieclips for the checkmark and the buttons that trigger the checkmark. I put your code in and my ubttons still trigger the checkmarks to go visible but there is nothing signalling the end. basically just need it to go to frame 12. Here's my mods below
    OFbandSEVENclose.addEventListener(MouseEvent.CLICK, OnFRYERbandSEVENclose);
    function OnFRYERbandSEVENclose(e: MouseEvent): void
    gotoAndPlay(1);
    OFbandSEVENcheckONE.visible = false;
    OFbandSEVENcheckTWO.visible = false;
    OFbandSEVENcheckTHREE.visible = false;
    OFbandSEVENcheckFOUR.visible = false;
    OFbandSEVENcheckFIVE.visible = false;
    OFbandSEVENcheckSIX.visible = false;
    OFbandSEVENcheckSEVEN.visible = false;
    OFbandSEVENcheckEIGHT.visible = false;
    var checks:Array = new Array(OFbandSEVENcheckONE, OFbandSEVENcheckTWO, OFbandSEVENcheckTHREE, OFbandSEVENcheckFOUR, OFbandSEVENcheckFIVE, OFbandSEVENcheckSIX, OFbandSEVENcheckSEVEN, OFbandSEVENcheckEIGHT); 
    OFbandSEVENcheckBUTTON1.addEventListener(MouseEvent.CLICK, doCheck);  //buttons to click that trigger the checkbox movieclips
    OFbandSEVENcheckBUTTON2.addEventListener(MouseEvent.CLICK, doCheck); 
    OFbandSEVENcheckBUTTON3.addEventListener(MouseEvent.CLICK, doCheck); 
    OFbandSEVENcheckBUTTON4.addEventListener(MouseEvent.CLICK, doCheck); 
    OFbandSEVENcheckBUTTON5.addEventListener(MouseEvent.CLICK, doCheck); 
    OFbandSEVENcheckBUTTON6.addEventListener(MouseEvent.CLICK, doCheck); 
    OFbandSEVENcheckBUTTON7.addEventListener(MouseEvent.CLICK, doCheck); 
    OFbandSEVENcheckBUTTON8.addEventListener(MouseEvent.CLICK, doCheck); 
    function doCheck(e:MouseEvent):void
      var sel:Boolean = true;
      for(var i:int = 0; i < checks.length; i++){
           if(!checks[i].visible){
                sel = false;
                break;
      if(sel){
           trace("all selected");
    OFbandSEVENcheckBUTTON1.addEventListener(MouseEvent.CLICK, checkbuttonONE, false, 0, true);
    function checkbuttonONE(e:Event):void
        if( OFbandSEVENcheckONE.visible == true){
            OFbandSEVENcheckONE.visible = false;
        }else{
            OFbandSEVENcheckONE.visible = true;
    OFbandSEVENcheckBUTTON2.addEventListener(MouseEvent.CLICK, checkbuttonTWO, false, 0, true);
    function checkbuttonTWO(e:Event):void
        if( OFbandSEVENcheckTWO.visible == true){
            OFbandSEVENcheckTWO.visible = false;
        }else{
            OFbandSEVENcheckTWO.visible = true;
    OFbandSEVENcheckBUTTON3.addEventListener(MouseEvent.CLICK, checkbuttonTHREE, false, 0, true);
    function checkbuttonTHREE(e:Event):void
        if( OFbandSEVENcheckTHREE.visible == true){
            OFbandSEVENcheckTHREE.visible = false;
        }else{
            OFbandSEVENcheckTHREE.visible = true;
    OFbandSEVENcheckBUTTON4.addEventListener(MouseEvent.CLICK, checkbuttonFOUR, false, 0, true);
    function checkbuttonFOUR(e:Event):void
        if( OFbandSEVENcheckFOUR.visible == true){
            OFbandSEVENcheckFOUR.visible = false;
        }else{
            OFbandSEVENcheckFOUR.visible = true;
    OFbandSEVENcheckBUTTON5.addEventListener(MouseEvent.CLICK, checkbuttonFIVE, false, 0, true);
    function checkbuttonFIVE(e:Event):void
        if( OFbandSEVENcheckFIVE.visible == true){
            OFbandSEVENcheckFIVE.visible = false;
        }else{
            OFbandSEVENcheckFIVE.visible = true;
    OFbandSEVENcheckBUTTON6.addEventListener(MouseEvent.CLICK, checkbuttonSIX, false, 0, true);
    function checkbuttonSIX(e:Event):void
        if( OFbandSEVENcheckSIX.visible == true){
            OFbandSEVENcheckSIX.visible = false;
        }else{
            OFbandSEVENcheckSIX.visible = true;
    OFbandSEVENcheckBUTTON7.addEventListener(MouseEvent.CLICK, checkbuttonSEVEN, false, 0, true);
    function checkbuttonSEVEN(e:Event):void
        if( OFbandSEVENcheckSEVEN.visible == true){
            OFbandSEVENcheckSEVEN.visible = false;
        }else{
            OFbandSEVENcheckSEVEN.visible = true;
    OFbandSEVENcheckBUTTON8.addEventListener(MouseEvent.CLICK, checkbuttonEIGHT, false, 0, true);
    function checkbuttonEIGHT(e:Event):void
        if( OFbandSEVENcheckEIGHT.visible == true){
            OFbandSEVENcheckEIGHT.visible = false;
        }else{
            OFbandSEVENcheckEIGHT.visible = true;
    // SHOW FINAL SCREEN===============================================
    function OFbandSEVENCOMPLETE(e:Event):void
        if( OFbandSEVENcheckONE.visible == true && OFbandSEVENcheckTWO.visible == true && OFbandSEVENcheckTHREE.visible == true&& OFbandSEVENcheckFOUR.visible == true && OFbandSEVENcheckFIVE.visible == true && OFbandSEVENcheckSIX.visible == true && OFbandSEVENcheckSEVEN.visible == true && OFbandSEVENcheckEIGHT.visible == true){
            gotoAndPlay(12);
    stop();

  • Limit of for each conditions in rtf templates

    Hi Everyone,
    I have a use case where i need to genereate a report by using values from two data sets. data sales, cost.
    Data set sales have four columns product1, product 2, product 3, product 4
    Cost has cost1,cost 2, cost 3, cost 4.
    I need to display in below format
    product 1| product 2| cost 1|cost 2| product 3| product 4| cost 3| cost 4|
    To get above format i am using four for each condition groupings two for each data set
    <?for-each:/data/sales?><?product1?>|<?product2?><?end for-each?>|<?for-each:/data/cost?><?cost1?>|<?cost2?><?end for-each?>|<?for_each:/data/sales?><?product3?>|<?product 4?><?end for-each?>|<?for-each:/data/cost?><?cost3?>|<?cost4?><?end for-each?>
    If i use first two for each conditions i am able to see values in template but if i use four line is missing in the template.
    I did not understand where lies the problem.
    Please let me know if you need more info.
    Regards
    Sandeep

    If you have product ID or key in the cost data set, then you can follow the method in this post to display data:
    http://blogs.oracle.com/xmlpublisher/2009/09/formatting_concatenated_dataso.html

  • Gross price for BASB Condition is not picking in Purchase Order invoice tab

    Hi Gurus
    In taxinj -- conditional base column i added 362 and
    in pricing procedure for gross price in subtotal column i added 6
    but even though when i click invoice tab while creating Purchase Order i am not getting gross price for BASB condition same as gross price in pricing procedure it is picking some different value such as either net value or manual excise from pricing procedure JEXC condition value.
    what went wrong.
    Rgds
    Shrikant Kamat.

    Hi Saplearner's
    Is there any body who will focus on this issue
    I have maintained all this accordingly, but the problem lies over here
    Pb00-- 100 
    ra01---  2   discount
    net--  98
    jexc(16%)--15.68 ( MANUAL EXCISE)
    net amount including tax-- 113.68
    freight(2%)-- 1.96
    Actual-- 115.68.
    BASB-- 115.68  ( It should be 100)
    In short i have given summary above, now let me explain
    when i am giving 100 as gross price,discount-2 and if i dont give JEXC, then BASB is coming 100 that is correct.
    when i am giving 100 as gross price, discount 2 and if i give JEXC  , then BASB is  picking as 115.68.
    Problem is here when we give  JEXC  manual excise.
    Rgds
    Kamat.
    Edited by: shrikant kamat on Feb 16, 2009 2:09 AM
    Edited by: shrikant kamat on Feb 16, 2009 2:09 AM
    Edited by: shrikant kamat on Feb 16, 2009 2:10 AM
    Edited by: shrikant kamat on Feb 16, 2009 11:57 PM

  • Migo reference document not appearing in miro for frieght conditions

    Dear all,
    I ahve done migo for a po and i have checked GR based invoice in PO.When i am doing MIRO i am not getting the migo reference number for frieght condition where as the migo reference number is appearing for base price.How to get that migo reference number for frieght conditions also.
    thanks in advance
    regards
    vithal

    Sometimes the the MIGO creator might have reversed the same. In such cases the reversal document may be with different number in the same series and both posted & reversed documents will not appear in MIRO. Since you might checking with posted document number, you are seeing the blank in MIRO. In such cases, just enter the PO number in MIRO, give date & reference number press Show PO structure button in the left corner. You will find the following screen
    Expand the required once. The following screen appears. In this both positive & negative numbers with same reference & document type appearing are the reversed documents.
    Hope this is clear

  • How to use i for if condition in a for i in loop?

    Hi friends,
    I have a question on how to use i for IF condition in a loop, in order to get an efficient programming and results. Here is outlined SQL:
    cursor is
    select c1,c2,c3 from table1; -- 100 rows returned.
    open cursor
    loop
    fetch c1,c2,c3 into v1,v2,v3;
    for i in 1..3 loop
    if 'v'||i between 90 and 100 then
    v_grade := 'Excellent';
    elsif 'v'||i between 80 and 89 then
    elsif 'v'||i between 50 and 59 then
    end if;
    end loop;
    close cursor;
    This way, I don't need to use a lot of if..then for hard code v1,v2,v3,.... actually I have more v..
    But Oracle gave an error of this usage of 'if 'v'||i' or 'v'||to_char(i).
    Thanks for any advice in advance!

    user508774 wrote:
    Thanks for comments and advices. But I didn't get your inputs clearly. Are you saying I don't need to use PL/SQL to achieve this?Correct. Ronel and John showed you the basic approaches. SQL is not a mere I/O language for making read and write calls. It is a very capable, flexible and powerful language. One can solve a problem with a few lines of SQL code, that will take 100's of lines of PL/SQL or Java code.
    So do not underestimate what can be done in SQL.
    v_cmd := 'UPDATE parts_categ_counts SET w1='||v1||', w2='||v2||...||v9||' WHERE seq='||vseq||';
    EXECUTE IMMEDIATE v_cmd;This code is also wrong. Besides the fact that there is no need for dynamic SQL, this approach creates a brand new SQL statement each loop iteration.
    SQL is source code. It needs to be parsed (compiled). The end result is an executable program that is called a cursor. This cursor needs to be stored in server memory (the SQL Shared Pool in the SGA).
    The problem with your code is that it is slow and expensive - it generates lots of unique SQL statements that need CPU for parsing and server memory for storage.
    These add up to a very significant performance overhead. That is the wrong approach. The correct approach is the same one that you would use in any other programming language.
    Let's say you need to use Java to process a bunch of CSV files - exact same CSV layout used by each file. A file needs to be read, processed, and a log file created.
    Will you write a Java program that loops through the files, for each file found, write a Java program for processing that file, compile it, then execute it?
    Or would you write a Java program that takes the name of the file as input, and then process that file and writes the log file?
    The 2nd approach provides a program that can process any of those CSV files - one simply needs to pass the filename as an input parameter.
    Your code and approach use the 1st method. Not the 2nd. And that is why it is wrong.
    To create a SQL program with parameters is done by using bind variables. Instead of
    v_cmd := 'UPDATE parts_categ_counts SET w1='||v1||', w2='||v2||...||v9||' WHERE seq='||vseq||';
    The following SQL source code should be created:
    v_cmd := 'UPDATE parts_categ_counts SET w1=:v1, w2=:v2 ..., w9=:v9 WHERE seq= :vseq';
    The tokens with the colon prefix (such as :v1), are bind variables. Think of these as the parameters to the SQL cursor.
    The server parses this SQL into a cursor. You can now execute the same cursor over and over again, using different bind variables. (just like the 2nd approach above that one would use in Java)
    In PL/SQL, this is made even easier as you can code native SQL code with PL/SQL code and use PL/SQL variables in it. The PL/SQL compiler is clever enough to do the SQL parsing, variable binding, and cursor execution for you. So in PL/SQL, you would use:
    UPDATE parts_categ_counts SET w1=v1, w2=v2 ..., w9=v9 WHERE seq= vseq;
    Where v1 and the others are PL/SQL variables.
    That all said - PL/SQL is only used for data crunching, when the processing of data is too complex for the SQL language to deal with. And this is very seldom the case.
    The main reason for using PL/SQL it to provide processing flow control, conditional processing and error handling, for SQL code. As the SQL language does not have these features.

  • How to make repricing for specific conditions at the time of billing?

    Hello
    I'm SD Pricing person. Let me ask here experts below my concern.
    In EU countries, there is recycling fee in sales of electronics or Note PC with batteries....to keep our earth clean.
    So when customers buy such products, they have to pay more as recycling fee including invoice amount.
    My question is... we want to make repricing for recycling conditions when the billing is created.
    Based on our configuration, recycling condition is not defined as a kind of tax condition.
    So this value is just copied from sales order.
    (pricing type in copy control is 'G' which means repricing for tax condition.)
    In this situation, we want to make repricing for those conditions during operating system.
    Is there any easy way to cover this?
    As I think, this is not easy because the system is already operated.
    To change condition attribution is really risky. If we dare do, we have to migrate all open orders.
    So I want to put this way to the end of my choice.
    For this requirement,
    1. We have to change condition class or category or calculation type in order to be repriced based on pricing type 'G'.
        (ex. Set the condition category as 'I' inter-billing or 'L' always repricing.)
        But transaction data are created now and all open orders will be affected.
    2. To create new conditions are not easy because these conditions are mapped to the CO-PA value field and the values are posted in FI doc.
    3. To change pricing type in copy control is almost impossible because of the impact.
    What can I do this in this situation?
    What I want to do is just to make repricing for specific conditions at the time of billing in case that pricing type of copy control is 'G'.
    Thank you in advance.

    Let me ask agagin to all experts.
    I want to make A condition to be repriced at the time of billing.
    For this, I have to set condition category as 'L' (Generally new when copying).
    But I do not want to do in that way becauuse I am maintaining big operated system now.
    In addition, though I migrate open orders after changing config. as 'L', it is almost impossible for use to migrate because we have more than a thound open orders per a DAY as Globalized system.
    That is why I am asking.
    Simply I can create new condition but as I mentioned, there are various recycling fee so we already created about 10 conditions. And this recycling conditions are linked to REA package of SAP. So creating another 10 more conditions can not be a way for us.
    At last, what I want is not to be shown this condition only in billing doc.
    'A' condition should be displayed in both Sales order and Billing doc.
    And simultaneously, when the billing is created and if user changed 'A' condition master, then new value which is different from sales order have to be reflected in billing doc.
    Thank you in advance.

  • Syntax for using a variable in an equation.

    Hi all,
    Simple question here.  What is tha appropriate syntax for using a variable in a calculation equation.  Specifically, I am taking an established curve fitting equation from my channels and trying to calculate it over a lineargenerated data set to extend the curve  beyond the original data sample.  Here is the small portion of script I have that will not work.  Thanks for any help.
    dim a,b,c
    a = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef1").Value
    b = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef2").Value
    c = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef3").Value
    Call Calculate("Ch(""[5]/Air Consumption LG"")= ""a"" + Ch(""[5]/LinearGenerated"")*""b""+""c""*ch(""[5]/LinearGenerated"")^2")

    Hi Gloorious,
    I am using diadem script.  In my example above, for the equation, if I substitue a,b,and c with numerical values, the script runs just fine and the formula executes as desired.  Is there a way to place the variables there instead as I have tried to do (I was hoping it was just a syntax issue) or do I have to approach it a completely different way?
    This script will execute just fine:
    Call Calculate("Ch(""[5]/Air Consumption LG"")= 4 + Ch(""[5]/LinearGenerated"")*5+6*ch(""[5]/LinearGenerated"")^2")
    but this will not:
    dim a,b,c
    a = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef1").Value
    b = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef2").Value
    c = Data.Root.ChannelGroups(5).Channels("air consumption formula").Properties("ResultApprAnsatzCoef3").Value
    Call Calculate("Ch(""[5]/Air Consumption LG"")= ""a"" + Ch(""[5]/LinearGenerated"")*""b""+""c""*ch(""[5]/LinearGenerated"")^2")

  • In sales order for the condition type MWST, **Tax code** is displaying wron

    Hi
    In sales order for the condition type MWST, *Tax code* is displaying wrongly at header level i.e. FF instead of AO (under account determination tab)
    AO tax is 0% but for FF it is 19%
    I have checked with the Access sequence it is picking access 08 correctly according to this it should show AO in tax code field for MWST but it is not so..
    There is a manual change for tax classification for material master in va02 initially it was blank now it is changed to ' 0 ' is any way influencing....?
    Even if I consider material tax classification and customer tax code  should not be FF because  tax code  FF is not maintained for the combination of access sequences for condition type MWST
    Please help me.
    Rajendra Prasad

    Dear Rajendra,
    There is a manual change for tax classification for material master in va02 initially it was blank now it is changed to ' 0 ' is any way influencing....?
    Definitely material Tax classification will influence to determine the Tax code.
    -->So Make sure that customer and material master having proper tax classification indicator.
    -->Have you Update the price after changing the tax classification in the sales order.by going to item dat -->condition tab then click on Update push button bottom of the conditions screen.
    -->Once again the check the condition record maintanence also for your MWST access sequence.
    I hope this will help you,
    Regards,
    Murali.

  • Change history (for perticular condition type) in scheduling agreement

    All SAP Gurus,
    We have a scheduling agreement, in which certain condition (condition type for freight condition) value have changed several times.
    Where we can find the changes in the value of this condition type?
    Regards,

    Hi Rajan,
    You should be able to see in
    Item -- Statistics -- Changes. You can find that line item wise.

Maybe you are looking for

  • Key date for a query

    Dear All, I have created a customer exit variable on key date of a query. With this input variable i am first asking user to input one particular date say he enters 31.12.2010 then i am trying to add 1 more day to it and making it 01.01.2011. I have

  • GPS Maps pre-load

    Can anyone tell me if there is a application that will allow me to pre-load maps for areas that I am going to visit? Doing ir 'real-time' is very long-winded. MotionX goes some way, but I have to move to the area on the iPhone and then 'move around i

  • Adober Reader 9.0: annots.api Crashes

    I tried deploying Adobe Reader 9.0 to several campus computer labs I manage. I am using roaming user profiles, but I don't have AppData redirected - it stays on the local hard drive. I discovered that while Reader 9 works OK for Administrators, it cr

  • URGENT HELP: Synchronization of Multiple Devices

    To whom it may concern, I am relatively new to labview so I am sorry if I use the wrong terminology. Here is all of my equipment: DAQ USBX-6341 board. Cameras (plugged into digital p0.0 channel/port) Force Sensor (plugged into analog channel/port 1)

  • How to purchase and download Mac OS X v10.7 Lion in 2012?

    Hello, I have an old mbp (2.16 GHz Intel Core 2 Duo, late 2006) for which i have recently ordered RAM (max at 3gb) and an SSD. I plan on upgrading from the current OS, Snow Leopard (10.6.8) to Lion (10.7) as i do not believe Mountain Lion (10.8) will