Changing number of decimal places for Unit of Measure

Hi All,
I have a requirement to convert a quantity in one unit of measure to another (custom) unit of measure.
The issue is that the custom unit of measure has 4 decimal places (customer requirement). I found function module MD_CONVERT_MATERIAL_UNIT which does the trick for regular, 3 decimal places, UoM's. It won't output 4 decimal places since the output data type is EKPO-MENGE, which has 3 decimal places.
Does anyone have experience with trying to convert material's UoMs into 4 or more decimal places?
Thanks!

<b>round_f_to_15_decs</b>  round variable of type f to 15 decimals
Sometimes type F (float) is used to represent exact data (Amounts, Quantities):
if values are to big to be represented as Packed (> 31 decimals)
to significally improve performance of calculations, e.g. in statistical reports
G_DECIMAL_PLACES_GET
REPORT Z_ROUNDING .
DATA: float TYPE f,
      amount TYPE p DECIMALS 2,
      correctamount TYPE p DECIMALS 2,
      chars(5) TYPE c value '1.005'.
CLASS cl_abap_math DEFINITION LOAD.
correctamount = chars.
WRITE: / 'Exactly:', chars,
       / 'Correct Amount:',  correctamount.
float = chars.
amount = float.
skip 2.
WRITE: / '==== Usual Processing:',
       / 'Float:', float,
       / 'Decimals 3:', float DECIMALS 3,
       / 'Decimals 2:', float DECIMALS 2,
       / 'Amount:',  amount.
float = cl_abap_math=>round_f_to_15_decs( float ).
amount = float.
skip 2.
WRITE: / '==== Correct Processing:',
       / 'Float:', float,
       / 'Decimals 3:', float DECIMALS 3,
       / 'Decimals 2:', float DECIMALS 2,
       / 'Amount:',  amount.

Similar Messages

  • Decimal places for unit of measure

    Dear All ,
    If i change the Decimal Places for rounding in Customizing for Unit of measure ( CUNI tcode) for KG as 6 from 3 whether it will calculate with the 6 decimal places like 0.004756 ( earlier with 3 decimal places it will calculate any multiplication with 0.004 now i want the same with 0.004756 Kg )
    whether it will work ?
    and where it will impact

    Hi
    No it will not work like that. And it depend on the transaction where you enter that. In case of Purchase order quntity field it will be always with 2 decimal places because field MENGE has 2 decimal places only. If your system is already live then it is not advisible to do such changes.
    Regards
    Antony

  • 3 decimal places for unit of measure KG

    Hi,
    I would like to create a production order. In the field total quant I would like to give the 3 decimal places of mesure KG.
    Error: "Only 2 decimal places are permitted for unit of measure KG"
    Where can I customize the system, so that 3 decimal places have been permited.
    thanks
    Desy

    thanks
    I've seen the place in Customizing where I will maintain it.
    Now I only have display authorization for class SS
    I will speak with our Basis for more authorization.
    Thanks
    Desy

  • Routing - decimal places for unit of measure conversion quantity

    Hello all,
    in the change routing screen in SAP (CA02), when going to a operation detail screen, a unit of measure conversation value can be defined. A value for header and operation can be made.
    Currently we cannot set any decimal values for operations, I get the error message: "decimal places are not permitted."
    Where in customizing can I change that?
    Thanks
    Anne

    Hello,
    thanks for the answers.
    The UoM is LB.
    I've already checked CUNI, but I can not find LB..?
    Also I've noticed other places in SAP, for example the base quantity of some operations in the routing have a numbers with 3 decimal places and the same UoM LB, so this looks like the UoM is setup fine, maybe there are just problems with this special screen?
    Thanks
    Anne

  • How to allows decimal place for unit of measure of order confirmation

    Hi Guys
    we have some special cases here that need to confirm the order quantity as decimal place,is that possible made some customizing in code CO11N? or have some ways support it .....
    ex. work order A   10 EA
    - operation 1   : colse 10 EA
    - operation 2   : close 4.5 EA
    Regards/Eric

    Hi,
    You can set a UoM to allow decimals in transaction CUNI. But i fail to understand why you would want to set EA to have decimals.
    If a material is to be managed in decimals then evaluate the usage of a different UoM which allows for decimals.
    Regards,
    Vivek

  • Decimal places in unit of measure in Sales order

    Hi,
    In the Sales Order application in PCUI, when I create a create an order for customer XYZ, and add product ABC for qty 1 which uses unit of measure PC, the qty is displayed with 3 decimals as 1,000 whereas if I use the unit of measure EA the quantity is displayed without the 3 decimals as 1. I need the unit of measure PC to not have the decimal places like in SAPGUI.
    Could anyone help me understand how this can be achieved?
    Thank you for help in advance.
    Regards,
    Priya

    To elaborate better.
    Again, use Tcode CUNI - Unit of measurement : Initial Screen.
    At initial screen, choose TIME from the list (where by default AAAADL- no dimensions is there).
    And click on UNIT OF MEASUREMENT button.
    In that you will find MON - Month.
    There go for details by selecting MON or select MON and press F5 from Key board.
    For MON unit maintain following parameter as per your requirement:
    -Number of decimal places for number display
    Use - This parameter determines the number of decimal places with which this measurement unit is displayed.
    -Base ten exponent for floating-point display
    Use - This exponent determines how the values for this measurement unit are formatted as floating point numbers.
    Examples - If the exponent is 3, the floating point numbers have the format xxx.xxxxE3.
    And deselect commercial meas. unit in application parameters section.
    I would suggest instead of changing standard settings of MON, you create ZMON in TIME dimension.
    Thanks & Regards
    JP

  • Upto 4 decimal point for unit of measure

    hi,
    We have requirement to maintain upto 4 decimal point in PO and sales order quantity for unit of measure M3. Example PO quanity 0.3902 m3, sales order quantity 2.3212 m3,   SAP allow upto 3 decimal point, how to handle this 4 decimal point for unit of measure and any impact to do so ?
    best rgds,

    Dear Eric,
    To change decimal places of Materials follow this:
    IMG - SAP NetWeaver - General Settings - Check Units of Measurement
    select Units of Measurement & select required Unit of Measure & set decimal places.
    Hope this helps...
    Give points if useful...
    Thanks,
    Jignesh Mehta

  • DECIMAL PLACE UN UNIT OF MEASURE

    Dear Friends
    is ther any way to maintain decimal place during alternate  unit of measure.  FOr Ex 1  bar = 23.34 Kg. without rounding 100 bar = 2334 kg. i already maintained decimal in CUNI. still not able to maintain decimal.
    Thanks and Regards
    Madhavan

    Yes you should be able to maintain this. Ensure that you allow decimals for the UOM Kg in CUNI it should allow this conversion you are referring to. You should put decimal places for both display and conversion.
    Edited by: Hemalatha Raghavendran on Jul 20, 2009 4:33 PM

  • Decimal Points for Unit of Measurement

    Hi all
    For doing service entry in the QTY field can we put the value upto six decimal for any unit.
    in customisation for Unit of measurement can we configure this thing putting decimal places - six or is there any other setting is required
    Please help
    Thanks in advance
    Rajesh

    Hi,
    Yes in customisation for Unit of measurement you can customize it,
    but it will be valid whenver you use this UOM in the system.
    There is one thing also you can do
    The Quantity fields decimal points in service entry is by default 3 digits ,
    so to use 1,123456  quantity for lets say price 10 $
    you can multiply both sides with 1000
    i mean
    use 1123,456 for 10000 $
    just an idea
    Regards
    Hope it helps

  • Decimal Places in Unit of Measure

    Hi,
    I want to post a service entry sheet for an activity with 5 decimal values.Five decimal values is required  in order to arrive at exact value of service rendered.
    I tried changing the decimal values for the particular UOM in CUNI. Still iam not able to do service entry sheet.
    I require your solutions.
    Thanks,
    Karthik.

    Hi,
    Need to take help from ABAP consultant.
    Change the decimals from 3- 5 also need access key for same.
    Regards
    Gietesh

  • Difference between Decimal places for  Quatities and Units

    Can anyone please explain the difference between the followings -
    1. Number of Decimal places for  Quantities, and
    2. Number of Decimal places for Units
    In SAP B1 2007B General Settings.

    Hi,
    The Decimal places in the general setting indicates
    Amounts:Display of row and document details
    Prices:Display for price fields in documents,item  data,price lists
    Rates:Display of decimals in currency calculation
    Quantity:Display of quantity in documents and item data
    Percent:Display used in calculation of tax amounts and discounts
    Units:Display used in units(UoM) of items.
    Also refer these note:[737880|https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E&note_numm=0000737880]
    Hope this is helpful

  • Changing Decimal Places for Currencies (Table V_TCURX)

    The instance is ECC 6.0
    We need to change the decimal places for a currency from 0 to 2 decimal places. Is there any impacts of doing that?
    Also need to add some currencies which are not in the table. Is there anything need to be careful while doing this. If this table is updated, do we need to update any other tables also which may be impacted?

    Hi,
    It is not recommended that when postings have already been made, that a change in the currency be done, as amounts posted can become invalid or incorrect as a result (ie USD 100->1.00), which is most critical in production environment Please go through the note 137626 When you made changes via OY04, the effect of which is across all clients.
    To change the number of decimal places for a currency already in use, you must convert all the tables in the R/3 System that contain currency fields, so that the data integrity remains. This cannot, however, for both organizational reasons and under the runtime aspect, in a productive system.
    You must never change decimal places in a productive system if you have documents posted with this currency. Such a change could lead to inconsistencies in these documents already posted.
    In case you really decide to use decimals you may consider to use SAP conversion services for them to convert all documents aready posted as explained in note 434349.
    Additional inforamtion:
    Note No.  137626 - FAQ: Decimal places for currency codes
                     126857 - Display of amts with correct decimal places in SE16
                       53206 - Processing of currency fields
                         9574 - Currency fields on selection screens
    Regards
    Ravinagh Boni

  • More DECIMAL places for MM price-Not Global

    I have read the <u>many</u> postings on decimals. However, I have not seen the exact scenario I'm inquiring about.
    I want to increase the decimal places from 2 to 4 for the cost of materials we purchase (i.e. supplier price), but I do NOT want to set this as a global aspect for the company when dealing with numbers/currency.
    It's not just a simple matter of setting a different unit of measure, because let's say we order a reel of capacitors - the reel may come in qty of 1,000 or 2,500 (only one example). So, we really need to set price by (ea). The problem is that many of our parts price at .0014 (example) and in SAP that shows a cost or price [depending on where you're looking] of zero. Plus, the Purchasing agent sends a PO with incorrect price information.
    <b>It would be very helpful if anyone could tell me how to increase the number of decimal places for specific fields as opposed to globally.</b>
    Thanks you!!

    The right tool to do that is the pice unit. This is in the system for ecatly that purpose, to provide more precision in prices. It has nothing to do with unitz of measure that is used for logistical purposes.
    If you have a price 0f 0.0014 each you can set a price unit of 1000 and will have a price of 1.40 for 1000. You still can have only 500 or even 1 on stock. the calculation done if you receive your 2500 will be 2500 * 1,40 / 1000 which is of course the same as 2500 * 0,0014
    best regards,    Udo

  • Bex: overall Result: number of decimal places

    Good day
    How to I change the number of decimal places for the "Overall result" in a query?
    Your assistance is appreciated.
    Cj Faurie

    Thanks for your response.
    The number format in properties for the KF (formula created in query) has been set to '0' decimal places. I also use the "Average of all values <>0" in the calculate results for the KF. If you use "Summation" then the decimal will apply, but not with the "Average .....".
    My "0CALMONTH" is in rows and results is based on this (set to 'never') as I want the Overall Result to display first as my chart is based on the OResult and not the individual figures.
    "This is the layout of my report"
    Territory     Overall Result    2007/02     2007/03    2007/03
    Boland       205.8333           21             242          355
    The "overall result' should display as '206'. Why does the 'decimal place' not apply to "Average of all v...."?
    Thanks
    Cj

  • Decimal Place for Percentage

    Hi,
    Where do we change the number of decimal places for percentage?  Currently it is set as 3places. (e.g. 1.234% change to 1.2345%)
    Thanks,

    Hi Shiva,
    As for the link you gave, we don't want to change the currency decimal place.  We only want to change the number of decimals shown in a percentage value. (such 1.2345% instead of 1.234%)
    Thanks,

Maybe you are looking for

  • IPhoto takes too long to open and close

    I just updated to iPhoto 5.0.4 from 4.0.3 (using an iLife 05 disk) on my iBook G4 (specs below). I have about 10,000 photos in my library. It took 5 or more hours (I finally had to go to bed!) to update all my photos when the program first opened. Th

  • After Mavericks OS upgrade, can no longer make any HTTP requests with the OPTIONS verb

    My machine can no longer make any HTTP requests with the OPTIONS verb. This happens whether I try it curl, postman, or ajax. curl -i -X OPTIONS http://www.google.com returns curl: (52) Empty reply from server It should return a long string containing

  • Batch file not working with Scheduler

    I have written a simple batch file which copies contents of one directory to another directory on second server. Both the servers are Windows 2008 R2 and are member servers in the same domain. It is a simple .bat file which copies contents to another

  • Java 1.5 fails to install (Adware.SystemProcess)

    This is a repost from another forum. I mistakenly posted there earlier, however this forum seems more appropriate. When trying to install Java 1.5, an error message appears at the end of the install process that says "Java virtual machine failed to i

  • Acabo de instalar modo de prueba ps cc2014 y no lo puedo abrir

    no puedo abrir photoshop cc 2014 lo acabo de intalar y solo lo pude abrir una sola vez y despues ya no