RE: Reduce the Decimal Points

Hi All,
I need to reduce the decimal points.  my key figures are VGW01- Standard Value, VGW02- Standard Value, 
0conf_act1  - Conf. activity 1, and 0conf_act2    Conf. activity 2 these are all data type as quantity. In report Data is coming 5.040,
04.3234 like this so i have to reduce this decimal points, so could me give me answer for this scenario. And is there any routine needed for this.
Thanks & Regards,
Rajesh

HI,
First convert that value type to character, and then using WRITE TO statement you can move value to another one.
if you need not to do any manipulations further
because  character types can not be manipulated.
or
declare another  temporary valiable and then substract to 2 decimals, my suggestion is remove value from 2 dig from last.

Similar Messages

  • Can't figure out how to solve the decimal point bug in this calculator code

    Hi guys, I'm new in flash and is currently learning how to build a simple calculator with multipliers (plus,minus,multiple,divide,decimal point and change sign) but I'm stuck on the decimal point and change sign.
    var multiplier_old:Number = 10;
    var multiplier_new:Number = 1;
    // .: Sets the multipliers so that new input numbers become decimals of a lower unit column
    action_point.addEventListener(MouseEvent.MOUSE_DOWN, function():void {
              multiplier_old = 1;
              multiplier_new = 0.1;
              point = true;
    // Takes intput from the input_ buttons and adds it to the input after applying the multipliers.
    // If `point` is true then the multiplier_new is divided by 10, also as described.
    function inputNumber(n:Number):void {
              input = input * multiplier_old + n * multiplier_new;
                        if (point) {
                                        multiplier_new *= 0.1;
                       trace(multiplier_new);
              output_txt.text = input.toString();
    Decimal point
    The problem is that when I input 2.7 in the calculator, it will display the values in output_txt correctly. But then when I input 2.78, it will display 2.780000000000000000000000002. This will also happen to other numbers if the input is too big.
    What I want is just 2.78. How do I change the codings to make 2.780000000000000000000000002 become 2.78?
    Change sign
    Any tips on how to start on this one?
    Thanks for your time,
    Zainu

    I think you misunderstand what I mean. The weird decimal doesnt comes out after I press the 'equals' sign. It comes out when im just pressing on the caculator number buttons
    First I click the no.2 button and then the decimal point button.
    So the caculation output display will show
    2.
    after that I press the no.7 button
    2.7
    and then no.8 button. It appears like
    2.7800000000000000002
    This is the code I use when the user press the decimal point button.
    // .: Sets the multipliers so that new input numbers become decimals of a lower unit column
    action_point.addEventListener(MouseEvent.MOUSE_DOWN, function():void {
              multiplier_old = 1;
              multiplier_new = 0.1;
              point = true;
    // Takes intput from the input_ buttons and adds it to the input after applying the multipliers in the method described above.
    // If `point` is true then the multiplier_new is divided by 10, also as described.
    function inputNumber(n:Number):void {
              input = input * multiplier_old + n * multiplier_new;
                        if (point) {
                                 trace(multiplier_new.toFixed(3));
                                  multiplier_new *= 0.1;
                                  //trace(multiplier_new);
              output_txt.text = input.toString();
    I think there is some code wrong in this function that makes this weird problem. I tried putting toFixed method but it's still not working.
    Sorry for this long reply but I have to try my bestto explain with my bad english.

  • PDF export to Excel the decimal point is not displayed in the amount

    When I export a pricelist from pdf to excel then the decimal point is not displayed in the amount. It does'n matter in which language I try
    Anyone kow why?
    So the tool doesn't work for me.

    I have no problem. What is your country setting for the decimal separator?
    Attachments:
    read from csv.png ‏18 KB

  • [SOLVED] bc and the decimal point

    Hello,
    I've been trying out bc today and I've come across something:
    If, for example, I try and calculate 1/10 in bc (whilst setting scale to, say, 5), I'll get .10000. Is there some way to always display the number to the left of the decimal point, even if it's a zero (i.e. 0.10000)? 5/2 will get 2.50000, which makes sense.
    Thanks for your help.
    Last edited by Manifold (2011-12-30 14:40:30)

    karol wrote:http://stackoverflow.com/questions/2965 … ber-format
    I did something quite similar, but using a bash script to concatene a '0' in front of the decimal place. I just thought there was a simple variable to set that I'd missed but I guess not. I wonder what the design purpose of missing out the 0 on the left hand side of a decimal place is.

  • How to remove the decimal points at the end of the value????

    hi,
    we are using crystal reports 9.0. we have some reports which contains group by field.  we have one field like address. if we select group by as address "The data is displayed grouped by the Address. But the address is shown in decimal points". for example if we have 55 as address field value, it shows 55.00. 
    the formula has written like as follows
    if lowercase({?GroupBy}) = 'Address' then totext({rsp_GetDevMicro.Address})
    now, i want to remove zeros which comes along with address field values.
    can anyone help me in this?

    Not sure about Crystal 9 but on 11 I would convert it to a number to remove the leading zeroes then back to text again which allows you to remove the decimal point and any thousand seperators, ie:
    CStr(ToNumber(),0,"")

  • In a pages table change the decimal point to a comma

    I live in Italy and love it. However, there are issues. One that you might be able to help me with is changing the usual decimal point in a table to a comma. In Italy they use a comma for separating change from dollars instead of the usual decimal point.

    Scott Fox wrote:
    I live in Italy and love it. However, there are issues. One that you might be able to help me with is changing the usual decimal point in a table to a comma. In Italy they use a comma for separating change from dollars instead of the usual decimal point.
    I apologize but _*in many countries*_ the usual decimal separator is not the decimal point, it's the comma.
    It's time to understand that American habits aren't the universal rules or ways of life !
    I'm not saying that American habits are bad, just that they are local ones, not better than others.
    Yvan KOENIG (VALLAURIS, France) mercredi 30 septembre 2009 16:01:23

  • How to delete trailing zeros after the decimal point in the ALV sum

    Hello Expert,
    In my alv output, I need to sum up one column, but in the sum result, I don't want to display zeros after the decimal point.
    for example,
    If the sum is 134.00, I only want to display 134 on the alv.
    Does any expert have idea about it?
    Thanks in advance,
    best regards, Johnny

    Hi ,
    Use following
    SHIFT variable RIGHT/LEFT DELETING TRAILING '0'.
    For more variations ,
    just write SHIFT and press f4 , it will show you the information you need.
    Hope this is helpful,
    Regards,
    Uma Dave

  • Problems with the Scanner class and the decimal point

    I'm creating a GUI so to get the user input (double value) I use a jText field and the Scanner to read that value:
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
            String time = jTextTime.getText();
           double t = new Scanner(time).nextDouble();
            String cy = Double.toString(t);
            jTextCycles.setText(cy);
        }                                  The problem is that the decimal point it's a comma so if I write:
    1.2
    t = (Error InputMismatchException)
    1.236
    t = 1236.0
    1,2
    t = 1.2
    So I try using the parse method to get the double value:
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
            String time = jTextTime.getText();
           double t = Double.parseDouble(time);
            String cy = Double.toString(t);
            jTextCycles.setText(cy);
        }                            In this case the method parseDouble() takes the dot as the decimal point so if i write:
    1.2
    t = 1.2
    1.236
    t = 1.236
    1,2
    t = (Error InputMismatchException)
    � What can I do to Scanner class to accept the dot as the decimal point?
    I think that the problem is becouse in some countries (I'm from Colombia) the decimal point is a comma and in others is the dot.
    Thanks

    From the Javadocs for Scanner:
    Localized numbers
    An instance of this class is capable of scanning numbers in the standard formats as well as in the formats of the scanner's locale. A scanner's initial locale is the value returned by the Locale.getDefault() method; it may be changed via the useLocale(java.util.Locale) method.
    If you change your locale to one of those that does use a comma for a decimal point, it should work.

  • How to cut the zeros after the decimal point ?

    Hello everybody,
    does anyone know a solution how to cut the zeros after the decimal point at at CHAR data field?
    For example the field
    &RM06P-PRMG1&
    This is a char field in the database, so that the command
    &RM06P-PRMG1(.0C)&
    doesn't work.
    At the moment the output on the form is like that
    124,000
    It shoud be like that
    124
    It would be great if anyone could help me!
    TIA!
    Strobbel

    Hi Strobbel,
    If you are working on standard sapscript, first make a zcopy of it, do the modifications in that and assign the new form to the output types in tcode NACE.
    First you need to create a program to write the logic, so go to tcode SE38 , create a new program (say zremove_zero) with Program type Executable.
    Now you will see ABAP Editor with statement;
    Report zremove_zero.
    Add the following lines below the report statement.
    *&      Form  remove_zero
    *       text
    *      <--lv_AMT  text
    FORM remove_zero  CHANGING lv_amt.
      DATA p_amt TYPE p.
      MOVE lv_amt TO p_amt.
      MOVE p_amt TO lv_amt.
    Condense lv_amt.
    ENDFORM.
    Now save and activate the program.
    Now open the zcopy of your script and Just above the statement  &RM06P-PRMG1& write the following lines;
    /: perform remove_zero in program zremove_zero
    /: changing &RM06P-PRMG1&
    /: endperform.
    Now you can see your amount printing without decimals.
    Try and let me know, hope i have guided you clearly.
    Regards
    Karthik D
    P.S.: I advice you to take help from an ABAPER.

  • Format a number with a decimal to show the value but not the decimal point

    I have a value of 129.50 in the DB. I'm using the htp.prn() function to export this value to a txt file. I have the field padded with leading 0s (so it looks like 0000129.50)
    I need to keep the value for the .50 but don't want the decimal point to show up (so I need it to look like 000012950) but can't figure out how to make it keep the value for the .50 but not actually show the decimal point - any ideas? (APEX 4.0 11g)

    Multiply by 100 and remove the formatting. htp.prn (to_char (number_item, '99999999999'));
    Edited by: Kleber M on Sep 14, 2011 5:10 AM

  • Removing zeros after the decimal point       Reply with quote

    I want to remove the zeros after the decimal point, that this be done?
    Например, Example,
    120.000 => 120 120.000 => 120
    120.300 => 120.3 120,300 => 120.3

    hiiiiiiii sweetsoni,
    try this may it helpful for you
    SHIFT string RIGHT DELETING TRAILING '0'.
    SHIFT string RIGHT DELETING TRAILING '.'.
    for example
    DATA: v1 (6) TYPE c VALUE '100 .000 ',
    v2(6)  TYPE c VALUE '100.200'.
    SHIFT v1 RIGHT DELETING TRAILING '0'.
    SHIFT v1 RIGHT DELETING TRAILING '.'.
    SHIFT v2 RIGHT DELETING TRAILING '0'.
    SHIFT v2 RIGHT DELETING TRAILING '.'.
    ultimately
    v1 = '100',
    v2 = '100.2'.
    Moderator message: question and answer copied from external source, points deducted, do not repeat!
    Edited by: Thomas Zloch on May 19, 2010 2:14 PM

  • Make one number after the decimal point

    hi all
    i have a column named quantity from the table job_done
    with values
    1900.8988
    34.67
    0.6788
    236.67
    789999.67676868
    i require the values to be 1900.8
    34.6
    0.6
    236.6
    789999.6
    i just require one number after the decimal point,i know substr but i am confused as to how to achieve this output
    kindly guide
    thanking in advance

    http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions221.htm#SQLRF06150
    Regards
    Etbin
    Edited by: Etbin on 5.5.2013 14:33
    <tt>substr(quantity,1,instr(quantity,'.') + 1)</tt> if those are not numbers but all contain a decimal point
    Edited by: Etbin on 5.5.2013 14:40
    <tt>case instr(quantity,'.') when 0 then quantity else substr(quantity,1,instr(quantity,'.') + 1) end</tt> when there are no <tt>null</tt> values
    <tt>trunc(to_number(quantity),1)</tt> seems to be the safest if quantities are really <tt>to_char(some_number)</tt>

  • Limit the number of digits after the decimal point

    hi,
    in webform how to limit the number of digits after the decimal point?
    thanks

    Hi,
    In the Web form Design menu there is a tab for Other Options wherein you would find the setting for number of Decimal places.
    Thanks.
    Madhavi

  • OBIEE 11.1.1.6 - Requirement is to show 3 digits after the decimal point.

    Hi,
    I have a requirement to concat 2 columns ( 1st column is a text column and 2nd column is a numeric column set as double in RPD). For the 2nd column, user wants to see 3 decimal digits all the time.
    For example, if the value is 2.4567 then I need to show round off value 2.457 and if the value if 3.4 , then I need to show 3.400 and if the value is 4 then I need add decimal point and show 4.000.
    Please let me know how I can achieve using OBIEE application without having to go through RPD.
    Thanks
    Swarna
    Edited by: 934460 on May 15, 2012 12:48 PM

    Try the following:
    In this example:
    Column 1: Month Name
    Column 2: Revenue
    Column 3: Month - Revenue
    Formula for Month - Revenue column will be:
    Month Name ||' - '|| cast(round(Revenue, 3) as char)Hope it helps.
    Regards,
    Kalyan Chukkapalli
    http://123obi.com

  • Function module to get the decimal point and leading zeros.

    Hi
    I have a requirement, where I need to add zeros at the end and beginning of the field along with decimal point.
    For Eg:
    input = 123
    output = 0123.00
    depends upon the requiremnt,number of decimals will vary
    If anyone knows function module for this  requiremnt  or how to proceed with this, Please give me reply
    Thanks&Regards
    Rama.Mekala

    hi
    use this Fm
    'conversion_exit_alpha_input'
    PP_CATT_CONVERT_DECIMAL_POINT
    for decimal points
    Cheers
    Snehi
    Edited by: snehi chouhan on Jun 23, 2008 9:28 AM

Maybe you are looking for