Round up decimal value

Hi Guru,
Good day.
I have 5 output as bellow:
  .15       2.2     1 .4       14.8    .43
I need to show them like bellow:
   1        3        2          15         1
how can i get the desired output.
please help me.
With thanks
Moshiur
Moderator Message: Very basic question. Could be answered with a simple search and/or a few lines of code.
Edited by: kishan P on Sep 18, 2010 4:05 PM

Hi  moshiur sohel,
Use FM 'ROUND' to round any value. Your scenario is of Positive rounding, for that give SIGN parameter as '+'.The following is the example code.
PARAMETER P_VAL TYPE P DECIMALS 2.
CALL FUNCTION 'ROUND'
  EXPORTING
*   DECIMALS            = 0
    INPUT               = P_VAL
   SIGN                = '+'
IMPORTING
   OUTPUT              = P_VAL
EXCEPTIONS
   INPUT_INVALID       = 1
   OVERFLOW            = 2
   TYPE_INVALID        = 3
   OTHERS              = 4
Close the thread if you have solved your query.
Thanks & Regards,
Rock.

Similar Messages

  • Excel import rounding up decimal values

    In my excel file I have a column that contains dollars and cents (e.g. 49.95). When I run the import the values in this column are rounded up to the next integer (e.g. 49.95 is rounded up to 50). Is this a bug or am I doing something wrong?
    Thanks,
    Peter

    Hi All,
    I have already migrated lakhs of records and I am facing the same problem for decimal value migration. Shall I know whether anyone has fixed this problem? Is there any other free tool for SQL Server to ORACLE migration? Please do guide me as soon as possible.
    Thanks,
    Srinivasan.T

  • Rounding a decimal value to 3 digits

    I have opened a UDF and copied the value of Total (LC) column in that field. I want to round off the copied value to 2 digits.
    Below is the query written to copy the value.
    SELECT ($[$38.21.NUMBER] * $[$38.U_GST.1.11]) / 100
    Below is the query written to ROUND the value.
    SELECT ROUND(($[$38.21.NUMBER] * $[$38.U_GST.1.11]) / 100, 2)
    Thanks & Regards,

    Try: SELECT ROUND(($[$38.21.NUMBER\] * $[$38.U_GST.NUMBER\]) / 100, 3)
    However, I think it is probably not working because B1 has internal checking to make sure the decimal value follow your setting. If you setup your currency by 2 decimals, you may never get any additional decimal place.
    Thanks,
    Gordon

  • Rounding of decimal values into XML using DOM

    I want to roundoff 10.456 to 10.4(while generating the xml) using DOM.
    Please let me know how to handle this?
    Thanks in advance

    read the java.lang.Math API
    there are rounding functions there
    and next time please just use a search engine

  • Round Decimal value based on last digit

    Hi Experts,
    I'm trying to round the decimal value based on its last digit. If the last digit is >5 then add +1 to the digit before that and remove the last digit else just remove.
    ie.
    -59664.15000000005 should become -59664.15
    -21308625.00000002 should become -21308625
    -85234500.00000006 should become -85234500.0000001
    18288102.85714287 should become 18288102.8571429I tried with Round Function but it did not help,
    Pls assist.
    Thanks!

    Got it done just took the length and did the change.. sorry for this lame question.. should have tried before posting the question. Tx for your time...

  • 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).

  • ALV: issue in truncating decimal values (rounding up)

    Hi,
    I have been receiving a problem truncating decimal values in alv environment using this abap code.
    WRITE gwa_komv-kwert TO gv_out_tax CURRENCY rte0143sf-currency
            DECIMALS l_decimals LEFT-JUSTIFIED.
    where l_decimals = 0.
    More exactly the value is rounded up but this is not my expectation.
    Any idea?
    Thanks.
        Giovanni

    Standard behaviour with DECIMALS 0: rounding up or own.
    And when you use the addition DECIMALS, then the CURRENCY addition is ignored as well.

  • Any function module to round of a value to two decimal places?

    Hi gurus,
    Any function module to round of a value to two decimal places?

    Hi,
    you can use FM 'ROUND'.
    Thanks.

  • Round a double value to a specific number of decimal places?

    Hello,
    Is there standard java function which will round a double value to a specified number of decimal places? Something like:
    double d = 4.34523;
    d = round(d, 2);
    where d is finally assigned the value of 4.34?
    Thanks!
    -exits

    No, because doubles hold values in binary (as do all values in a computer, of course, but there's no additional stuff to indicate decimal values).
    If you want values with specific rounding rules in decimal, use java.math.BigDecimal.
    If you just want to format the number with a specified number of decimal digits, use java.text.DecimalNumber.

  • BPEL round function with precision for a decimal value?

    Dear All,
    I need to do a rounding of a higher value to 3 precisioned one.
    As per the round function available in Jdeveloper, I can only round a decimal to its respective integer value.
    But my requirement is to retain the decimal value, but with a limited precision value...
    How can I accomplish this.. Is there any extension of round function in BPEL to do this...?
    Please update..
    Many thanks...

    Use the function format-number(variable,precision_num)+.
    Thanks,
    Sen

  • How to make the Decimal values into Round off value

    Hi Experts,
    I have an internal table with 3 columns, the 3rd column having decimal values, Now i want to convert the values in to whole number, Ex: 15.67 will be 15.7
    Anyone plz help this.
    Mohana

    hii
    use following code
    DATA:
      wa_val type p decimals 2,
      L_ANDEC     like T006-ANDEC value 1,
      wa_val2 type p decimals 1.
      wa_val = '15.67' .
      CALL FUNCTION 'ROUND'
        EXPORTING
         DECIMALS            = L_ANDEC
          input              = wa_val
          SIGN                = '+'
       IMPORTING
         OUTPUT              = wa_val2
       EXCEPTIONS
         INPUT_INVALID       = 1
         OVERFLOW            = 2
         TYPE_INVALID        = 3
         OTHERS              = 4
    WRITE:/ wa_val2.
    regards
    twinkal

  • Issue in Decimal value round off

    Hi All, I am facing an issue wherein Decimal value of 0.01 is getting converted to 0.00. Let me brief you about Source-target Types -  Source - Flat FileTarget - DB2Powercenter Version - 9.6.1 HF2 Issue -  Field in Source File is defined as Number(5,2).Corrosponding field from Db2 Target Table is defined as Decimal(5,2). Mapping is simple straight forward mapping with 1:1 loading from Source to target. Now, my Source File contain data as below -  0.010.020.0312.01 When I execute mapping, DB2 target Table gets loaded with all records.Value from corrosponding DB2 Target Table is -  0.000.020.0312.01 As you can see value of 0.01 is getting converted to 0.00 whereas all other values are working fine as expected. As a quick fix, I have applied to_decimal(source_field,2) before loading it to target. Could anyone please explain if this is an issue with Powercenter or there's some other issue. If I think it's a rounding issue then how come value of 0.02 is working fine? Please advise.

    Hi All,  I have one scenario to read the source file . The file delimiter is '|' . The no of pipeline for each line is 17. So if a line containing more than 17 , send an error email. For this first i am printing tota pipeline in ecah line to afile called pipelinecount.txt . Then i will read this file and send each value to while loop /for loop , where it will get > 17 , it will exit the process and send an email.  But here in script i am getting error at while line. Could anyone help.   #! /bin/kshset -x SOURCE_DIR=/vp01/SrcFilessed 's/[^|]//g' /vp01/SrcFiles/Test.txt | awk '{ print length }'> /vp01/SrcFiles/pipelinecount.txtcd $SOURCE_DIRwhile line in `cat pipelinecount.txt`; do if [ $line -eq 17 ];thenecho "No issue in pipeline"exit 0;fiif [ $line -gt 17 ];thenecho "No of pipelines exceeded the expected. Please verify the source file." | mailx -s "WKFS Load: Failed" [email protected]

  • Re: Issue in Decimal value round off in DB2

    Hi All, It is happening only only when the decimal separator of source is ',' and behaving normally when decimal separator is '.'. Some how ..we casted the incoming field to TO_DECIMAL(IN_FIELD,2) ..in that case it is working fine.  Regards,Srinivas

    Hi All, I am facing an issue wherein Decimal value of 0.01 is getting converted to 0.00. Let me brief you about Source-target Types -  Source - Flat FileTarget - DB2Powercenter Version - 9.6.1 HF2 Issue -  Field in Source File is defined as Number(5,2).Corrosponding field from Db2 Target Table is defined as Decimal(5,2). Mapping is simple straight forward mapping with 1:1 loading from Source to target. Now, my Source File contain data as below -  0.010.020.0312.01 When I execute mapping, DB2 target Table gets loaded with all records.Value from corrosponding DB2 Target Table is -  0.000.020.0312.01 As you can see value of 0.01 is getting converted to 0.00 whereas all other values are working fine as expected. As a quick fix, I have applied to_decimal(source_field,2) before loading it to target. Could anyone please explain if this is an issue with Powercenter or there's some other issue. If I think it's a rounding issue then how come value of 0.02 is working fine? Please advise.

  • Pr00 decimal values needs instead off rounding the value

    In export sales Pr00  condition value is rounding off i need to be in decimal values
    i have checked in Condition type V/06 rounding fields it is not effecting  and also OB90 and OY04
    example rounding  off  26 USD, but at actual it should 25.58 exchange rate is 43 and qty is 100
    can any body suggests where the setting ar required

    Hi,
    Please check the Rounding rule property of the condition type 'PR00'. It must have been set to Round up rather than Commercial.
    Change the Rounding rule property to Commercial. I guess this will solve your purpose.

  • Rounding of a value to 2 decimal points.

    Hi all,
    I need to round off a value to 2 decimals.
    For example:
    A value 13.6789 should be rounded of to 13.67 and not 13.68

    Hi,
    Thats Truncation not rounding, for data types P and F we cannot have sub field access,
    so we cannot use offset, it leads to error results
    and if we use
    data : var type p decimals 2     they will be rounded hence  
    So, pass it to   a character variable
    and use write satement edition
    example
    data : var(7) type p decimals 4  value '13.6789 ' .
    write /  var.
    data : var1(8) type c.
    move var to var1.
    write /(5)  var1.
    regards
    prasanth

Maybe you are looking for

  • Help using oracle syntax "SUM(col1) over (order by col2)" using ODI

    Hi all I want to load data from oracle to ESSBASE using ODI, and I know oracle have such syntax sum(col1) over (order by col2,col3) which can get the accumulation data, e.g Oracle data table col1, col2, value A 2009-1 10 A 2009-2 10 A 2009-3 10 And t

  • My Macbook Pro 2010 is very slow, I know its old but can I speed it up?

    I have had my Macbook pro for nearly 4 years so I expect it to have slowed down, but now its getting ridiculous and difficult to use. Does anyone have any ideas on how to speed it up? I have removed all my larger files and the most memory is now take

  • Anchored Frame with auto shrink wrap

    Hi I have an issue that I need help with. I'm importing a range of graphics into my document and in my read/write rules I have all of the required properties to the images.  When the images are imported they are correctly displaying (size etc) but th

  • Blue G3 20" Studio Display

    I have a monitor that has never worked properly. Two weeks after buying the said product the picture went, it then took a further 6 months to get the monitor returned and fixed. Two weeks after it came back the picture went vertical on me, the width

  • How to handle empty boxes to fill a pallet layer in Packing Instructions

    Hi, I would like to know if it is possible to automatically add empty boxes in an outbound delivery of finished goods when the delivery is complete. e.g.  In the packing Instructions I have the following 1 Pallet 12 boxes of finished goods ( 4 boxes