How to fix decimal point limit

Hi
how do i fix the decimal point digit.
for e.g
if the input number is 123.33
then it should conver it to 123.330
OR
if input 123
then it should convert it to 123.000
OR
if input 123.321456
then it should convert it to 123.321
Thanks in advance.

No that is not the solution.
But I found out a different solution. The following code will give me exact figure which I was looking for.
BigDecimal inputSize = new BigDecimal(12.3215)
inputSize.setScale(3, RoundingMode.FLOOR);
Thanks to all of you for your support
Ciao :-)

Similar Messages

  • How to delete decimal point and adding leading zeros....

    Hi,
    I have one requirement in the report   i.e.
            <b>Present Value    :</b>  44567.98
            <b>Expected Value  :</b> 0000004456798
    In the present Value how will I remove that decimal point and how to add those six ing zeros. I tried with CONVERSION_EXIT....but it is not giving. Help me...
    Thanks in advance.
    Regards,
    Kumar.

    Hi,
    Use SPLIT and COMCATENATE fnctions.
    Eg:  split l_v at '.' into l_v1 l_v2
            concatenate l_v1 l_v2 into l_v.
    For adding leading zeros
    Use FM CONVERSION_EXIT_ALPHA_INPUT.
    Eg:
    data: tknum type vttk-tknum value '99156'.
    call function 'CONVERSION_EXIT_ALPHA_INPUT'
         exporting
              input  = tknum
         importing
              output = tknum.
    Sri
    Message was edited by:
            Sri Tayi

  • How to set Decimal Point position from right to left Serial Read Evaluate Number within Range over RS-232

    I am new to Labview, I am communicating with a TQ8800 Torque meter via RS-232. The 16 digit data stream is as follows:
    D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
    Each digit indicate the following status :
    D0 End Word
    D1 & D8 Display reading, D1 = LSD, D8 = MSD
    For example :
    If the display reading
    is 1234, then D8 to D1 is :00001234
    D9 Decimal Point(DP), position from right to the left
    0 = No DP, 1= 1 DP, 2 = 2 DP, 3 = 3 DP
    D10 Polarity
    0 = Positive 1 = Negative
    D11 & D12 Annunciator for Display
    Kg cm = 81 LB inch = 82 N cm = 83
    D13 1
    D14 4
    D15 Start Word
    I am using a modified version of the basic_serial_write_read.vi. I am attempting to parse the 16 digit data stream extracting out the number and whether it is positive or negative. I am having trouble with the decimal point placement. Is there an example that could help me with this? After the number is parsed I am then comparing it to see if it is within +/- 9.2 N cm. If it is then the test passes. I am outputing the data to a file. I have included the vi. Also how can I check for different units of the annunciator. Any help would be appreciated.  Thank you.
    Attachments:
    basic_serial_read.vi ‏100 KB

    What is the definition of the End Word?  You will likely need to figure this out experimentally (the manual doesn't seem to define it).  Whatever it is, you should set that as the termination character and enable the termination character.  That will help you in keeping your messages in sync.  Just tell the VISA Reads to read more than a message should be, something like 30 should work nicely.
    The error you are seeing is a buffer overload.  This means that the instrument is sending data to you faster than you can process it.  So you need to figure out how to perform the read faster.  File IO is slow.  So you should put that into a seperate loop so that your loop does nothing but read the data from the port as quickly as the data comes in.  Use a queue to send the data from the reading loop to the logging loop.  This is known as a Producer/Consumer.
    And here is a cleaned up version of your code.  No need for your express VI or the formula node.  Some other general cleaning up also done to make it easier to read.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    serial read.png ‏80 KB

  • How to restrict decimal point entry in numeric field?

    Hi All,
    There is a requirement from our client that, they cannot accept amount in decimals. That is, they cannot accept the cents, the amount that can be received from them is only in EURO and the same will be entered in the field. They want me to restrict the entry of a decimal point totally in the field, so that there requirement is fulfilled.
    Is this possible? If yes let me know how?
    If no, can you provide me justification, so that i can intimate the same to my client.

    Dear Steve,
    I had written in my first thread that, They want me to restrict the entry of a decimal point totally in the field.
    If i use 9999 as format mask, then it still allows me to enter a decimal, but when the focus moves out of the field, it highlights the field and warns me "Field must be of form 9999".
    But my requirment is to "Restrict the entry of decimal point totally @ runtime".

  • How to increase Decimal Points for the BOM Component Quantity

    Hi All,
    While creating BOM:
    Can anyone help me to know how i can increase the Decimal points for the BOM components quantity.
    I can able to give only upto 3 decimal points, but the requirement is more than that.
    I have increased the Decimal point value to 5 in transaction Code CUNI. but still it is allowing me to enter only upto three decimal places.
    Thanks and Regards
    Khadeer

    Khadeer,
    You would be better off changing the base quantity of the parent part.  Instead of "1 EA  parent contains .00003MG of  component" you could say "100 EA parents contain .003MG of component".
    Alternately, you could use different units of measure for your parent or component parts, which would be more suitable for the 3 place decimal limitation.
    I agree with Anil in that if you elect to change the decimals from standard, you could end up with huge changes that will propagate through every module in the ERP.  In my view, there is no need of this kind of headache.
    Best Regards,
    DB49

  • How to change decimal point in Rotate Tool.

    Hi,
    I use the rotate tool to design gauges, like clocks, a lot. I hold the ALT button and click on the center of my drawing and then a window pops up to enter in what degree I want my object to be. Currently the decimal point only allows for hundredths, ex. 45.25 degrees. Is there any way to change this to thousandths or even higher, ex. 45.25125? I've attached a screenshot to show you what I mean.
    Any help would be appreciated!
    Thanks,
    Laura

    Laura Belle,
    When you enter the full decimal value, that should give you the right rotation whatever the truncated value is.
    At least I hope that is still the case in your version.
    You may test it as follows:
    1) Create a square with W = H = 100;
    2) Rotate thrice, each time inserting 33.333333 degrees, then rotate by -100 degrees;
    3) Look at the W and H values;
    4) Repeat 1) - 3), only with 33.33 degrees and see what you get.
    You should get W = H = 100 in 3) and  something like 100.017 to 100.018 in 4).

  • How to insert decimal point while selecting data from a table

    Hi All ,
    My select requirement says , If the value received with no decimal then insert decimal before last 2 bytes. I need to retrieve data with this condition.
    May you people help how i can achieve this?
    Thanks in advance,
    Sachetan

    Is the data a number in string format?
    with q as (select '12345' myNum from dual
    union all select '45.78' from dual)
    select case when instr(myNum, '.') > 0 then to_number(myNum) else
           to_number(substr(myNum, 1, length(myNum) - 2) || '.' ||
                    substr(myNum, length(myNum) - 1)) end newNum from q
    NEWNUM
    123.45
    45.78If not just use
    with q as (select 12345 myNum from dual
    union all select 45.78 from dual)
    select case
    when instr(myNum,'.')>0 then myNum
    else myNum/100
    end myNum
    from q
    MYNUM
    123.45
    45.78

  • How to round decimal point to two places

    Hi all, I have been tasked with creating a custom "calculator" for a client that uses a specific equation. The client inputs data into two Input Text fields and the result shows up in a dynamic text field. Is there any way I can limit the number of decimal places to two? Here is my code (which works, except for the decimal issue):
    function onCalculate()
    one = Number(number_one);
    two = Number(number_two);
    result_1 = ((one / 4) * (65 / (1 - 0.25))) + ((two / 0.5) * (65 / (1 - 0.25)));
    Thanks in advance!!!!

    What will often be done is the result is first multiplied by 100, then rounded to an integer, then divided by 100.  So picking up from your last line where you calcvulate the result_1 value...
    result_1 = Math.round(result_1*100)/100;

  • How to put decimal points in your calculator for mac only on Xcode.

    I need help. I created an app for calculating division, multiplication, addition & Subtraction. But everytime I divide 5 / 4, I get 1 without a remainder. The calculator app in OS X has a remainder when I calculated the division problem. I searched on the internet for help, but all of them are iOS tutorials. HELP!!!!!!

    OK. But someday I'll be able to get these decimals in the calculator so that 5 divided 4 doesn't say 1, but says 1.1 (1.3 in the Calculator app in OS X.) Here's the code once again:
    - (IBAction) getSum:(id)sender;
        int addend1, addend2, sum;
        addend1 = [mathField1 doubleValue];
        addend2 = [mathField2 doubleValue];
        sum = addend1 + addend2;
        [mathAns setDoubleValue:sum];
    - (IBAction) getDiff:(id)sender;
        int minu, subtrah, diff;
        minu = [mathField1 doubleValue];
        subtrah = [mathField2 doubleValue];
        diff = minu - subtrah;
        [mathAns setDoubleValue:diff];
    - (IBAction) getPro:(id)sender;
        int mulcand, mulpiler, pro;
        mulcand = [mathField1 doubleValue];
        mulpiler = [mathField2 doubleValue];
        pro = mulcand * mulpiler;
        [mathAns setDoubleValue:pro];
    - (IBAction) getQuote:(id)sender;
        int numer, denom, quote;
        numer = [mathField1 doubleValue];
        denom = [mathField2 doubleValue];
        quote = numer / denom;
        [mathAns setDoubleValue:quote];
    If this question has been answered, then I'll continue my Xcode development. If not, i'll have to throw my project in the trash. Leave me a suggestion.

  • Arithmatic Equation - How to change decimal point ?

    Dear all,
    I am very new to LabView. I am currently using LabView 7.1 for my project.
    I am building a voltmeter reader. (attached is the vi file). The flow should be like, i am reading voltage from I/O card. Then, the voltage value (eq. 10 volt) is changed to percentage (for example 91%). I am using simple arithmatic icon (multiply and division). Then, these value will be written to a file (eq. voltage1.lvm).
    The output file is something like this :     

    Here is one function called "Format into File" that has it.  It is located to the top of the VI function block.  Other file I/O VI's have it has well.  If you right click on the function and select Edit Format String, it will pop up with a dialog box to help you create the format specifier.
    Message Edited by Ravens Fan on 05-12-2008 11:38 PM
    Attachments:
    Example_VI_BD6.png ‏1 KB

  • How to fix Entry Point dll error?

    Premiere Elements has been running OK for a couple of years, had to replace C drive. After reloading Premiere Elements 4 I get the following error (Vista).
    ?resolveEntity@DefaultHandler@xercesc_2_2@@UAEPAVInputSource@2QBG0@Z could not be loaced in the dynamic link library xerces-c_2_7.dll
    Thanks

    BTW, when you replaced your C drive, you didn't just make a copy of the disc's files and copy them to the new drive, did you?
    This often doesn't work. It's  a much better idea to re-install your software after you've installed the operating system. Otherwise, problems like you're describing are pretty common.

  • Automatic insertion of decimal point

    How do you make numbers automatically insert a decimal point? I want to input 12356 and I want it to appear in the cell as 123.56. In other words I want numbers to insert a decimal point in front of the last two digits I input. Having to input the decimal point myself really slows me down.
    to insert a decimal point

    Hi Jerry
    The fixed decimal point feature is available in Excel 2002 and is found under:
    Tools > options > edit tab
    about half way down click box next to fixed decimal point and you can also specify the number of decimal points.
    This fixed decimal point feature is then global for all sheets.
    In Excel 2007 click office button top left of screen
    in bottom right of drop down menu is a box named Excel options- click this
    then choose Advanced which is 5th option on LHS of menu and click second box in the menu next to Automatically insert a decimal point. You can again specify the number of points excel uses.
    I think this fixed decimal point feature must exist in Office 2004 as it appears in Excel 2002 and 2007.
    Hope this helps you. You don't miss it on a desktop keyboard where there is a numeric keypad but on a laptop it is a real pain to have to input the point on every entry.
    GG

  • Aligning decimal points in columns

    In my program I am writing I cannot seem to get the output to be formatted in the proper way. I need the columns to have the salary values aligned by their decimal points, by they are aligned to the left instead.
    Like this:
    Employee 1 2110.45 7-05-2004
    Employee 2 55.09 7-05-2004
    Employee 3 1100.00 7-05-2004
    This is the code I am using to print:
    public void printData() throws IOException {
              //Variable to read data from the text file
              BufferedReader in = new BufferedReader(new FileReader("EmployeeData.txt"));
            String str;
              Employee emp = new Employee();
              //Loop to read data from text file, alter salary, and print to monitor
              //Loop while there are lines remaining to read in text file
            while ((str = in.readLine()) != null) {
                   //Variable to break up each line in text file by name, salary, and date
                   StringTokenizer st = new StringTokenizer(str, "|");
                   //Loop while there are more elements in the current line
                   while (st.hasMoreElements()) {
                        //Retrieve name, salary, and date from the current line
                        String sName   = st.nextToken();
                        String sSalary = st.nextToken();
                        String sDate   = st.nextToken();
                        //Call function to calculate salary increase
                        double val = (new Double(sSalary)).doubleValue();
                        sSalary    = emp.calculateRaise(val);
                        //Print line to monitor
                        System.out.println(sName + "\t" + sSalary + "\t" + sDate);
            in.close();
    }

    If anyone wants to know how to align decimal points I
    found the answer here:
    http://leepoint.net/notes-java/25data/25strings/30conve
    sion/54num2string.htmlThat is not a true way to align decimal points. It is only a way to right align text. If your decimals are irregular with some being .0, and others .00 or .000 this will not work. But, it will probably work for your problem.

  • Remove decimal points

    Hi,
    how to remove decimal points from all the columns in table in obiee
    thanks

    hi
    add one decimal point
    is this the same? or any?
    Cheers

  • Process order confirm_Goods movement_Qty consum. after decimal point not al

    Sir,
    I am doing process order confirmation (COR6), In which go to "Goods Movement "....and consume actual consumption qty...but when i put figure after decimal point, system does not allow...e.g  3.524 KG...System rounded figure which i put in BOM...e.g in bom 3.524 KG, but when i confirm (COR6) the order shows 4 KG....
    Pl. help how to put decimal point...
    Pl. not that in BOM , system allows to put decimal point qty, but in confirmation it does not allow...
    Error message comes :
    Only 0 decimal places are permitted for unit of measure KG
    Message no. RU303
    Rajesh

    Sir,
    We check in CUNI,
    But in BOM, Decimal Point is allowed, but when we confirm the process order decimal place is not allowing...
    If seems that is it any setting in process order ?...Because if any error in CUNI then it does not allow at BOM creation level also....
    Rajesh Mehta

Maybe you are looking for

  • Java Add-in Installation of the Central instance installation

    I'm trying to re-install the Java Add-in Central Instance for ABAP. During the installation of Java Engine, i met the error on SecureStore step. In the LOG: >> SAP Secure Store in the File System - Copyright (c) 2003 SAP AG >> A key/value pair with t

  • How can implement running total in oracle forms

    I want to implement a running total in oracle form like 100 100 300 400 200 600 500 1100 200 1300 100 1400 PROCEDURE calculate_srno IS current_rownum     integer:=:System.Cursor_Record; starting_srno integer:=:rs_1; last_rownum integer; BEGIN      la

  • Password Sync Error Message

    Hi, hope someone can help. have installed 32 bit passwordsysnc.dll on ad server 2003 R2 connecting to sun IDM 8.1.1 using the direct method. It seems to function correctly and password changes are being synced, but each change results in an event log

  • Adobe X Printing Issue

    Morning, After upgrading to Adobe X on all Windows 7 Enterprise systems, we can no longer print PDFs.    The PDFs state they are sent to the printers but nothing ever appears.  We have tried installing new print drivers, disabled advanced features in

  • Any way to simulate a user drawing a straight line in Captivate 6?

    I'm trying to create a software simulation. While most of the user interaction with the software involves just clicking buttons and entering values in various fields, there is one place where the user has to draw a straight line from one point to ano