Value upto n dacimal places

Hi Gurus,
Plz consider follwoing.
There are two field
1. plmk-toleranzob  it has some floating value.
2. plmk-stellen.   it has ineger value.
I have to pick value from field <b>plmk-toleranzob</b>  upto decimal places equal to value of  <b>plmk-stellen</b>.
How can we do it.
points will be rewarded.
regards
Rajesh

DATA: X TYPE P DECIMALS 2 VALUE '12493.97'.
WRITE: /X ROUND -2,   "output: 1,249,397.00
       /X ROUND  0,   "output:    12,493.97
       /X ROUND  2,   "output:       124.94
       /X ROUND  5,   "output:         0.12

Similar Messages

  • How to restrict decimal values upto two decimal places?

    Hi all,
    I want to restrict decimal figures upto two places. How to do that? Help will be appreciated.
    atanu
    [email protected]

    You can use NumberFormat class.
    There are lot of threads available in this forum. Just search for the keyword 'NumberFormat'.

  • Condition value upto four decimal places

    hi experts
    client has some group of material these material made by difffrent material compounds,
    these materials are purchasing under the condition of IEEMA organisation
    every month material compound  rates are chaning ,accoring to main material rate also chage
    for achiving this we worte a routine ,in the routine we used the condition type
    on condition type value is 0.1432 but in sap allows only two decimal point how can achive four decimal points for that condition type
    regards
    vijay

    You are speaking about purchasing as I understand.
    In this case you can define this in the PO itself (for the line item; there's also a condition tab in PO at item level...) - Amount / Currency / Per / Unit - 1432 / RS / 10 000 / PC. You can do the same in contract, info record, etc.
    Edited by: Csaba Szommer on Jun 22, 2010 8:55 AM

  • Rounding Rule upto 3 Decimal Places in Tax Condition(SABRIX)

    Hi,
    We are Using SABRIX for Tax determination and need to round up Condition Type XR1- XR6 to round upto 3 Decimal Places.
    Do we need to To Change ALT Calc Type- 301306or Alt Cond Base Value -- 16  or have to change Currency  decimal Places in transaction OY04/OY03.
    Kindly Suggest.
    Thanks
    Amit

    Hi,
    Tax % for customer is decided in SABRIX, Where does TaX calculated?? In SABRIX or in SAP.
    Thanks
    Amit
    Edited by: AMIT GUPTA on Mar 31, 2010 10:54 AM

  • Problems of setting values% with 2 decimal places in any graphics. What sho

    Guys, I have the xcelsius 2008 and can not make it work chart with values % and 2 decimal places. Already set up everything that I know the spreadsheet and graphics.
    Someone knows what can I do?
    Thanks Anderson - Sao Paulo - Brazil.

    Hi Anderson,
    To get values in % and upto two decimal, follow the below steps:
    Go to Chart properties-> Appearences Tab-> Text tab.
    Select the "Vertical Axis Labels" and go to the Number format present below in the window.
    Change the format to "Percentage" and set decimal places to "2".
    This should work.
    Please revert incase you have any queries.
    Thanks,
    Amit Mathur.

  • How can I limit a double value to two decimal place?

    How can I limit a double value to two decimal place?
    Java keeps on adding zero's to a simple double subtraction:
    1497 - 179.64 = 1317.3600000000001The answer must have been simply: 1317.36

    If the trouble is with output ...
    If the trouble is with value accuracy ...The trouble is with OPs understanding of and/or expectations of IEEE 754 floating point numbers. o_O
    [And it's probably a view (output) issue.]
    how can i actually use numberformat to cut those
    unwanted decimal places?Read the API - Puce already provided the link.

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

  • How to correct a double value to two decimal places

    hi,
    How to correct a double value to two decimal places
    eg.
    double tt=100.100032
    i want to correct to 2 decimal places
    ie tt=100.10
    regards,
    jagan

    Check my other reply on the other thread. Please don't cross-post.

  • Rounding a number upto two decimal places.

    Hey !
    My question is regarding the rounding of a number in such a way that answer that we get after the rouning comes upto two decimal places,no matter how small or the large the number before rounding was.
    Somebody please help me.
    thanks

    hi,
    use BigDecimal class in java.math package.
    here is some code how to do it ..
    BigDecimal bd = new BigDecimal(your number here);
    bd.setScale(2,BigDecimal.ROUND_DOWN)
    System.out.println(bd);
    hope this helps ...
    bye
    ashok

  • Storeing values in floate data type upto two decimal places

    Hi
    I want a float type field in my table but want to store value up to two decimal places.
    so what syntax i need to follow plz suggest.
    thanks

    it is not possible to store with Number datatype. if you are using the data to sho report, then change its format (like 45 to 45.00). if you want to store 45.00 in database, then you have to modify the datatype for that column. for this follow the following path
    1. Add a column of datatype Varchar2.
    2. Copy all the value of your number field to it.
    3. Drop the old column.
    4. However make sure that if you have used that column somewhare in arithmetic calculation, the modify it and use to_number function to do arithmetic opration.

  • Price upto four decimal places

    Hi ,
    I am using Basic planning objects for estimation of project.
    I havea item whose price is to be calculated on percentage basis.For Example Price o item X is 0.25% of Value Y.But when I am putting rate of that item as 0.0025 ( INR )system doesnt excepts this is also same for quantity.Since the decimals are restricted upto 2 for Price & upto 3 for Quantity.
    How this can be solved ?
    Rgds

    Hi Shrikant
    I made the settings & tried to put in the Quantity field of ECP but following error is shown by system.
    Too many decimal places (maximum 3)
    Message no. DB739
    Diagnosis
    You specified 4 decimal places, but the field allows only 3 decimal places.
    System Response
    Unable to continue processing.
    Procedure
    Correct your input.
    Rgds

  • Quantity column display upto 2 decimal places in ALV

    I've created an ALV for dynamic columns. For this i've first created the fieldcatalog and then the internal table.
    The problem that i'm facing in this is that the user wants the quantity column to be displayed upto 2 decimals. For this i tried the following:
    1.)     wa_fldcat-decimals_o = '2'
             wa_fldcat-decimals    = '3'.
             wa_fldcat-datatype     = 'QUAN'.
    with this i tried that let the calculation be to 3 decimal places but on output it should show 2 decimal places.
    But this doesnot gets reflected on ALV. It still shows 3 decimal places.
    eg:  3 decimal places: 16.667 + 16.667 + 66.667 = 100.001
    2.)     wa_fldcat-decimals_o = '2'
             wa_fldcat-decimals    = '2'.
             wa_fldcat-datatype     = 'CURR'.
    I also tried doing the calculation with 2 decimal places with datatype CURR but with this the last digit gets rounded.
    eg:  2 decimal places:  16.67  + 16.67   + 66.67   = 100.01
    Now we are taking total as 100 %. So tha calculative total cannot be more than 100.
    On seeing 100.001 user says show it to me to 2 decimal places  i.e. 100.00
    On seeing 100.01 user says  how can the total be more than 100 & this is .01 more than 100.
    Therefore how can the 1.) option be achieved.
    PLZ HELP!

    Hi,
    Can u check this one
    DATA: gv_packed TYPE p DECIMALS 2.
    CATCH SYSTEM-EXCEPTIONS conversion_errors = 6.
    MOVE char_field TO gv_packed.
    ENDCATCH.
    IF sy-subrc = 6.
    error handling
    ENDIF
    Try to move ur char field to a type p field. If char field is other than numeric then u will get error that can be handled in try...chatch..endtry block.
    data: l_val type p decimals 2.
    parameter my_val type char20.
    try .
    l_val = my_val.
    catch cx_root.
    Do ur error handling here
    endtry.
    you can work with search and concatenate.
    value1 = 3601152
    search value1 for '.' .
    if sy-subrc eq 0.
    concatenate value1(5) '.' value1(2)+5 into text.
    Or value1 = value1 / 100.
    endif.
    Thanks.
    Ashok.

  • Reduce the field value from three decimal places to two decimal places

    hi experts,
    plz help me with this
    actually i have to display the  value of the field MENGE in the list with two decimal places.
    but when i go and see the field menge in the table mseg it is having three decimal places.
    so could u plz suggest me how to solve this.
    regards
    siri

    Please try using the DEIMALS extension of the WRITE statement.
    data: menge type menge_D value '1234'.
    write:/ menge decimals 2.
    Regards,
    RIch HEilman

  • Help!printing float values with two decimal places

    hi there java pips! im a newbie to this technology so forgive me for this really stupid question....i would like to perform mathematical operations on two float values....the problem is i want to print them in a standard format and that is i want them to be displayed with two decimal places (e.g 190.00, 12,72, 1,000.01) how can i do this?

    Try java.text.DecimalFormat
    NumberFormat nf = new DecimalFormat("0.00");
    System.out.println(nf.format(x));

  • Target Value check not taking place

    Hey Gurus,
    In the MIC i have maintained the target value as 8. Now i have created an inspection plan and assigned this MIC to it. The inspection lot is getting generated at the time of GR, I am going to QA32 and recording the result for the lot generated. But when i am giving a value of 6 for that particular MIC, it is accepting it and no rejection is taking place. Can anyone tell me why this is happening and is there any config missing?
    Regards,
    Abhishek

    Hi
    For the Rejection/Acceptance system will check the Specifications limits of the MIC not the target value. So maintain the Lower and Upper Specs for the MIC in QS23 and Chk in QA32. The values out of the Lower or Upper Specs will be the Rejections.
    Regards
    Brahmaji

Maybe you are looking for