Union clause cut off decimal places?

Dear all,
I am trying to create a query with "union" clause (to join 3 parts of records).
If I run them separately, I got the figures in Qty field (of Bill of Material) with 3 decimal places.
However, I only got 2 decimal places, when I combined the 3 sub-queries.
Any idea please?
Many thanks
Yang
Edited by: Y on Jul 10, 2009 4:16 PM

Dear all,
I just tried to create a view in the database for the "union" query, and I can see it is a 6 decimal numeric field from the SQL sever management studio, as all data are displayed fine.
Unfortunately, I queried this view in SAP query manager, and it is still showing only 2 decimals ... 
I am very keen to know if there is a solution.
However, for now, I have let the view join the ITT1 table again in SAP to use the qantities figures.
It seems that SAP only shows 2 digit for numeric fields, unless it is getting data from a generic data table?
Cheers
Yang

Similar Messages

  • Currency Conversion Cuts off at 10 decimal places

    Hello all,
    When doing currency conversions the database cuts off the data two the 10th decimal place.  I need to be at 12 decimal places.  In the database the setting is set at decimal(25,10).  Is there a way to change it so the database will go out to more decimal places?
    Thanks for your help
    Steve

    It is possible to change the format to accept larger values, however this change will only impact any newly created Applications.
    To change the default, open Administrator and select "Set Application Parameters"
    Add the KeyID "SIGNED_DATA_FORMAT" and for the Value enter the total number of digits and the number of decimals, ex: "20,15" would indicate 20 digits to the left of the decimal and 15 to the right.
    Click on Update.
    Any new Application created will now use this new value for the Signed data column.
    I hope this helps in answering your question.

  • 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

  • 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 to 2 decimal places

    Hi,
    I use "Double" for my calculations and since I am working with $$ ;-) I need to round it off at 2 decimal places. Any quick way to do this? or do I have to write some major code for that?
    Thanks

    This works for all the test cases. Try this
    import java.math.BigDecimal;
    import java.text.DecimalFormat;
    import java.text.NumberFormat;
    class RoundOff {
         public static void main(String args[]) {
              System.err.println(" FINAL OUT PUT >>> " + formatPrecision("173449.8"));
              System.err.println(" FINAL OUT PUT >>> " + formatPrecision("173449.98"));
              System.err.println(" FINAL OUT PUT >>> " + formatPrecision("-1.0"));
              System.err.println(" FINAL OUT PUT >>> " + formatPrecision("-1.0"));
              System.err.println(" FINAL OUT PUT >>> " + formatPrecision("-141.036"));
              System.err.println(" FINAL OUT PUT >>> " + formatPrecision("-00.1"));
              System.err.println(" FINAL OUT PUT >>> " + formatPrecision("-0.0"));
              System.err.println(" FINAL OUT PUT >>> " + formatPrecision("173449.98"));
              System.err.println(" FINAL OUT PUT >>> " + formatPrecision("173449.0.54"));
              //RARE EXCEPTIONS BUT WONT OCCUR
              System.err.println(" FINAL OUT PUT >>> " + formatPrecision("0125."));
              System.err.println(" FINAL OUT PUT >>> " + formatPrecision("0125.979.79E"));
              //RARE EXCEPTIONS BUT WONT OCCUR
              System.err.println(" FINAL OUT PUT >>> " + formatPrecision("173449.2354"));
              System.err.println(" FINAL OUT PUT >>> " + formatPrecision("173449.9874"));
              System.err.println(" FINAL OUT PUT >>> " + formatPrecision("173449.999"));
              System.err.println(" FINAL OUT PUT >>> " + formatPrecision("173449.999"));
         private static String formatPrecision(String s) {
              if (s == null || s.trim().length() == 0) {
                   return "0.00";
              try {
                   if (Double.parseDouble(s) == 0) {
                        return "0.00";
              catch (java.lang.NumberFormatException nfe) {               
                   return s;
              double d = 0.00;
              int ind = s.indexOf('.');
              String dec = "";
              if (ind > 0) {
                   dec = s.substring(ind);
                   if (dec.length() == 1) {
                        s = s.concat("00");
                        return s;
                   if (dec.length() == 2) {
                        s = s.concat("0");
                        return s;
                   if (dec.length() == 3) {
                        return s;
              if (ind == -1) {
                   return s.concat(".00");
              try {
                   d = Double.parseDouble(s);
                   BigDecimal bd = new BigDecimal(d);
                   bd = bd.setScale(2, BigDecimal.ROUND_HALF_UP); //2 decimal places
                   d = bd.doubleValue();               
                   NumberFormat formatter = new DecimalFormat("0.00");
                   return String.valueOf(formatter.format(d));
              catch (java.lang.NumberFormatException nfe) {
                   return s;
    }

  • 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 ) );� {�                                                                                                                                                                                                                                                                                                                                                                                                               

  • 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));
    }

  • Limit a float value to single decimal place after round off

    41.231445 is float value . How can I limit this to a single decimal place after round off?
    ie; 41.2
    Any help in this regard will be well appreciated with dukes.
    Regards,
    Anees

    Also read this: [http://java.sun.com/docs/books/tutorial/i18n/format/decimalFormat.html]

  • Trimming decimal places on a textfield

    I have a program that calculates a double and puts it into a textfield. The problem is when i calculate it it reads all decimal places and i cant see the first few numbers. How can i trim it so that it cuts off after say 3 decimal places, or just at the end of the textfield

    I don't recall the syntax offhand. Find that class in the API.
    Then
    // check the API for constructor details.
    DecimalFormat formatter = new DecimalFormat(...);
    String shortString = formatter.format(3.784321);
    myTextField.setText(shortString);shortString will equal "3.784" if you set up the DecimalFormat correctly for 3 places after the decimal point.

  • PO with reference to contract nett price decimal place

    In a PO  with reference to contract when user ordered qty 0.046 and contract price = $100.00 with a 7 % tax rate, SAP takes (0.046 * 100) * 1.07 = 4.922
    However as PO is up to 2 decimal place, the nett price is cut off to 4.92
    Thus calculation of PO price (4.92 / 0.046) = 106.95652173u2026
    When rounded off to 2 decimal places, it becomes 106.96
    But in actual fact, it should 107.00
    Is there any way I can bypass this error?

    HI,
    The only solution I see is to create smaller unit of measure in a way that instead of ordering  0.046 you order 46, 0r 460.
    Best Regards,
    Arminda Jack

  • New question....adding decimal places...

    Ok my assignment is thus:The Lone Oak High School Marching Band is raising funds by selling fruit. In order to simplify processing of orders, only three types of packages of fruit are being sold. They are
    Box of Apples at a cost of $14.00
    Box of Peaches at a cost of $16.00
    Box of Oranges at a cost of $18.00
    There is a 10.00% tax on the total order amount. Write a Java program that reads the number of each type package on an order and computes the cost for the packages of each type ordered. Total the order, calculate the tax on the order, and the total including the tax. Print all items read and all items calculated with appropriate labels.
    Example:
    Boxes of Apples: 2
    Boxes of Peaches: 3
    Boxes of Oranges: 4
    Total cost of the fruit: 148.00
    Tax: 14.80
    Total Amount Due: 162.80
    Now ive got the program to work exactly as it should but for neatness i want it to have 2 decimal places. When it runs, ill use the above as an example, it cuts off the second decimal. Is there a nice way to add the the second decimal place?
    Edited by: chaoticglee on Jan 30, 2008 3:40 PM

    Try this as an example:
    import java.util.Scanner;
    import java.text.DecimalFormat;
    public class ex
        final static double HOTDOG_COST = 10.00;
        final static double TAX = 0.05;
        public static void main(String[] args)
            DecimalFormat money = new DecimalFormat("$0.00");
            Scanner in = new Scanner(System.in);
            System.out.print("How many hotdogs do you want? ");
            double subTotal = in.nextInt() * HOTDOG_COST;
            double taxCost = subTotal * TAX;
            double total = subTotal + taxCost;
            System.out.println("Cost of food: " + money.format(subTotal));
            System.out.println("Tax: " + money.format(taxCost));
            System.out.println("Total: " + money.format(total));
    }

  • Decimal places in standard input schedule templates

    Hi Gurus
    I have created some input schedules using standard template. User here will be entering some values in 2 decimal places (like 1.25) but when I enter any values in the cells, it automatically round off the values and displays values without any decimal places.
    I have tried changing the formats in Format control panel by changing the DATA / DEFAULT 's PATTERN / ALL for ROWs but it did not help.
    Please help how to resolve this.
    Cheers
    Swathi

    Hi nilanjan,
    Thanku, I resolved the issue using Format Range option with the below code
    CRITERIA    EVALUATE IN  FORMAT     USE     PARAMETERS    APPLY TO
    INPUT          ROW                1234,56      ALL                --                   DATA
    Thanku

Maybe you are looking for

  • Greyed out songs do not sync

    I have seen variations of this question elsewhere, but none quite on point. I have a number of albums in the iTunes library (Windows 8.1) in which a random number of tracks are greyed out. Some people have reported also seeing a dotted circle next to

  • Lion Macbook Pro unbootable - any way past this?

    Hi. I have a macbook pro with Lion installed. Yesterday it wouldn't boot up at all. I went to the recovery partition and that appears to be corrupted - it turned into a no-entry sign and then went back to it's non-booting main partition. I do not hav

  • At Selection screen validation

    Hi All, I Have a Situation, If User does not enter any thing on seelction screen my report still displays the data based on the selection criteria, what validation can be done at seelction screen to resolve this issue. Regards, VB

  • Problem installing a package from AUR

    I'm not expecting anyone to install this package just to try and answer my question but,, I have /home on a 10 gig space ext3 and it's only 2% full. When I try and install doom3-phantasm, the package downloads, builds and when it's time to install a

  • Reporting on service.

    Dear Gurus, When executing purchase document by vendor ME2L and ME2M reports with varient W-OFFEN  for open target quanity, system is not showing proper report for services.It is showing open PO in report though invoice is posted. Why it is happening