Rounding of a total with a percent calculation

Post Author: jdomkus
CA Forum: Formula
I have a sales field that is taking .10 of the total and placing that total into a new field. This figure is then being used in a total calculation with other values.  My problem is the calculation is not being handled correctly  due to the percent field total (This is complex to explain but easy to show in a example.
total sales = .25 (Cents)  This total is being multiplied by .10 to figure out 10% of the total sales = .03 (This calculation is correct)
Then when I go to subtract .25 - .03 = .23 (Which is not correct, rounding is set to 0.01 on the field)
I have this report in 8.5 with all the patches and I have also download crystal report 11 with the same result, Any help would be appreciated

Post Author: SKodidine
CA Forum: Formula
For Total Sales, try
round(0.25 * 0.10,2)
Then when you subtract it from 0.25 it should give you 0.22 instead of 0.23.

Similar Messages

  • Please help with customizing price calculation in CRM 7 !!!

    Hi, Experts!
    I have a problem with customizing price calculation for product. Product is a bank's credit. I want to fill credit's data (percentage rate, pay term, monthly comission and other conditions) in condition record and after pricing procedure done i could saw results in WebUI (monthly fee, total rpice of product and etc.). 1) How to do that? Can i change or insert some fields (i mean columns) in product area (for example when i want to create opportunity)? 2) How can i change or insert calculation rule? 3) Can i insert formula in calsulation? Help me please step by step.
    Thank for your help.
    Regards,
    faraviper.

    Hello Faraviper
    I think you have not installed PME component correctly. Please use the following path to see the help documentation for that.
    http://service.sap.com/crm-inst
    or
    http://service.sap.com/instguides
    Also check out this OSS note, though it is for an older release it may throw some important pointers.
    857969 - Installing PME for CRM 5.0
    Hope this helps.

  • Percent calculation

    I have a form where I need to add the dollar amounts for projected small business spend and large business spend. (which is entered by the user) Then, actual cumulative smal and large spend is also entered by the user.
    I need to know how to write the script for calculating the percentage of cumulative spend in relation to projected spend.
    cumulative spend = % of projected spend
    Projected spend = 200.00
    50.00 is what % of 200.00
    Here is the code I tried:
    if(TotalCurrent ne 0) then
    (SmallActual / TotalCurrent) * 100
    else
    null
    endif
    Here is the error:
    Script failed (language is formcalc; context is
    xfa[0].form[0].topmostSubform[0].Page1[0].SmallActual[0])
    script=endif
    Error: syntax error near token 'endif' on line1, column 5.
    Any help is appreciated. I am new to this program.

    Hi, Lony,
    Whenever you have a problem, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using.
    Are you saying you now ahave a query that produces that output, except for the percent column?
    It looks like the total of all percents is about 18. How did you get that number, and not 100?
    RATIO_TO_REPORT compares a number to the total in the query, giving you a number between 0 and 1. Just multiply it by 100 to get a number between 0 and 100.

  • Last Year Inovice Total need to be calculated in a new column in OBIEE 11g

    Hi,
    I have a measure Net Invoiced Amount, and now my client is asking to get a new column in which last year's Net Invoiced Amount total needs to be calculated.
    We need to select the Dates dynamically, it is 2012, so the column should the invoiced amount total for 2011, if it is 2013 then amount should be 2012. Can we do this in RPD. If so, please tell me how.

    Hi,
    Method1:
    TIMESTAMPADD( SQL_TSI_DAY , -1, TIMESTAMPADD( SQL_TSI_DAY , EXTRACT( DAY_OF_YEAR FROM DATE Column) * -(1) + 1,
    DATE Column))
    Note: create alias table from your fact (call it as fact table name_YTD) Join th aliases to the dimension tables exactly like how your normal fact table is joined to the aliases, except for the time dimension.
    Method 2: by using Time series functions (Ago fxn)
    Ago(<<Measure>>, <<Level>>, <<Number of Periods>>)
    Example:Ago("Human Resources"."Fact - Absence"."# Days" , "Human Resources"."Time"."Year" , 1)
    Method 3: if your using obiee11g --> from analysis itself you cand solve it
    AGO(expr, [time_level], offset)
    Thanks
    Deva

  • I need to change the sum of a column's total with javascript.

    Hi,
    The HTML output of a SUM column is as follows:
    <td align="center" headers="COST" class="t2data"><b> 827.49</b></td>
    I need to change the sum total with javascript.
    The initial loading of the page SUMs the DB values correctly. Then onchange JS for a couple of factors may change one items COST.
    When that one item's COST changes I need to reSUM the total with JS.
    I was trying the following.. I don't know JS to well.
         var tds = document.getElementsByTagName('td');
         for (var xtd in tds) {
         //alert('Here:'+xtd.headers);
         if (xtd.headers=="COST") {
         // you found the element, do what you need
         alert(xtd.innerHTML);
         After inserting the above code into my javascript is popups up
         my alert, "Here:undefined"
         and never hits the alert(xtd.innerHTML);

    Hi Ya'll,
    I got the following working. See any problems?
    headers=="COST" actually showed up in each row of the whole column, including the SUM. So it ended up being great so I could sum it in the JS.
    I had to change the column type to NUMBER from VARCHAR2 for the initial SUM to work, so adding any formating to the SQL was not good. It looks pretty much what Andy has though... I found a slight hesitation it it though.. I have to work out a bug that prints the old total instead of the first.
    var ltotal =0;
    var tds = document.getElementsByTagName('td');
    for (var k=0; k<tds.length; k++) {
    if (tds[k].headers=="COST") {
    var inputObjs= tds[k].getElementsByTagName('input');
    if(inputObjs.length>0) {
    for (var j=0;j<inputObjs.length;j++) {
    ltotal+= parseFloat(inputObjs[j].value);
    //alert(inputObjs[j].value);
    //alert(ltotal);
    }else{
    tds[k].innerHTML=ltotal;
    Message was edited by:
    changed i to k to avoid the italics
    Bill Carlisle

  • HT201263 my ipod touch 4th gen isnt work after a long time with 0 percent battery power.Then its not working. computer doesnt respond to my ipod .only black screen is appearing it even not wake up after reset it what can i do please help me

    my ipod touch 4th gen isnt work after a long time with 0 percent battery power.Then its not working. computer doesnt respond to my ipod .only black screen is appearing it even not wake up after reset it what can i do please help me

    After being connected to a charging source overnight try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on another computer
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
      Apple Retail Store - Genius Bar

  • Problem with Per diem calculation in Travel Management module

    Dear ALL,
    We have configured Travel Management module in SAP and we have an issue with per diem calculation, viz.,  whenever we add an additional destination in the trip (T.code TRIP). 
    Ex: Employee's travel plan from 10/8/2011 (06.00 hrs) to 13/8/2011 (06:00 hrs)... in 24 hrs format.  When the employee goes directly to one destination and coming back, the per diem calc is coming right.  i.e., per diem amount for 3 days. 
    But when we add additional destination between the trip period-  viz.,  either 10th eve (18.00 hrs) or on 11th Aug-  the per diem calc is being done by system for 4 days instead of 3 days only.
    In otherwords, for every additional destination in the itinerary, one extra per diem is being calculated (when we simulate in T.Code: PR05)
    Would appreciate guidance ASAP.
    Regards,
    Santosh

    hello,
    I am having similar kind of problem can you please share your solution
    Regards
    Sarthak Arora

  • [8i] Need help with some workday calculations

    At the beginning of the month, I got help with a workday calculation in: [8i] Help with function with parameters (for workday calculation)
    Now, as it turns out, I was able to locate a function in the database that does what I want, however, it is much slower to use the function than to join two copies of the CALN table (Please see referenced thread for details. I can copy them to this thread if necessary.) I need to verify that the pre-existing function has 'DETERMINISTIC' in it, as I would guess that if it doesn't, it would be much slower than it could be.
    But now, I've come across a situation where I have to do multiple workday calculations in the same query--enough that I have to join 6 copies of my CALN table. I can't imagine that is at all efficient. I believe it was Frank K. who said (in the original thread) that if the function was slow, I should consider alternatives. Can anyone help me identify some of those alternatives? I'm definitely at that point now. (This query is one I'm using as the base for a report in Oracle BI, and let's just say it doesn't like my query, even though my syntax appears to be correct, and I would guess that joining 6 copies of one table is at least partly to blame for this).
    Note: I'm working with Oracle 8i

    OK, I finally have some sample data... I tried to make it thorough. I've included data in the CALN table YTD + tomorrow, so that any workday calculations using SYSDATE will work.
    CREATE TABLE caln
    (     clndr_dt     DATE          NOT NULL
    ,     clndr_yr     NUMBER
    ,     shop_day     NUMBER
    ,     shop_dt          DATE
    ,     shop_wk          NUMBER
    ,     shop_yr          NUMBER
    ,     shop_days     NUMBER
    ,     clndr_days     NUMBER
         CONSTRAINT caln_pk PRIMARY KEY (clndr_dt)
    INSERT INTO     caln
    VALUES (To_Date('12/23/2009','mm/dd/yyyy'),2009,247,To_Date('12/23/2009','mm/dd/yyyy'),51,2009,7631,10950);
    INSERT INTO     caln
    VALUES (To_Date('01/01/2010','mm/dd/yyyy'),2010,0,To_Date('12/23/2009','mm/dd/yyyy'),52,2009,7631,10959);
    INSERT INTO     caln
    VALUES (To_Date('01/02/2010','mm/dd/yyyy'),2010,0,To_Date('12/23/2009','mm/dd/yyyy'),52,2009,7631,10960);
    INSERT INTO     caln
    VALUES (To_Date('01/03/2010','mm/dd/yyyy'),2010,0,To_Date('12/23/2009','mm/dd/yyyy'),1,2010,7631,10961);
    INSERT INTO     caln
    VALUES (To_Date('01/04/2010','mm/dd/yyyy'),2010,1,To_Date('01/04/2010','mm/dd/yyyy'),1,2010,7632,10962);
    INSERT INTO     caln
    VALUES (To_Date('01/05/2010','mm/dd/yyyy'),2010,2,To_Date('01/05/2010','mm/dd/yyyy'),1,2010,7633,10963);
    INSERT INTO     caln
    VALUES (To_Date('01/06/2010','mm/dd/yyyy'),2010,3,To_Date('01/06/2010','mm/dd/yyyy'),1,2010,7634,10964);
    INSERT INTO     caln
    VALUES (To_Date('01/07/2010','mm/dd/yyyy'),2010,4,To_Date('01/07/2010','mm/dd/yyyy'),1,2010,7635,10965);
    INSERT INTO     caln
    VALUES (To_Date('01/08/2010','mm/dd/yyyy'),2010,5,To_Date('01/08/2010','mm/dd/yyyy'),1,2010,7636,10966);
    INSERT INTO     caln
    VALUES (To_Date('01/09/2010','mm/dd/yyyy'),2010,0,To_Date('01/08/2010','mm/dd/yyyy'),1,2010,7636,10967);
    INSERT INTO     caln
    VALUES (To_Date('01/10/2010','mm/dd/yyyy'),2010,0,To_Date('01/08/2010','mm/dd/yyyy'),2,2010,7636,10968);
    INSERT INTO     caln
    VALUES (To_Date('01/11/2010','mm/dd/yyyy'),2010,6,To_Date('01/11/2010','mm/dd/yyyy'),2,2010,7637,10969);
    INSERT INTO     caln
    VALUES (To_Date('01/12/2010','mm/dd/yyyy'),2010,7,To_Date('01/12/2010','mm/dd/yyyy'),2,2010,7638,10970);
    INSERT INTO     caln
    VALUES (To_Date('01/13/2010','mm/dd/yyyy'),2010,8,To_Date('01/13/2010','mm/dd/yyyy'),2,2010,7639,10971);
    INSERT INTO     caln
    VALUES (To_Date('01/14/2010','mm/dd/yyyy'),2010,9,To_Date('01/14/2010','mm/dd/yyyy'),2,2010,7640,10972);
    INSERT INTO     caln
    VALUES (To_Date('01/15/2010','mm/dd/yyyy'),2010,10,To_Date('01/15/2010','mm/dd/yyyy'),2,2010,7641,10973);
    INSERT INTO     caln
    VALUES (To_Date('01/16/2010','mm/dd/yyyy'),2010,0,To_Date('01/15/2010','mm/dd/yyyy'),2,2010,7641,10974);
    INSERT INTO     caln
    VALUES (To_Date('01/17/2010','mm/dd/yyyy'),2010,0,To_Date('01/15/2010','mm/dd/yyyy'),3,2010,7641,10975);
    INSERT INTO     caln
    VALUES (To_Date('01/18/2010','mm/dd/yyyy'),2010,11,To_Date('01/18/2010','mm/dd/yyyy'),3,2010,7642,10976);
    INSERT INTO     caln
    VALUES (To_Date('01/19/2010','mm/dd/yyyy'),2010,12,To_Date('01/19/2010','mm/dd/yyyy'),3,2010,7643,10977);
    INSERT INTO     caln
    VALUES (To_Date('01/20/2010','mm/dd/yyyy'),2010,13,To_Date('01/20/2010','mm/dd/yyyy'),3,2010,7644,10978);
    INSERT INTO     caln
    VALUES (To_Date('01/21/2010','mm/dd/yyyy'),2010,14,To_Date('01/21/2010','mm/dd/yyyy'),3,2010,7645,10979);
    INSERT INTO     caln
    VALUES (To_Date('01/22/2010','mm/dd/yyyy'),2010,15,To_Date('01/22/2010','mm/dd/yyyy'),3,2010,7646,10980);
    INSERT INTO     caln
    VALUES (To_Date('01/23/2010','mm/dd/yyyy'),2010,0,To_Date('01/22/2010','mm/dd/yyyy'),3,2010,7646,10981);
    INSERT INTO     caln
    VALUES (To_Date('01/24/2010','mm/dd/yyyy'),2010,0,To_Date('01/22/2010','mm/dd/yyyy'),4,2010,7646,10982);
    INSERT INTO     caln
    VALUES (To_Date('01/25/2010','mm/dd/yyyy'),2010,16,To_Date('01/25/2010','mm/dd/yyyy'),4,2010,7647,10983);
    INSERT INTO     caln
    VALUES (To_Date('01/26/2010','mm/dd/yyyy'),2010,17,To_Date('01/26/2010','mm/dd/yyyy'),4,2010,7648,10984);
    INSERT INTO     caln
    VALUES (To_Date('01/27/2010','mm/dd/yyyy'),2010,18,To_Date('01/27/2010','mm/dd/yyyy'),4,2010,7649,10985);
    INSERT INTO     caln
    VALUES (To_Date('01/28/2010','mm/dd/yyyy'),2010,19,To_Date('01/28/2010','mm/dd/yyyy'),4,2010,7650,10986);
    INSERT INTO     caln
    VALUES (To_Date('01/29/2010','mm/dd/yyyy'),2010,20,To_Date('01/29/2010','mm/dd/yyyy'),4,2010,7651,10987);
    INSERT INTO     caln
    VALUES (To_Date('01/30/2010','mm/dd/yyyy'),2010,0,To_Date('01/29/2010','mm/dd/yyyy'),4,2010,7651,10988);
    INSERT INTO     caln
    VALUES (To_Date('01/31/2010','mm/dd/yyyy'),2010,0,To_Date('01/29/2010','mm/dd/yyyy'),5,2010,7651,10989);
    INSERT INTO     caln
    VALUES (To_Date('02/01/2010','mm/dd/yyyy'),2010,21,To_Date('02/01/2010','mm/dd/yyyy'),5,2010,7652,10990);
    INSERT INTO     caln
    VALUES (To_Date('02/02/2010','mm/dd/yyyy'),2010,22,To_Date('02/02/2010','mm/dd/yyyy'),5,2010,7653,10991);
    INSERT INTO     caln
    VALUES (To_Date('02/03/2010','mm/dd/yyyy'),2010,23,To_Date('02/03/2010','mm/dd/yyyy'),5,2010,7654,10992);
    INSERT INTO     caln
    VALUES (To_Date('02/04/2010','mm/dd/yyyy'),2010,24,To_Date('02/04/2010','mm/dd/yyyy'),5,2010,7655,10993);
    INSERT INTO     caln
    VALUES (To_Date('02/05/2010','mm/dd/yyyy'),2010,25,To_Date('02/05/2010','mm/dd/yyyy'),5,2010,7656,10994);
    INSERT INTO     caln
    VALUES (To_Date('02/06/2010','mm/dd/yyyy'),2010,0,To_Date('02/05/2010','mm/dd/yyyy'),5,2010,7656,10995);
    INSERT INTO     caln
    VALUES (To_Date('02/07/2010','mm/dd/yyyy'),2010,0,To_Date('02/05/2010','mm/dd/yyyy'),6,2010,7656,10996);
    INSERT INTO     caln
    VALUES (To_Date('02/08/2010','mm/dd/yyyy'),2010,26,To_Date('02/08/2010','mm/dd/yyyy'),6,2010,7657,10997);
    INSERT INTO     caln
    VALUES (To_Date('02/09/2010','mm/dd/yyyy'),2010,27,To_Date('02/09/2010','mm/dd/yyyy'),6,2010,7658,10998);
    INSERT INTO     caln
    VALUES (To_Date('02/10/2010','mm/dd/yyyy'),2010,28,To_Date('02/10/2010','mm/dd/yyyy'),6,2010,7659,10999);
    INSERT INTO     caln
    VALUES (To_Date('02/11/2010','mm/dd/yyyy'),2010,29,To_Date('02/11/2010','mm/dd/yyyy'),6,2010,7660,11000);
    INSERT INTO     caln
    VALUES (To_Date('02/12/2010','mm/dd/yyyy'),2010,30,To_Date('02/12/2010','mm/dd/yyyy'),6,2010,7661,11001);
    INSERT INTO     caln
    VALUES (To_Date('02/13/2010','mm/dd/yyyy'),2010,0,To_Date('02/12/2010','mm/dd/yyyy'),6,2010,7661,11002);
    INSERT INTO     caln
    VALUES (To_Date('02/14/2010','mm/dd/yyyy'),2010,0,To_Date('02/12/2010','mm/dd/yyyy'),7,2010,7661,11003);
    INSERT INTO     caln
    VALUES (To_Date('02/15/2010','mm/dd/yyyy'),2010,31,To_Date('02/15/2010','mm/dd/yyyy'),7,2010,7662,11004);
    INSERT INTO     caln
    VALUES (To_Date('02/16/2010','mm/dd/yyyy'),2010,32,To_Date('02/16/2010','mm/dd/yyyy'),7,2010,7663,11005);
    INSERT INTO     caln
    VALUES (To_Date('02/17/2010','mm/dd/yyyy'),2010,33,To_Date('02/17/2010','mm/dd/yyyy'),7,2010,7664,11006);
    INSERT INTO     caln
    VALUES (To_Date('02/18/2010','mm/dd/yyyy'),2010,34,To_Date('02/18/2010','mm/dd/yyyy'),7,2010,7665,11007);
    INSERT INTO     caln
    VALUES (To_Date('02/19/2010','mm/dd/yyyy'),2010,35,To_Date('02/19/2010','mm/dd/yyyy'),7,2010,7666,11008);
    INSERT INTO     caln
    VALUES (To_Date('02/20/2010','mm/dd/yyyy'),2010,0,To_Date('02/19/2010','mm/dd/yyyy'),7,2010,7666,11009);
    CREATE TABLE ords
    (     ord_nbr          NUMBER          NOT NULL
    ,     sub_nbr          NUMBER          NOT NULL
    ,     ord_stat     VARCHAR2(2)
    ,     ord_qty          NUMBER
    ,     part_nbr     VARCHAR2(5)
         CONSTRAINT ords_pk PRIMARY KEY (ord_nbr, sub_nbr)
    INSERT INTO     ords
    VALUES (1,1,'CL',10,'PART1');
    INSERT INTO     ords
    VALUES (1,2,'CL',5,'PART1');
    INSERT INTO     ords
    VALUES (25,1,'CL',15,'PART2');
    INSERT INTO     ords
    VALUES (14,1,'OP',12,'PART3');
    INSERT INTO     ords
    VALUES (33,1,'CL',25,'PART1');
    INSERT INTO     ords
    VALUES (33,2,'CL',15,'PART1');
    INSERT INTO     ords
    VALUES (33,3,'OP',10,'PART1');
    INSERT INTO     ords
    VALUES (7,1,'PL',18,'PART2');
    INSERT INTO     ords
    VALUES (96,1,'PL',10,'PART3');
    INSERT INTO     ords
    VALUES (31,1,'CL',20,'PART2');
    CREATE TABLE oops
    (     ord_nbr          NUMBER          NOT NULL
    ,     sub_nbr          NUMBER          NOT NULL
    ,     op_nbr          VARCHAR2(4)     NOT NULL
    ,     mach_id          VARCHAR2(4)
    ,     oper_stat     VARCHAR2(2)
    ,     plan_start_dt     DATE
    ,     plsu          NUMBER
    ,     plrn          NUMBER
         CONSTRAINT ords_pk PRIMARY KEY (ord_nbr, sub_nbr, op_nbr)
    -- NOTE:
    -- for the orders with a status of 'CL' or 'PL' in the 'ords' table, I'm not bothering to put
    -- in more than two operations (though in reality more would be there) since they should be
    -- ignored in the final result anyway
    INSERT INTO     oops
    VALUES (1,1,'0010','123A','CL',TO_DATE('01/11/2010','mm/dd/yyyy'),2,0.2);
    INSERT INTO     oops
    VALUES (1,1,'0015','259B','CP',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.15);
    INSERT INTO     oops
    VALUES (1,2,'0010','123A','CP',TO_DATE('01/11/2010','mm/dd/yyyy'),2,0.2);
    INSERT INTO     oops
    VALUES (1,2,'0015','259B','CP',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.15);
    INSERT INTO     oops
    VALUES (25,1,'0005','123A','CP',TO_DATE('01/18/2010','mm/dd/yyyy'),2,0.25);
    INSERT INTO     oops
    VALUES (25,1,'0030','110C','CL',TO_DATE('01/19/2010','mm/dd/yyyy'),4,0.1);
    INSERT INTO     oops
    VALUES (14,1,'0010','127A','CP',TO_DATE('01/11/2010','mm/dd/yyyy'),2,0.25);
    INSERT INTO     oops
    VALUES (14,1,'0025','110C','CL',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.1);
    INSERT INTO     oops
    VALUES (14,1,'0040','050C','CP',TO_DATE('01/13/2010','mm/dd/yyyy'),1.3,0.15);
    INSERT INTO     oops
    VALUES (14,1,'0050','220B','WK',TO_DATE('01/14/2010','mm/dd/yyyy'),4,0.25);
    INSERT INTO     oops
    VALUES (14,1,'0065','242B','AV',TO_DATE('01/18/2010','mm/dd/yyyy'),1.5,0.1);
    INSERT INTO     oops
    VALUES (14,1,'0067','150G','NA',TO_DATE('01/19/2010','mm/dd/yyyy'),2,0.1);
    INSERT INTO     oops
    VALUES (14,1,'0100','250G','NA',TO_DATE('01/20/2010','mm/dd/yyyy'),2.1,0.2);
    INSERT INTO     oops
    VALUES (33,1,'0010','123A','CL',TO_DATE('01/11/2010','mm/dd/yyyy'),1.9,0.2);
    INSERT INTO     oops
    VALUES (33,1,'0015','259B','CP',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.1);
    INSERT INTO     oops
    VALUES (33,2,'0010','123A','CL',TO_DATE('01/11/2010','mm/dd/yyyy'),1.9,0.2);
    INSERT INTO     oops
    VALUES (33,2,'0015','259B','CP',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.1);
    INSERT INTO     oops
    VALUES (33,3,'0010','123A','CL',TO_DATE('01/11/2010','mm/dd/yyyy'),1.9,0.2);
    INSERT INTO     oops
    VALUES (33,3,'0015','259B','CP',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.1);
    INSERT INTO     oops
    VALUES (33,3,'0020','220B','NA',TO_DATE('01/12/2010','mm/dd/yyyy'),1.7,0.15);
    INSERT INTO     oops
    VALUES (33,3,'0030','150G','NA',TO_DATE('01/13/2010','mm/dd/yyyy'),1.3,0.05);
    INSERT INTO     oops
    VALUES (33,3,'0055','150G','NA',TO_DATE('01/15/2010','mm/dd/yyyy'),2.1.,0.1);
    INSERT INTO     oops
    VALUES (7,1,'0005','123A','NA',TO_DATE('01/11/2010','mm/dd/yyyy'),2,0.2);
    INSERT INTO     oops
    VALUES (7,1,'0030','110C','NA',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.15);
    INSERT INTO     oops
    VALUES (96,1,'0010','127A','NA',TO_DATE('01/11/2010','mm/dd/yyyy'),2,0.25);
    INSERT INTO     oops
    VALUES (96,1,'0025','110C','NA',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.1);
    INSERT INTO     oops
    VALUES (31,1,'0005','123A','CL',TO_DATE('01/11/2010','mm/dd/yyyy'),1.9,0.2);
    INSERT INTO     oops
    VALUES (31,1,'0030','110C','CP',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.1);
    CREATE TABLE mach
    (     mach_id          VARCHAR2(4)     NOT NULL
    ,     desc_short     VARCHAR2(9)     
    ,     group          VARCHAR2(7)
         CONSTRAINT ords_pk PRIMARY KEY (mach_id)
    INSERT INTO     mach
    VALUES     ('123A','desc here','GROUPH1');
    INSERT INTO     mach
    VALUES     ('259B','desc here','GROUPH2');
    INSERT INTO     mach
    VALUES     ('110C','desc here','GROUPJ1');
    INSERT INTO     mach
    VALUES     ('050C','desc here','GROUPK2');
    INSERT INTO     mach
    VALUES     ('220B','desc here','GROUPH2');
    INSERT INTO     mach
    VALUES     ('242B','desc here','GROUPH2');
    INSERT INTO     mach
    VALUES     ('150G','desc here','GROUPL1');
    INSERT INTO     mach
    VALUES     ('250G','desc here','GROUPL2');
    INSERT INTO     mach
    VALUES     ('242B','desc here','GROUPH2');

  • TAXINJ WITH CONDITION BASED CALCULATION

    Hi MM Gurus
    We are using TAXINJ procedure for tax calculation with formula base calculation (i.e. tax rates are maintains in J1ID ). As we now that TAXINJ procedure support both condition based and formula based tax calculation. But when I want to use the condition based tax calculation with TAXINJ by maintaining the condition record in FV11, I am getting the tax calculated with formula based only. System is ignoring the condition record maintain in FV11. So please explain how to use the TAXINJ procedure with condition based calculation by maintaining the condition record.
    Reward point will be given please…..
    J K Patel
    Ahmedabad
    Gujarat

    Hi JK,
    if you r using taxinj, then system picks up the rate from J1ID only. if you want to maintain the condition records in FV11 then delete the rates in J1ID. hope this will solve your problem.
    Regards,
    patil

  • Sql query with conditions and calculations???

    Hi,
    how I can build a query with conditions and calculations?
    E.g. I've got this table
    Start          | End     |     Working Place     |     Mandatory
    01-JAN-13 | 11-JAN-13 |     Office           |          1
    14-JAN-13 | 25-JAN-13 |     Home Office      |     0
    04-MRZ-13| 15-MRZ-13 |     Office           |          0
    11-FEB-13 | 22-FEB-13 |     Office           |          1
    Now if column working place=Office and column mandatory=0
    the new column "price" has to calculate: (End-Start)* $25.00
    and if working place=Office and column mandatory=1
    the "price" column has to calculate: (End-Start)* $20.60
    else $0.00
    I tried it with the case statement but I didn't know how
    to calculate my values and display it to the virtual column "price".
    Something like
    case
    when Working_Place = 'Office' and Mandatory=1
         then ...
    else '0.00'
    end as PRICE
    Or is it not possible?
    Edited by: DB2000 on 12.03.2013 05:09

    Use CASE:
    select  start_dt,
            end_dt,
            working_place,
            mandatory,
            case
              when working_place = 'Office' and mandatory = 0 then (end_dt - start_dt) * 25
              when working_place = 'Office' and mandatory = 1 then (end_dt - start_dt) * 20.60
              else 0
            end price
      from  tbl
    START_DT  END_DT    WORKING_PLA  MANDATORY      PRICE
    01-JAN-13 11-JAN-13 Office               1        206
    14-JAN-13 25-JAN-13 Home Office          0          0
    04-MAR-13 15-MAR-13 Office               0        275
    11-FEB-13 22-FEB-13 Office               1      226.6
    SQL> SY.

  • Display totals with currency sign in ALV

    Hi,
    I have to display totals with currency sign in ALV.
    column1      colums2
    10               USD
    20               USD
    30               USD
    40               USD
    100            USD
    Can anybody help on this.
    Regsrds,
    Zak.

    Hi,
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-do_sum      = 'X'.        "Display column total
      fieldcatalog-datatype     = 'CURR'. "
      append fieldcatalog to fieldcatalog.
      clear  fieldcatalog.
    Thanks
    Vikranth

  • CATS Rounding up the Total Hours to next 1/10th hour.

    Hi Everyone,
    Is there any user exit or standard configuration which can be used to round up the total hours in CAT2 to the next 1/10th hour.
    Eg : If the employee enters start time and End time as 08:00  and 08:06 then total hours is .1 ( 6/60 = .1)
    But if the employee enters Start time and End time as 08:00 and 08:02 then the total hours should also give as .1 instead of .03 which is ( 2/60 = .03 ). That means it should round up to every next 6th Increment.
    Kindly suggest,
    Regards,
    SAP HCM

    you can round it in Time eval  through PCR quering time pairs . ROUND operation can be helpful.

  • Why doesn't the iPad 2 come with clock and calculator like iPhone?

    Why doesn't the iPad 2 come with clock and calculator like iPhone?

    Apple didn't put it on there. no one but them knows their rationale and they rarely share with us

  • Can I create order forms that calculate the exact total with taxes?

    Can I create order forms that calculate the exact total with taxes?
    The customer needs to know exactly how much everything will cost before submitting. I can handle the actual payment portion manually.

    thanks for the info;
    I'll inform the admin dude that they need an upgraded acrobat to do forms.

  • F:convertNumber with type="percent" and value of type double.

    I got a problem: when trying to use f:convertNumber with type "percent" to convert number of type double I get wrong number. ex.:
    Actual number is 5, but I get 500,00% instead of 5,00%
    Is it a bug or I'm doing something wrong?

    Sorry.
    Just realized, that according to java.text.DecimalFormat value is multiplied by 100.

Maybe you are looking for