Decimal Problem

select
T0.U_ItemCode,
T0.U_ItemName,
T0.U_Forecast,
SUM(T0.U_mrpqty)'Simulated Qty',
(select sum(onHand) from OITW T1 where T1.ItemCode = T0.U_itemcode)  'Current Quantity',
(select T3.ItmsGrpNam from OITM T2 inner join OITB T3
on T2.ItmsGrpCod = T3.ItmsGrpCod where T2.ItemCode = T0.U_itemcode)'Item group name'
from [dbo].[@QUOTA1]  T0
where T0.U_ItemCode >= '[%0]'  and T0.U_ItemCode <= '[%2]'
and T0.U_Forecast = '[%1]'
group by
T0.U_itemcode,
T0.U_itemname,
T0.U_Forecast
When I run this query in SQL server 2008, in 'Simulated Qty' and Current Quantity the values are coming like 0.002084
6 decimal places after point, but in SAP B1, it comes .00

Hi Rupa,
              In SAP i will show only 0.00 because in general setting we normally give 2 to 3 decimal places. so the system takes 0.00 from 0.002..... see the first 2 decimals are 0. so it will display as 0 only...
As suggested u can add decimals but keep in mind once the decimal numbers are increased u cannot decrease them. if ur ok with that then go ahead.
regards,
Vignesh

Similar Messages

  • Query Decimal problem

    Hello experts.
    I have a problem with decimal on a query that its used in a VDT.
    In the dev system it works fine, but when I transport it to Prod system, the decimals doesn't represent fine.
    An example:
    dev system         prod system
    2,50 UN               3 UN
    Does anyone help me on this.
    Thks
    Vitor Ramalho

    hi,
      If you are not getting the decimal values let us say 2,50 instead of 2.50 then what you need to do is go to your user profile in production and select defaults tab and select the required decimal notation. The report should now show the values 2, 50 as 2.50.
    Hope it helps.........

  • Binary to Decimal problems

    Ok to give a background to why i am writing this and so everyone has a better understanding of exactly what it is that i want it to do it goes like this.... My girlfriend got a message from a friend that was all in ones and zeros, and no its not because something on one of the mail servers is messed up he meant for it to be that way. But through the process of converting the 8 digit binary numbers into decimal values so that the corresponding ANSI character could be found I decided that it was taking to damn long so i would just write a prog to do it for me and then i could send back an annoying long message to that guy with ease. Only there is a catch over the summer i went from hotshot for a newb to a newb without a clue, i more or less didnt write a single line of code over 4 months and now i am having problems.
    I wanted to write a program that could-
    -convert long strings of chars into all 8 digit binary code
    -as well as convert large blocks of 8 digit binary back into ANSI letter values and then ANSI characters
    -I want it to use a frame and have a relativly simple usage procedure
    Now that you know what i set out to do I can show you how far i got -
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.GradientPaint.*;
    public class BinaryToDec extends JFrame implements ActionListener
         // member variables
         JButton quit;
         JButton color;
         JButton convert;
         JLabel     label11_5, labelPassingWord;
         JTextField inputBinary, outputDecimal;
         Color      colorStore;
         String drawString;
         String bin;
         public BinaryToDec()
              drawString = "";
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              setLocation(100,250);
              setTitle("Binary to Decimal");
              setSize(420,200);
              getContentPane().setBackground(Color.BLACK);
              getContentPane().setLayout(null);
              quit= new JButton("DONE");
              quit.setForeground(Color.GREEN);
              quit.setBackground(Color.BLACK);
              quit.setBounds(100,10,75,20);
              getContentPane().add(quit);
              quit.addActionListener(this);
              color= new JButton("Bkgnd Clr");
              color.setForeground(Color.GREEN);
              color.setBackground(Color.BLACK);
              color.setBounds(15,10,75,20);
              getContentPane().add(color);
              color.addActionListener(this);
              convert= new JButton("Convert to Decimal");
              convert.setForeground(Color.GREEN);
              convert.setBackground(Color.BLACK);
              convert.setBounds(185,10,75,20);
              getContentPane().add(convert);
              convert.addActionListener(this);
              label11_5 = new JLabel("Enter a Binary Number");
              label11_5.setBounds(75,60,250,20);
              label11_5.setForeground(Color.GREEN);
              getContentPane().add(label11_5);
              inputBinary = new JTextField(25);
              inputBinary.setBounds(5,40,225,20);
              inputBinary.setForeground(Color.BLACK);
              getContentPane().add(inputBinary);
              inputBinary.addActionListener(this);
              labelPassingWord = new JLabel("Your Deciaml Equivilant");
              labelPassingWord.setBounds(75,120,250,20);
              labelPassingWord.setForeground(Color.GREEN);
              getContentPane().add(labelPassingWord);
              outputDecimal = new JTextField(25);
              outputDecimal.setBounds(5,100,225,20);
              outputDecimal.setForeground(Color.BLACK);
              getContentPane().add(outputDecimal);
              outputDecimal.addActionListener(this);
              setVisible(true);
         }// end of constructor
         public void actionPerformed (ActionEvent evt)
              if(evt.getActionCommand().equals("DONE"))
                   System.out.println("Quit Caught");
                   int choice = JOptionPane.showConfirmDialog(null , "You Pressed " + evt.getActionCommand() + " are you sure?"
                        , "Close Frame",JOptionPane.YES_NO_OPTION);
                   if(choice == 0)
                        this.dispose();
                   if (evt.getSource() == color)
                        Color color = Color.lightGray;
                        color = JColorChooser.showDialog(BinaryToDec.this,"Choose a color",color);
                        getContentPane().setBackground(color);
                   if (evt.getSource() == convert)
                        bin = inputBinary.getText();
                        int strLength = bin.length();
                        int pos1=0, pos2=7;
                        String temp = "";
                        String Decimal1 = "";
                        String Decimal2 = "";
                        int binLength = 8;
                        int count = 0;
                             do
                                  temp = bin.substring(pos1,pos2);
                                  Decimal1 = Convert(temp);
                                  Decimal2 = Decimal2 + "" + Decimal1;
                                  pos1 = pos1 + binLength;
                                  pos2 = pos2 + binLength;
                                  count++;
                                  outputDecimal.setText(Decimal2);
                                  repaint();
                             }while((strLength/8) >count);
         }//end of actionPerform
         public void paint( Graphics g)
              super.paint(g);
         public String Convert(String a)
              int ctr=1, decimal=0;
              for (int i = a.length()-1; i>=0; i--)
              if(a.charAt(i)=='1')      decimal+=ctr;
              ctr*=2;
              String converted = "" + decimal;
              return converted;
         public static void main(String args[])
              System.out.println("Binary to Dec");
              BinaryToDec in = new BinaryToDec();
         }// end of main()
    }// end of class FrameExample1
    OK so other than that i decided to play with some of the paint functions i more or less stayed on task, at first i had it just convert 8 digit binary nums into decimal form using this -
              int ctr=1, decimal=0;
              for (int i = a.length()-1; i>=0; i--)
              if(a.charAt(i)=='1')      decimal+=ctr;
              ctr*=2;
    which i found in someone elses post and made some changes to, thank you someone whoever you are i hope you see this, anyways,.. then i decided i wanted it to check the length of a string and divide it by 8 assuming that it it a perfect block of 8 digit nums and then cut it into substring and go through the proccess of converting the binary to deciaml one piece at a time. I did it more or less, well it compiles right but whenever you put in more than one 8 digit binary number it ends up giving you some really strange decimal numbers and i cant seem to figure out why the hell it is doing this.??? I was hoping that some one could help me out.
    If you read this far than thanks for taking the time on my post :)

    Did you try to decode that message by hand and verified that it really is encoded the way you think it is?
    Here some code to try
    public static void decode(String fileIn, String fileOut) {
            try {
            FileReader in=new FileReader(fileIn);
            PrintWriter out=new PrintWriter(fileOut);
            char[] buffer=new char[8];
            int i;
            do {
                i=in.read(buffer, 0, 8);
                if(i==8) {
                    out.write(Integer.parseInt(new String(buffer),2));
            } while(i==8);
            in.close();
            out.close();
            } catch (Exception e) {}
        public static void encode(String fileIn, String fileOut) {
            try {
            FileReader in=new FileReader(fileIn);
            PrintWriter out=new PrintWriter(fileOut);       
            int i;
            while( (i=in.read()) >= 0 ) {
                String str=Integer.toBinaryString(i);
                for(int j=str.length(); j<8; j++)
                    out.write('0');
                out.write(str);
            in.close();
            out.close();
            } catch (Exception e) {}
        }

  • Decimal Problem in fields

    Hi,
    In Export invoice we are entering currency in USD.When we enter the value it accepts 3 decimal places.But it is stored as 2 decimal places in table.
    Eg.2.059 USD in invoice screen
    but in table 20.59 USD.
    What is the problem?where we can rectify this error?

    It will be stored with two decimal places. No issues with that. when you display this on your report, you have to specify the currency as USD and your issue will be resolved.
    write: v_amount to v_amount currency 'USD'.
    I am quoting from the help of the write statement below.
    This addition defines currency-dependent decimal places for the output of data objects of data types i or p. For all other data types, except for f, the addition is ignored. For cur, a three-digit, character-type field is expected that contains a currency key from the column CURRKEY of the database table TCURX in uppercase letters. The system determines the number of decimal places from the column CURRDEC of the respective row in the database table TCURX. If the content of cur is not found in TCURX, two decimal places are used. The following applies for numeric data types:
    In the case of data types of type i, a decimal separator is inserted at the position determined by cur and the thousands separators are moved accordingly.
    In the case of data objects of type p, the decimal places defined in the definition of the data type are ignored completely. Irrespective of the actual value and without rounding actions, the decimal separators and the thousand separators are inserted at the positions in the numbers determined by cur.
    In the case of data objects of type f, the addition CURRENCY has the same effect as the addition DECIMALS (see below). Here, the number of decimal places is determined by cur.
    If the addition CURRENCY with length specification * or ** is used after AT, it is used first and the output length is determined from the result.
    Note
    The addition CURRENCY is appropriate for the display of data objects of type i or p without decimal places, whose contents are currency amounts in the smallest unit of the currency.
    Example
    The output of the WRITE statement is "123456,78".
    DATA int TYPE i VALUE 12345678.
    WRITE int NO-GROUPING CURRENCY 'EUR'.

  • Decimal Problem in Document Amount..

    Greetings for the day,
    In table amount showing properly. I mean decimal showing only 2 digits but
    in my document it is showing 3 digits. Earlier it was worked properly but
    since today morning I am facing this problem. I checked in T.code OY04
    there is no option for 2 decimals hence I haven't maintained local currency
    with any of the available options(1,3 or 5). So how to set in document
    decimals as 2 digits?
    Kindly revert me back as soon as possible with your valuable suggestions.
    Thanks & Regards,
    Vinod.

    Just check in OY01
    SU3 - User profile
    Do not give anything in OY04 - I have checked for my currecny GBP. I don't even find my currency in OY04
    It seems this setting is not needed
    Thanks

  • Floating Decimal problem!!

    Dear all,
    Dear all,
    I wrote a java application to manipulate some data format transferring. I can run it on Windows with jdk 1.3. But when I ran it on Red Hat, I got such problem:
    Exception in thread "main" java.lang.NumberFormatException: -0.715
    at java.lang.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1213)
    at java.lang.Double.valueOf(Double.java:183)
    at java.lang.Double.<init>(Double.java:258)
    at MethodEvaluation.ReadDataIn(MethodEvaluation.java:259)
    at MethodEvaluation.RunLCV(MethodEvaluation.java:67)
    at MethodEvaluation.main(MethodEvaluation.java:29)
    I'm very confused! Why the same program and the same data set got different results !?
    Please help me to resolve this problem! Thank you!

    It might have to do with locale settings and the decimal delimiter's being . or ,

  • CIN : decimal problem in export excise invoice

    Hi all,
    I have issue, we are in export sales and we activated 5 decimal option for our customer.
    issue is  we made a export billing document with ref that export excise invoice.
    - in my billing doc ED exchange rate is 47.4  and the unit price is 1.63 $
    when i am converting to inr  below difference is comming
    qty       inr price  Asse val       BED         dif for assessable value
    10224    77.26     789906.24   31,596.25  20.45 
                             789926.69    31597                 =>  it is calculated on 77.262 how to avoid the 3 decimal when system is calculating the Assessable value for duty calculation. ????
    above is for one line item. like this i have multiple line item is the same invoice and the difference is huge.
    Thanks in Advance
    Raghava

    Dear Lakshmipathi,
    Thanks for your reply, If I am not wrong 355 is rounding off rountine of excise values. as i told you mines is export pricing procedure my BED also in USD, which i can't do. If i do that even the rounding decimals when we converting to INR give lot difference.
    Second : Rounding nearest value function module
    In the background calculation when the system is calculating the assessable value, there we need to incorporte this with our won peace of code, but later on SAP bringing the original values somehow.
    in my case also INR 2 decimals only, system in the background it is considuring the 3rd decimal.
    do you have any other solution. please let me know.
    Regards,
    Raghava.

  • Decimal problem in a query

    Hi Experts,
    i have written this query.
    SELECT (2 * 2.54 * (cast($[$3.U_GSM.0] as decimal(10,6))) * (cast($[$3.U_DIA.0] as decimal(10,6))) * (cast($[$3.U_AVG.0] as decimal(10,6)))/100000)
    it works fine  but it return the value upto two decimal.(when i input these values in 1st udf 29, in 2nd udf 150, in 3rd udf .50)
    i want that the output will be upto 5 or 4 decimal.
    please help me out . i have made three udf on BOM at row level. All udf is of units and total type and stucture is amount type.
    or suggest the solution.

    Hi..
    SELECT CAST(2 * 2.54 * (cast($http://$3.U_GSM.0 as decimal(10,6))) * (cast($http://$3.U_DIA.0 as decimal(10,6))) * (cast($http://$3.U_AVG.0 as decimal(10,6)))/100000) AS Numeric(10,6)
    And if you are using 8.8 then check Settings under Administration>General Setting> Display decimal points for query
    Regards,
    Bhavank

  • Decimal problem in Workflow

    Hello expert,
    I have create new Workflow when we create trip request.
    This workflow work fine for many curency but not with Korea.
    because Korea curency it's customized without decimal, Workflow container show us 3.500,00 insted of 350.000 for example.
    Have you an idea?
    Thanks

    Hello,
    If you go to tx SU01D and look at WF-BATCH, Defaults tab, the Decimal notation is set there.
    But, I don't see an option for what you want.
    You may have to format each output (mails etc) separately.
    Isn't the system already set up for that numbering system?
    regards
    Rick Bakker
    hanabi technology

  • Decimal problem in iWork US EU

    I don't work a lot with numbers but want to start to use it a bit more but I seem to bump on the problem that I can't convert US created decimals to eu decimals. Here is the problem :
    I get my sheets in txt format and when I import these in to Numbers, Numbers just deletes the separator as in the US they use "." instead of ",". When I import them in excel the seperator doesn't get deleted so I van chance the seperator to local settings. But I even can't find a way to get iWork show the original values.
    My local language is Dutch (Belgian) and so is my iWork and OS. How can I fix this?
    Message was edited by: Wawawa

    I don't understand what is described.
    If it is a US TAB separated values, it would be:
    123.45⇥56,789.01⇥123,456.78
    If we open the text file with Numbers on a French system, Numbers will fill three cells with what it decipher as three strings.
    A clever soluce is to set, temporarily the System setting to Region = Suisse (French)
    the numbers without thousand separator would be correctly deciphered as Numbers.
    You will have to remove the thousand separators if some are used.
    Save the document
    Reset the System preferences to Region = Belgium
    open the document
    You will get the normal French format:
    123,45⇥56 789,01⇥123 456,78
    Yvan KOENIG (from FRANCE jeudi 18 juin 2009 21:34:22)

  • After decimal problem

    HI Everybody,
    i am facing problem like i want to calculate dozens amout. when i pass value like 4.06 means 4 dozen 6 pcs i got correct value but when i pass 4.10 i got wrong value due to oracle consider 4.10 to 4.1 (and 1 means 1 pc).so how can i got proper result.
    example like :
    select 4.03 from dual;
    answer:-4.03 Correct
    select 4.01 from dual;
    Answer :- 4.01 Correct
    select 4.10 from dual;
    Answer :- 4.1 Wrong Answer
    Dozen Rate Amount
    4.03 120 510 correct
    4.09 120 570 correct
    but
    4.10(4.1) 120 490 incorrect answer.
    So have anybody proper solution for that.
    thnx
    Edited by: vishal15 on Jan 26, 2011 4:33 AM

    You can use:
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select 4.03 col1,120 amt from dual
      2  union select 4.09,120 from dual
      3  union select 4.10,120 from dual)
      4  select FLOOR(TO_CHAR(TO_NUMBER(col1),'FM9999.90')) * amt, col1 ,TO_CHAR(TO_NUMBER(col1),'FM9999
      5*   from t
    SQL> /
    FLOOR(TO_CHAR(TO_NUMBER(COL1),'FM9999.90'))*AMT       COL1 TO_CHAR(
                                                480       4.03 4.03
                                                480       4.09 4.09
                                                480        4.1 4.10
    SQL>
    /

  • IBM Java Decimal problem

    I am having problems using decimals in the Visual Age for Java by IBM...i heard its supposed to be with float or double, instead of int, but i keep getting errors like expecting class etc...when i try to use ((double etc...)...
    any tips?

    //Test exit condition.
                        if (number == SENTINEL2)
                                  break;
                                       if (number <1000000.00)
                                                 //Calling upon prompt2
                                                 prompt2();
                                       if (number >1000000.00)
                                                 prompt3();
                        }//Close the string(loop...whatever).

  • Tax Rate Decimal Problem

    Hi Experts,
    I have to Create the New Tax Type like SCVD and Tax Category is CENVAT.
    Now I am Entering the Effiective Date is 01/04/2008 and Rate is 31.935.
    Now i Click on Tab Button on Rate box is automatic changed like 31.94.
    My Client Wants Rate is 31.935.
    So It Is Possibal in SAP B1
    Dixit Patel

    Hi,
    Did you check the decimal settings for the RATE under Adminsitration > System Initialization > Genreal Settings > Display.
    Is it 2 decimal places?
    Regards,
    Jitin

  • Windows 2k server and decimal problem

    Our essbase server's operating system is windows 2000. When loading data, especially dollar amounts greater than $10 million, we get xxx.549999 instead of xxx.55 which causes erroneous numbers in variance % calcs. Hyperion finally said today this is a known issue with the servers operating system and there are no fixes. Anyone else have this problem? Or found a solution?

    More info on the scenario
    The protocol is TCP/IP and there's only one networkadapter and we're able to login to this server so it's seems to me that the combination of protocol and adapter is working fine. Ping to the databaseserver is also ok.
    The problem with the terminalserver started one week ago without any changes done to the server.
    Have seen on unix-systems that one possible reason for the 12538 could be a missing link between the adapter and the product (like sqlplus) but haven't found a way to verify this in the NT-world.
    Thx,
    Baard

  • Decimal Problem while division in abap

    Hi dudes,
    I'm using following statement in the report
       l_steuer_ep-zzfwgross_SGD = ( ep-zzfwgross ) / ( w_exrate-EXCH_RATE ) .
    where  EP-ZZFWGROSS       =  30694.30-
    and W_EXRATE-EXCH_RATE =  0.77851
    Resultant value definitely will be greater than 30694 logically thinking...
    but i'm getting   0.39- .
    Both zzfwgross as well as zzfwgross_sgd are Same Data Types. I dont know why its happening...
    My Actual requirement is to convert Currency which is in USD(zzfwgross) into SGD (zzfwgross_sgd)
    <removed by moderator>
    Regards,
    Annamalai.
    Edited by: Thomas Zloch on Nov 17, 2011 1:20 PM

    Hi AnnaMalai(Brother Mountain)
    -(is that your name..?? Pls forgive me if wrong ..;-) )
    If you want to convert to USD to SGD, you need not to use formulas,
    there will be many Functional Modules available to convert,
    For ex: CONVERT_TO_FOREIGN_CURRENCY
    you can use these FMs to convert the currencies, it would be the best option..

Maybe you are looking for