Regarding  Ronding off the decimal value

Hi,
i have a decimal number as " 58240990.00 " , i wanted this to rounded value .
for example I am expecting to see 58241 for the above number.
shell we can do in any way.. if so please let me knw fast.. it is urgent..
thanks in advance.
thanks,
Suresh..

Hi Suresh,
Use <b>ROUND()</b> numerical function.
ROUND(a) – round decimal places up and down
ROUND(a,n) – round up and down to the nth place on the right of the decimal point
ROUND(a,-n) – round up and down to the nth place on the left of the decimal point
DATA V_F TYPE F VALUE '58240990.00'.
DATA V_ROUND TYPE I.
V_ROUDN = ROUND(V_F,'-4') 
Thanks,
Vinay

Similar Messages

  • Regarding round off the value in adf table

    HI All,
    My Requirement:
    i have to round off the value after decimal in adf column before saving to data base.
    Excample : 1234.67 = 1235
    34567.89=34568
    34567.34= 34567
    i am using jdeveloper 11.1.1.3.0
    Please can you give code using converter or any other strategy.
    Thanks & Regards,
    Madhu

    1. First of all you asked for rounding off, taking the integer part is not rounding off.
    2. As per the documentation
    integerOnly      boolean      Yes      Flag specifying whether only the integer part of the value will be formatted and parsed. Default value is false.if i can understand correctly pertains to formatting only.
    3. You can create a custom faces converter and add it to faces config.xml http://docs.oracle.com/javaee/1.4/tutorial/doc/JSFDevelop4.html . So that you do not have to write it in code.
    4. If only integer is to be allowed why don't you change the data type to long or int instead of number

  • 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

  • Problem in Routine after rounding off the condition value

    Dear all,
          I have attached the routine for rounding off value for condition value for T.Code va02. Routine is working fine but the problem is after the execution of routine it goes in some standard program LV61AA55 where again the rounded value gets changed . Maximum points will be allocated ..
    Thanks anr Regards

    FORM FRM_KONDI_WERT_925.
    *{   INSERT         D01K911062                                        2
    data : wa_xkomv like xkomv,
            v_kwert like xkomv-kwert,
           W_INDEX  TYPE SY-TABIX.
    read table xkomv into wa_xkomv with key kschl = 'JIN6'.
    W_INDEX = SY-TABIX.
    v_kwert = 1 * wa_xkomv-kwert / 100.
      V_KWERT = WA_XKOMV-KWERT.
    read table xkomv with key kschl = 'JHSC'.
    CALL FUNCTION 'J_1I6_ROUND_TO_NEAREST_AMT'
       EXPORTING
         I_AMOUNT                 = v_kwert
       I_AMOUNT1                =
       I_AMOUNT2                =
       I_AMOUNT3                =
       I_AMOUNT4                =
       I_AMOUNT5                =
       I_EXADDTAX1_AMOUNT       =
       I_EXADDTAX2_AMOUNT       =
       I_EXADDTAX3_AMOUNT       =
      IMPORTING
        E_AMOUNT                 = v_kwert
       E_AMOUNT1                =
       E_AMOUNT2                =
       E_AMOUNT3                =
       E_AMOUNT4                =
       E_AMOUNT5                =
       E_EXADDTAX1_AMOUNT       =
       E_EXADDTAX2_AMOUNT       =
       E_EXADDTAX3_AMOUNT       =
    xkomv-kwert = v_kwert.
    xkwert = v_kwert.
    modify xkomv INDEX W_INDEX transporting kwert.
    *}   INSERT
    ENDFORM.

  • Issue with printing the decimal value in smartforms

    Hi experts,
    Here I am printing the net valve in to smartforms.The problem is, valve i want to print is 4505.600.But it is displaying as 45056.00.It is in OMR currency. This problem occurs only for this currency.i am picking the value from PO.
    I have used komv-kwert feild for display. Please give me the solution
    Regards,
    madhu

    Hi Madhu,
    I have faced similar problem in my Smartform with currency JPY with no decimal places at all.
    To resolve this you have to specify Reference Currency with the Currency type  under Global Definitions-->Currency/Quant.Fields. For example take your case :
    Fieldname               Reference Field     Data Type
    WA_FINAL-KWERT              W_WAERS           C CURR
    *Here W_WAERS should contain OMR
    *WA_FINAL-KWERT sould contain 45056.00 then your output will look like 4505.600
    Thanks & Regards,
    Rock.

  • Put the decimal value.

    I have count the value of double type, and display it like this g.drawString(value,150,200);.
    that value is 0.2763590405878399238
    How to put the four decimal places of that value?

    It is possible that your question has been answered before and is not far away ...
    http://forum.java.sun.com/thread.jsp?forum=54&thread=362183&tstart=15&trange=15

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

  • Rounding off net weight value.

    Hi experts,
    I want to round off the quantity value to the next integer value.
    I am using the FM 'J_1I6_ROUND_TO_NEAREST_AMT' as follows...
    call function 'J_1I6_ROUND_TO_NEAREST_AMT'
    exporting
       i_amount = gross_weight
       i_amount1 = net_weight
    importing
       e_amount = gross_weight
       e_amount1 = net_weight.
    i want to round off the gross weight and net weight values.
    In Global definitions, these are given as of type VEKP-BRGEW. The field BRGEW is of datatype QUAN (length - 15 and decimal -3 )
    But when i tried executing i am getting dump .... saying
    "The function module interface allows you to specify only
    fields of a particular type under "I_AMOUNT".
    The field "GROSS_WEIGHT" specified here is a different field type"
    Please help me solve this and please let me know how to round off these fields.
    Regards
    Ammu

    Hi,
    the both fm parameters you fill have a currency data element of length 13, while you pass a quantity data element of length 15.
    You can't use this fm for your fields.
    Regards,
    Klaus

  • 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

  • How do I convert an alpha character from a text string to its decimal value

    I am trying to find out the actual decimal value of a character in a string. So far the code below is as far as I got. I am able to get what I guess is a byte value.
    This is for a school assignment:
    The idea behind what I am trying to do is to design a hash function to store dictionary words into a bucket array hash table, without using the existing Hashtable.class
    so far this is what I can come up with to get some kind of value for each character in the string, however, what I am trying to get is the decimal value for each character.
    public static void main(String args[]){
         String word = "abcdefghijklmnopqrstuvwxyz";
         for (int i=0 ; i < word.length(); i++){
         System.out.print((word.substring(i,i+1)));
         System.out.print("\t : "+((word.substring(i,i+1))).getBytes());
    Thankyou for any replies.

    I'm not sure I completly understand your goal- what you mean by "decimal value", but, if you simply want to find the byte value of each character in a String, you would probably be better off using getBytes() in a way like this,
    byte [] bytes = string.getBytes();
    Then, if you need to map that to a charcter, you could use a for loop like
    for (int x = 0; x < bytes.length; x++) {
    table.put((char)bytes[x], bytes[x]);
    which assummes this bucket class of yours allows primitive data types like so (in Hashtable or HashMap, you would have to use a wrapper Object). I guess, my point reduces to, don't use substring and string search methods (like indexOf()), unless you have to because they are more expensive then just maping the array of bytes and chars, which seems to be what you are interested in doing.

  • Error saving purchase order data decimal values in SAP R/3

    sir,
    PO was created with currency japanese YEN using Tcode ME21N . The net price was showing 142502300 (in JPY).
    when checked in EKPO table , it saved with a value 1425023.00  instead of  142502300 . 
    what can be done to correct this.      
    In PO Print out , it showing values as 1425023.00  which is wrong.
    SPRO>> NET WEAVER >> GENERAL SETTINGS >> CURRENCY>> SET DECIMAL values FOR CURRENCY CODES is showing 0 decimals against JPY (Japanese YEN)
    I want to know where else the Decimal values could have been set to 2 decimal places.
    FOr other currencies like US Dollars  there is no error.
    Regards,
    Srinivasa Murthy

    Hello Srinivasa
    Please check the forum Rules of Engagement - https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement.
    Cross posting is not permitted. This issue is already raised in the application area forum which is probably correct. This does not look like a PI technical issue.
    Regards
    Mark Smyth
    XI/PI Moderator

  • How to round the fractional values in Abap webdynpro?

    Hi Experts,
    I have designed a screen in which I have a field called ANZHL(which is numberic field of infotype14) It is a fractional digits which needs to be rounded when it comes to display in my webdynpro application?
    Here is my code .........
    How to round the ANZHL field ?
    **if start and end dates are changed then delete the old and insert the new else just mmodify the record
        if ws_0014_temp-begda ne ws_edit-begda or ws_0014_temp-endda ne ws_edit-endda.
          call function 'HR_INFOTYPE_OPERATION'
            exporting
              infty         = '0014'
              number        = wd_this->w_pernr
              subtype       = ws_0014_temp-subty
              objectid      = ws_0014_temp-objps
              lockindicator = ws_0014_temp-sprps
              validityend   = ws_0014_temp-endda
              validitybegin = ws_0014_temp-begda
              recordnumber  = ws_0014_temp-seqnr
              record        = ws_0014_temp
              operation     = 'DEL'
              nocommit      = 'X'
            importing
              return        = w_bapireturn.
          " key                    = w_bapireturn.
          if w_bapireturn-type ca 'EA'.
            r_bapireturn = w_bapireturn.
            return.
          endif.
          ws_0014 = ws_0014_temp.
          ws_0014-endda = ws_edit-endda.
          ws_0014-begda = ws_edit-begda.
          ws_0014-anzhl = ws_edit-anzhl.
                      call function 'HR_INFOTYPE_OPERATION'
            exporting
              infty         = '0014'
              number        = wd_this->w_pernr
              subtype       = ws_0014-subty
              objectid      = ws_0014-objps
              lockindicator = ws_0014-sprps
              validityend   = ws_0014-endda
              validitybegin = ws_0014-begda
              recordnumber  = ws_0014-seqnr
              record        = ws_0014
              operation     = 'INSS'
              nocommit      = 'X'
            importing
              return        = w_bapireturn.
          " key                    = w_bapireturn.
          if w_bapireturn-type ca 'EA'.
            r_bapireturn = w_bapireturn.
            return.
          endif.
        else.
          ws_0014 = ws_0014_temp.
          ws_0014-anzhl = ws_edit-anzhl.
    Edited by: Dharani us on Oct 8, 2009 10:15 AM

    Hi,
    For that attribute, you want to display the decimal values or what.
    Regards,
    Lekha.

  • Error saving purchase order data decimal values

    sir,
    PO was created with currency japanese YEN using Tcode ME21N . The net price was showing 142502300 (in JPY).
    when checked in EKPO table , it saved with a value 1425023.00  instead of  142502300 . 
    what can be done to correct this.      
    In PO Print out , it showing values as 1425023.00  which is wrong.
    SPRO>> NET WEAVER >> GENERAL SETTINGS >> CURRENCY>> SET DECIMAL values FOR CURRENCY CODES is showing 0 decimals against JPY (Japanese YEN)
    I want to know where else the Decimal values could have been set to 2 decimal places.
    FOr other currencies like US Dollars  there is no error.
    Regards,
    Srinivasa Murthy

    Hi Srinivasa,
    Use T. code OY01 and you can try 3rd option of decimal format that is 1234567, 89 for the same.
    Regards,
    Shailesh Verma

  • SHOW DECIMAL VALUES IN QUERY

    Hi,
    I would like to show the decimal values of a calculated keyfigure when i execute the query.
    Heres whats happening:
    Base Price * Qty = XXXXX
    11*2.6=28.6
    bur when i execute the query it shows 29 as the answer, its rounding it off. How can i fix this?
    Thanks

    Use report SAP_RSADMIN_MAINTAIN and set object 'IGNORE_T006_ANDEC' to the value 'X'
    Decimals will show up right away!
    More details why this is happening in Note 866505
    cheers,
    Mantas
    Edited by: Mantas Vaisvilas on Sep 2, 2008 12:24 PM

  • Writing decimal value to application file

    hi All,
    I am having an internal table with fields itab-A, itab-b and itab-C.
    i want to write the record to itab in such a way that
    itab-ASPACEitab-bitab-c.
    Now i tried to concatenate the record in one string and write it out but the problem is itab-b is decimal value so it cant be concatenated. and also i m not getting value if i write
    concatenate itab-A SPACE into val.
    Can you suggest me something?
    thanks and regards,
    Reena

    Hi Reena,
    Convert decimal value to character and write to application server.
    The sample code here.
    data:
            lv_ format           TYPE hslxx9,
            lv_char_hsl         TYPE char23,
          CALL FUNCTION 'CEVA_CONVERT_FLOAT_TO_CHAR'
            EXPORTING
              float_imp  = wa_finbal-hsl
              format_imp = lv_format
            IMPORTING
              char_exp   = lv_char_hsl.
    Regards
    Bhupal reddy

Maybe you are looking for