Rounding off to 0.05 decimal

Post Author: masto123
CA Forum: General
Hi there,
I am tring to round off a field which is displayed in AUD currency as $23.43 to $23.45. I have tried the round function
round(,0.05) but I get an error. Is there any other way.
pls help.
regards
m

Post Author: yangster
CA Forum: General
If its a numeric value either a simple field or a summed field you should simply be able to format the number field and apply custom formatting to change it to 2 decimal places.  If its a text field you can use totext(field, 2).but the problem with your formula is that the format is round(field, #places)# of places needs to be a whole number not a fractionround(field, 2)

Similar Messages

  • Round off Double to 2 decimal places??

    Hi all the pro out there..
    anybody can tell me how to go about rounding off eg 5.9542 to 2 decimal places in java? i went to search in API Double class, no method that allow me to do that..
    is there any other way?
    pls advise thank you

    If the former, you can do it manually by multiplying by an appropriate number, casting to int, and then dividing by the same number.Although this won't always work.
    Suppose you want 1.125 --> 1.1
    1.125 --> 11.25 --> 11 --> 1.1 plus some epsilon, since 1.1 can't be represented exactly in base-2.Yes, I know that (I assume you knew I knew that). So, maybe the OP needs to use both methods in combination (and maybe use some rounding method [such as in the Math class] other than cast).

  • Rounding off float to 2 decimal places and returning the float

    I tried doing bigdecimal but it doesnt work. :
    BigDecimal bd = new BigDecimal(5 * 0.0394);
              retval = bd.floatValue();
              System.out.printf(" th %f\n",retval);
    I see 0.197000. I know that there are 6 places since I didnt do %.2f. However its not the printf thats important . The float I want to return must be rounded off to two decimal places.
    Thanks in advance for the help,
    sb

    Use BigDecimal.round( MathContext mc ), where the MathContext object is set to a precision value of 3;
    BigDecimal roundedBigD = myOriginalBigD.round( new MathContext( 3 ) );� {�                                                                                                                                                                                                                                                                                                                                                                                                               

  • Round off quantity variable eliminating decimal places

    Hi,
      I have a variable of quan type with value = 1008.123
      I want to round it off with no decimal to be displayed.
      Please suggest.

    Hi,
      Refer
    https://forums.sdn.sap.com/click.jspa?searchID=11055268&messageID=4565374
    https://forums.sdn.sap.com/click.jspa?searchID=11055268&messageID=4721312
    https://forums.sdn.sap.com/click.jspa?searchID=11055268&messageID=2700419
    Regards
    KIran

  • Invoice Amount Rounding Off

    Good Day.
    Is it possible to have my selling price have 2 decimal places, but the Invoice amount will be rounded of to hundreds, only for a specific currency?
    Example:
    Price: 123.45 Yen per 1 pc
    Invoice Amount: 123.00 Yen  <-- rounded off, does not require decimal place
    Let me know.
    Best regards,

    hi
    not a problem.
    you need to maintain prices for your product with 2 decimals in VK11 so that this brings 2 decimal pricing in sale order.
    for rounding off in invoicing activate 'round off' condtion type to the nearest yen either up or down.
    hope this is useful to u.
    suresh

  • Regarding round off the value in adf table

    HI All,
    My Requirement:
    i have to round off the value after decimal in adf column before saving to data base.
    Excample : 1234.67 = 1235
    34567.89=34568
    34567.34= 34567
    i am using jdeveloper 11.1.1.3.0
    Please can you give code using converter or any other strategy.
    Thanks & Regards,
    Madhu

    1. First of all you asked for rounding off, taking the integer part is not rounding off.
    2. As per the documentation
    integerOnly      boolean      Yes      Flag specifying whether only the integer part of the value will be formatted and parsed. Default value is false.if i can understand correctly pertains to formatting only.
    3. You can create a custom faces converter and add it to faces config.xml http://docs.oracle.com/javaee/1.4/tutorial/doc/JSFDevelop4.html . So that you do not have to write it in code.
    4. If only integer is to be allowed why don't you change the data type to long or int instead of number

  • Rounding off salary components in Payresult table

    Hi Experts,
    I have a query around rounding off amounts in PC_PAYRESULT cluster. The basic pay should be rounded off two places from decimal ( This is done by v_512w_d, changing PC -10 (A)) but for other wage types the rounding of rule is no value post decimal and rounding off the amount after decimal to next number.
    Really appreciate any help on the same. Thank you so much for all your support.
    Regards,
    J
    Edited by: jyotsgsap on Aug 1, 2011 1:29 PM

    Sorry , in case of wrong communication from my side, when i said about the process class 10  Spec A , it means this is the standrad one which was been provided by the SAP so for the wage types which are in IT0008 if they come into proration (i means PRCL 10 as 1 and if all them has to be rounded off in such cases instead of useing the PCRs we can go with the standrad one so i have said to go in the said manner in the previous thread) in standrad to round off the wage types we have to go with Custom PCRs if you are asking for Wage types in IT008 , 0014 , 0015 Etc
    the pcr shd be inserted below XVAL if any or else u can use Spec A for wage types IT0008 , for wage types in IT0014 and 0015 you can use INAP

  • Rounding off to a variable value to 4 decimal values in sap script ouput

    Hi All,
    I have a value getting displayed in sap script output as 235.6789 i want to Round off this variable value to 4 decimal values!
    What is the formatting option need to be used & how!
    Thanks in advance.
    Thanks,
    Deep.

    Hi,
    1.In layout just call that variable, where you need like:
    &variable(.4)&.
    Just see these:
    &symbol(Z)&  Omit Leading Zeros 
    &symbol(S)&  Omit Leading Sign 
    &symbol(<)&  Display Leading Sign to the Left 
    &symbol(>)&  Display Leading Sign to the Right 
    &symbol(C)&  Compress Spaces 
    &symbol(.N)&  Display upto N decimal places 
    &symbol(T)&  Omit thousands separator 
    &symbol(R)&  Right justified 
    &symbol(I)&  Suppress output of the initial value
    Regards,
    If helpful reward with points(Don't forget).

  • Rounding off during APP (f110) of decimal point

    Hi
    Can any one help me? When I run the T.Code f110 for automatic payment programme is generate cheque propaly, here my client want to rounding off for the decimal point in cheque amount as if coin adjastment.

    Hello Arup,
    I guess OB90 is helpful to you so pls check the same.
    Thanks & Regards,
    Lakshmi S

  • Web dynpro + adobe form decimal field round off

    hello all,
    I am now developing an application which is based on the SAP WebDynpro and Adobe form, but the application has an error, if one can help me to resolve the error, I will be very thankful.
    The error is as follows, for a decimal filed on the Adobe form which is binded to a deicmal attribute of Webdynpro, if I get the value of the decimal field using the programming code as "context.nodexx.getAttribute("xx")", the decimal value is rounded off (e.g., 2.4 is changed to 2.0, 2.7 is changed to 3.0).
    for example:In Web Dynpro,  A node name is  "TestNode" which has a  type of decimalattribute named "TestAttr" ,  in  adobe form  a decimal field  bind to the TestAttr . when i input 2.3  in  adobe form,  i  click the button with code:
    this.wdComponentAPI.getMessageManager.reportSuccess(this.wdContext.nodeTestNode.getTestAttr()+"");
    the rusult is  :     2.0
    if  i  input  the  value  2.5   the result  will be  3.0
    Thanks All !

    Hi,
    there is a special display pattern to check for null values:
    null{pattern}
    Example:
    null{'please enter a value'}
    But I don't know if WDJ is really sending a null value. You can combine this with alternatives using '|' to separate alternatives.
    Regards,
    Juergen

  • Price per unit is getting round off to two decimal places.

    Hi Gurus,
    In the Billing output, the Price per unit is getting round off to two decimal places.
    How can we avoid this or allow 4 decimal places for such cases.
    In the same pricing procedure, we have two pricing condition types PR02 and ZR01.
    When PR02 is being used,it doesnt rounds off Price per unit.e.g .578888 = .578888
    But when ZR01 is being used the system rounds off price per unit.e.g.578888 = .58
    Please suggest where is the setting for it.
    Thanks
    Montee

    Hi,
    Which currency you are using? If its INR, then it will do only for 2 decimal places.
    The solution for ur problem can be ractified by changing the scales :
    Also check OSS 80183
    Thanks,
    Raja

  • Rounding off a float to two decimal places

    I want to make a function where I shall pass a float and and integer.
    The float shall have to be rounded off to a value in the integer.
    Can anyone please suggest how to round off a float.
    E.g.: if the float is 12.56890 and I want to round it off to 2 decimal places, then it should be 12.57.
    Regards
    Hawker

    I didn't mention any datatypes like float, double.True, but that is what the question is about, so you weren't answering the question. For a change.
    As I mentioned, that was just a mathematical steps to round of the floating point value. (Not in any programming languages point of view).False. You didn't mention that at all.
    This is the code for that in java.So here you are mentioning datatypes and floats for the same piece of mathematics that you have already been told, with reasons, doesn't work in floating point.
    which seems to be working fine
    Seems to. What evidence do you have that the float actually got rounded? As opposed to got displayed as rounded? Which is not what the OP asked for.
    And of course all that code seems to do is round 0.01 to two decimal places, which again is not what the OP asked for.
    For any remaining fans of this 'technique', please explain the behaviour of the following code:
         public static void     main(String[] args)
              int     count = 0, errors = 0;
              for (double x = 0.0; x < 1; x += 0.0001)
                   count++;
                   double     d = x;
                   int     scale = 2;
                   double     factor = Math.pow(10, scale);
                   d = Math.round(d*factor)/factor;
                   if ((d % 0.01) != 0.0) // if 'd' really has been rounded this should be zero
                        System.out.println(d % 0.01);
                        errors++;
              System.out.println(count+" trials "+errors+" errors");
         }

  • Round off to two decimal places

    hi
    i have a filed in it values are there i want to round off to two decimal places
    which is the function module for it please suggest
    regards
    Arora

    Hi Nishant Arora,
    Please check this code.
    DATA: N1 TYPE P DECIMALS 4 VALUE '0.0565',
               N2 TYPE P DECIMALS 2.
    MOVE N1 TO N2.
    WRITE: N2.
    Here the value is get rounded to 0.06.
    Rather than function modules you go with this. I think it is easier.
    Reward points if useful.
    Cheers,
    Swamy Kunche

  • Rounding off to two decimal places

    Hello,
    For simplicity, is there a method which will round off
    a double variable to two decimal places.
    Excample: if I have a result which equals 2.1999998
    and I want to display this as 2.20 in a TexTField.
    Any help would be much appreciated.
    Thanks

    If you are trying to do dollars and cents, I further recommend you use:NumberFormat currencyFormatter = NumberFormat.getCurrencyInstance();
    String currencyOut = currencyFormatter.format(yourNumber);to format your numbers as they will give the correct precision for international currencies simply by setting the locale, and they will also automatically handle the currency symbols ($, DM FR, etc.)
    Doug

  • Rounding off the decimal place.

    how to round off to 2 decimal place for this following programs:
    double x;
    x = 5.0/3.0;
    System.out.println(x);
    answer for x is 1.6666666666666
    my desired output is 1.67

    import java.text.*;
    public class Foo {
        public static void main(String[] args) {
            double x;
            x = 5.0 / 3.0;
            DecimalFormat df = new DecimalFormat("0.##");
            System.out.println(df.format(x));
    }

Maybe you are looking for

  • BI : dump while running the DTP

    Hi Experts, While loading the cube , The DTP fails due to below error : "Value 'Pyro DN March 2010 ' (hex. '005000790072006F00200044004E0020004D00610072006300') of characteristic 0CATSTEXT contains invalid characters". I have tried ALL_CAPITAL in RSK

  • Can I use my tv as a display for my macbook air?

    If i I bought Apple tv and plugged it into my tv, could i then use that tv as a display for my macbook air as if my tv were a mac display?      I have a macbook air but I dont want to buy a whole new display for it which is why i want to use my tv. I

  • Scrolling Problem with Air Mouse

    I'm using a Mac Mini on my living-room TV and I bought an Air Mouse to use, it's a mouse with accelerometer in a tv remote shape, i'm having trouble when some window have scrolling content, like a web page or a folder in Finder with some files. When

  • APEX integration with EBS 11i10: view concurrent request output

    Hi All: ENV: APEX 4.0 EBS: 11i10 DB: 10r2 APEX is installed in the same database as EBS 11i10 1. I have developed a APEX application that is can be launched from EBS as a form function. Also, the APEX will not ask any credential when user launch it f

  • How to manage hyperlinks to own pages?

    I have used iWeb many years and developed several websites. Some of them have dozens and even hundreds of pages. The problem is that always when I'm linking a page to my other own pages I must drop down the complete Own Pages menu. I have to come thr