How to get 2 decimal place of an amount?!

Hi. How to get only 2 decimal place of the said amount?!
I use to_char(v_rec.amount, '999,999,999.99') however it is outputting more than 2 decimal place. Thanks!!
1,048.7800205
Edited by: 989873 on Feb 26, 2013 6:33 PM

989873 wrote:
Hi. How to get only 2 decimal place of the said amount?!
I use to_char(v_rec.amount, '999,999,999.99') however it is outputting more than 2 decimal place. Thanks!!
1,048.7800205above should NOT contain any comma
it works OK for me.
How can we reproduce what you report?
  1* select to_char(1048.7800205, '999,999,999.99') from dual
SQL> /
TO_CHAR(1048.78
       1,048.78

Similar Messages

  • I need to get 2 decimal places when using a formula for a quotient and Numbers will only give me whole integers which is useless since most items will be less than 1. How can I change this?

    How do I get 2 decimal places when using a formula for a quotient? It only gives me whole integers. Most of the results will be less than 1 so I need 2 decimal places

    the quotient function returns only whole number portion of the dividing two numbers.  If you want the actual decimal value use the divide operator.  you enter this as:
    A/B
    if the numerator is in A1 and the denominator is in B1 you can enter the formula like this:
    =A1/B1

  • How to set  two decimal places in currency inr

    hi,
    i want to set two decimal places for my co.code currencu inr.  In t-code oy04 there is no 2 decimal places. Please tell me how set decimal places so that amount in account balances should be in two decimal places.
    thanks
    amol

    Hello,
    If your currency code entry isn't in OY04 customizing step, your currency code has 2 decimal place automaticly. If you want to define a special decimal place without "2", you must define it in OY04.
    Regards,
    Burak

  • How we can increase decimal places in Sales Order for Qty

    Hi,
    In Sales Order qty field now its 3 decimal places for MON unit of measure but we want 4. how we can increase decimal places.
    Thanks in advance
    Thanks & Regards,
    PM

    To elaborate better.
    Again, use Tcode CUNI - Unit of measurement : Initial Screen.
    At initial screen, choose TIME from the list (where by default AAAADL- no dimensions is there).
    And click on UNIT OF MEASUREMENT button.
    In that you will find MON - Month.
    There go for details by selecting MON or select MON and press F5 from Key board.
    For MON unit maintain following parameter as per your requirement:
    -Number of decimal places for number display
    Use - This parameter determines the number of decimal places with which this measurement unit is displayed.
    -Base ten exponent for floating-point display
    Use - This exponent determines how the values for this measurement unit are formatted as floating point numbers.
    Examples - If the exponent is 3, the floating point numbers have the format xxx.xxxxE3.
    And deselect commercial meas. unit in application parameters section.
    I would suggest instead of changing standard settings of MON, you create ZMON in TIME dimension.
    Thanks & Regards
    JP

  • Without to change the setting.how to set the decimal place to 7 for an UDF.

    Without to change the setting, how to set the decimal place to 7 for an UDF?

    Hi
    Once you create a UDF it will automatically be binded to the data source of data type that you gave at the time of creating UDF.
    So i think you can not set the decimal places without changing the setting in display parameters.
    i am not sure whether it will work or not one thing you can try is that create it as a alphanumeric data type and convert your decimal value to sting and then assign it to UDF,While retrieving for any manipulation you convert it as decimal.
    Hope it helps you
    Regards
    Vishnu

  • How to get number of digits in given amount

    Hi Experts,
    How to get number of digits in given amount.
    Regards
    Mohit

    Check this :
    data: v_data1 type p decimals 3 value '12.860',
          v_char1 type char20,
          v_char2 type char20,
          v_char3 type char20,
          len type i.
    write v_data1 to v_char1.
    split v_char1 at '.' into v_char2 v_char3.
    len = strlen( v_char3 ).
    write:/ v_char2,
          / v_char3, " this holds the digit value
          / len.     " number digits

  • How to get the split period wage type amount in payslip?

    How to get the split period wage type amount in payslip?
    Payroll period for 01.01.09 to 31.01.09.
    1.     Employee is active from 1.1.09 to 10.01.09
    2.     Employee is inactive from 11.01.09 to 20.01.09
    3.     Employee is again active from 21.01.09 to 31.01.09
    In Result Table three split periods are created.
    From 01.01.09 to 10.01.09 u2018Basic Salaryu2019 Wtype  1101 amt is 20.00
    From 11.01.09 to 20.01.09 u2018Basic Salaryu2019 Wtype 1101 amt is 00.00
    From 21.01.09 to 31.01.09 u2018Basic Salaryu2019 Wtype 1101 amt is 10.00
    My requirement is to print only the last split period in payslip from 21.01.09 to 31.01.09. May you please help me in this regard.
    Thanks in advance
    Regards,
    Rajesh.

    Hi
    Try to read the below:
    WPBPC : Distribute Lump Sum Wage Elements to WPBP Periods
      Object
        Operation
      Use
        Operation WPBPC distributes the amount of the current wage type to the
        active WPBP periods in the payroll period.
      Input
        The current wage type in the header entry of table OT is used as input
        for this operation.
      Procedure
        Within payroll, wage types are assigned to a fixed WPBP period by
        infotype 0014 Recurring Payments/Deductions, for example. However, you
        may want to distribute this payment to all active WPBP periods, which is
        what would happen if the wage type were entered in basic pay. Therefore,
        various specifications exist for parameter S:
        o   If the specification is 'A', and if several active WPBP periods
            exist, the amount is simultaneously reduced on a calendar-day basis.
        o   If the specification is 'D', the wage type is distributed to all
            existing WPBP periods without the amount being reduced.
        o   If the specification is 'S', and if the validity period starts or
            ends during the period, the entry in table WPBP is split using this
            date. The wage type is stored in table OT for the corresponding WPBP
            period.
            This parameter is only allowed if processing was accessed using
           function P0014.
           In this case, infotype 0014 must be processed before absence
           valuation and function PARTT. Otherwise, rejections occur during
           payroll processing.
       o   Specification 'X' is the combination of 'A' and 'S'.
           This parameter is only allowed if processing was accessed using
           function P0014.
       o   If the specification is 'W', and if the validity period starts or
           ends during the period, the entry in table WPBP is split using this
           date (as with option 'S'). Unlike 'S', the wage type is not stored
           in table OT.
           This parameter is only allowed if processing was accessed using
           function P0014.
       o   If the specification is ' ', the wage type is stored in table OT for
           each WPBP period in which the validity interval fits.
           This parameter is only allowed if processing was accessed using
           functions P0014 or P0015.
       If the WPBP split is set for a wage type, the wage type is stored
       without changes in table OT. If you specify a different wage type name
       in the second parameter, the wage type is stored with this name in table
       OT. Before you execute operation WPBPC, you may therefore need to delete
       the split using operation ELIMI.
       If a country-specific split (C1, C2, or C3 split) is set, the operation
       interprets it as an error. The employee in question is rejected by
       payroll. All other splits are transferred as they are.
      Output
        The processed wage type, or the wage type specified in the operation
        call, is written to table OT (output table) with the appropriate split
        indicator and reduced amount as operation output for each WPBP period.
        Parameter specification 'W' is the only exception.
      Syntax
        OOOOOSVVVV
        OOOOO       WPBPC       Operation name
        S
                    blank       distribute to all WPBP periods
                    S           split and distribute WPBP
                    W           split but do not distribute WPBP
                    A           distribute to active WPBP periods
                                with calendar-day reductions
                    D           distribute to all existing
                                WPBP periods
                    X           combination of 'S' and 'A'
        VVVV                    Results wage type
                    blank       input wage type = results wage type
                    wage        wage type name of input wage type is replaced
                     type       by wage type name of results wage
                     name       type
        Wage type before operation:
      Example
        M100        02          3000
        WPBP split
        01  June 01 - June 20 active
        02  June 21 - June 30 active
        VVVV                    Results wage type
                    blank       input wage type = results wage type
                    wage        wage type name of input wage type is replaced
                     type       by wage type name of results wage
                     name       type
        Wage type before operation:
      Example
        M100        02          3000
        WPBP split
        01  June 01 - June 20 active
        02  June 21 - June 30 active
        Wage type before operation:
        WType       WPBP        Amount
        M100        00          3000.-
        M200        02          2000.-
        Operation:   WPBPCA
        Wage type after operation:
        WType       WPBP        Amount
        M100        01          2000.-
        M100        02          1000.-
        M200        02          2000.-
        Operation:   WPBPC
        Wage type after operation:
        WType       WPBP        Amount
        M100        01          3000.-
        M100        02          3000.-
        M200        02          2000.-
    Regards
    Team Member.

  • How to add 2 decimal places if the number is whole number(Integer)

    Hi Gurus- I had a requirement to add the zeros for two decimal places even the number is an whole number.
    Example: I had a column which i gave the datatype as Number(8,2) .While Inserting from the flat file to the custom table column,i am rounding it to 2 decimal places.But if its the whole number i want that also to be rounded to 2 decimal places.
    1) 3456.89675 It's getting inserted as 3456.89
    2) 123 It's getting inserted as 123 (Instead i want this to be inserted as 123.00)
    3) 123.50000 It's getting inserted as 123.5 (Instead i want this to be inserted as 123.50)
    Can you please let me know how can i achieve it to insert any number(decimal or whole number) from the flat file as 2 decimal places in the custom table column.
    Thanks in advance.

    Please do not post duplicates -- To update the date for the first of the month

  • How to change the decimal places in the value axis of a chart in WAD?

    Hello,
    The key figure in my chart has 2 decimal places and I want the value axis to show the same. How to do that?
    Thanks in advance, Nathalie

    Hi,
    change the Format property of the ValueAxis-Line to 0.00
    Then the axis displays its values including two digits after the decimal.
    Regards, Kai

  • How to restrict the decimal place of a floating point number?

    Hi,
    Here is my code:
    public void TwoDecimal(double u){
         String w = Double.toString(u);
         int c = w.length();
         System.out.println(c);
         if (c <= 5)
            double a = Double.parseDouble(w);
            System.out.println(a);
         else
            System.out.println("Invalid input!");
      }I want to show a floating point number which has 2 digits and 2 decimal places, e.g. 45.82, 29.67. This number is input by user and passed as a parameter.
    For those case like the above sample floating point numbers, it can display the proper value of 'c'. e.g. 45.67 will display 5.
    However, when I passed 99999, it will show 7; 9999 will return 6, not 5.
    So, if the user does not input the '.', does it append 2 implicit chars to it? i.e. 99999.0 and 9999.0. So, that's why it returned 7 and 6 for the length of the string respectively.
    How can I fix it?
    and
    Does it has better algorithm?
    Pls advise.
    gogo

    When dealing with a known precision, in your case hundredths, it is often a good idea to use an integer type and add in the decimals on printing only. This is often the case in banking systems. Almost all of them use integer types, (read long) in pennies to store monitary values. Ever seen someone type in a value for a credit card machine? For something like $20 they press.. "2" "0" "0" "0" The machine knows the lowest denomonation in a cent, so it knows where to put the decimal place. I suggest you do something like this. It also helps to avoid base 2 round off errors.
    -Spinoza

  • How to display 2 decimal places using DecimalFormat?

    Hi, i would like to display an account balance from database using child.getAccountBal(). Before that, i want to use DecimalFormat to display 2 decimal places. I would like to know whether the codes below are correct. Can anybody guide me? Thanks.
    public static double roundTo2DecimalPlaces(double value){
              DecimalFormat df = new DecimalFormat("0.##");
              double d = df.format(value);
              System.out.println(d);
              return value;          
    And inside the jsp page...is that how i call the values?
    Account Balance: <%=roundTo2DecimalPlaces(child.getAccountBal())%>

    DecimalFormat's format method returns a String not a double,
    os you must return a String instead of a double.
    public String roundTo2DecimalPlaces(double value)
         DecimalFormat df = new DecimalFormat("0.00");
         String stringValue = df.format(value);
         return stringValue;
    <%= roundTo2DecimalPlaces(child.getAccountBal()) %>

  • How to keep 2 decimal places for double value

    Hi,
    I need rounding function, which should round a double number till 2 digits, if there is no decimal part it should append 2 zero's in decimal places.
    eg. 100 --- > 100.00
    200.234 --> 200.23.
    I tried with Number class. but it is returning string, from that string if I try to convert to double value, it is rounding off one digit.
    Can any one help on this problem.
    Thanks,
    Suman.ch

    I am using xmlBeans using that I need to write this
    rounded value into a xml file, for that I need only
    double value with 2 decimal places.You can probably write the value as a String instead of a double somehow, so you can use the DecimalFormat class.
    You could try their mailing-lists for users/developers:
    http://xmlbeans.apache.org/community/index.html

  • 3 Decimal place values for Amount Key Figure

    Hi Experts,
    I have created an ODS in BI 7.0. This has a amount key figure which is getting calculated by a routine. Now The value that is getting calculated is getting stored into the ODS with only two decimal places.
    For example if the value that is gettig calculates is 0.187 by the code, the values that is getting stored is 0.19.
    This is not related to Bex display. We need to store the values 0.187 in the system and not 0.19.
    The Amount key figure that we are using is of unit 0DOC_CURRENCY . In Additional properties,  'key figure with maximum precision' check box is ticked is . We have not defined any decimal places for the BEX Display.
    Kindly help us in this matter.

    Hi Saurabh,
                  If you wish to change the decimal precision for your 0DOC_CURRENCY... you can use t.code CUNI to change the number of decimal places.  But, then this would be global effect wherein whereever this infoobject is used it would be reflected with the changes you made in CUNI.  Also check if you have authorization to change this. 
    Regards,
    Kishore

  • How to assign Two Decimal Places for numeric Columns(urgent)

    Hi all,
    I have lot of Numeric fields under Advance table Section.
    for those fields data is coming single decimal point (42.5).
    but client want to see the data upto two decimal points like 42.50
    how to achieve this functionality.
    Please give me some idea on this functionality.
    it is very urgent for me.thanks in advance
    thanks
    vinu

    Use OADataBoundVariables and set the US currency format for the data. It would come accordingly. You can look for the exact code in some other threads.
    Another option is to set the decimal format in the getter of the VO. It would show accordingly on the page.

  • How to get a decimal number from three single byte numbers

    i'am in a difficult situation. I have motor which provides me the number of steps moved as three numbers of length one byte.I 'am attaching the program with this message. Here the commands from index 2-4 outputs will provide the number of steps moved. But these are numbers with a single byte length(<256). So how can I get the corresponding decimal number from these three single byte length numbers. please reply
    Attachments:
    stop2.vi ‏11 KB

    Without knowing what motor you are using, I'm guessing that you probably need to use the Join Numbers to combine the bytes into a U32.  The other option is to use the Type Cast function.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

Maybe you are looking for