Print Post Converting Units of Measurement (UOM) in OM

I’ve been working with a client recently where there were a few specific problems that needed to be resolved – the best kind of consultancy project as far as I am concerned.

One of the problems that they were facing was that on a custom report, if the units of measurement were different between the sales order and the item definition, then the units were not being converted properly.  The report produces custom invoices for the client, so this is a key requirement – recently they invoiced someone for 18 million euros by mistake since the calculation was completely wrong!  For example, someone orders 17 rolls of paper at £42 per roll, which is entered into standard OM.  The item is actually stored in the system in metres – there are 30 metres on a roll.  Unfortunately, there is no direct conversion between a roll and a metre – the conversion is rolls into millimetres, millimetres into metres.  A quirk of bad programming meant that instead of being invoiced for 17 rolls at £42 a roll, the end-client was invoiced for 510 rolls at £42 (17*30 metres = 510).  So only an extra £20,000 or so!  And that was just one order line on one order…

The source of the program was that the original developer wrote their own mechanism for converting between units of measurement – if there was no direct conversion, then the code returned a ratio of 1:1.  So converting rolls to metres meant that the "default" value of 1:1 was calculated, resulting in our 510 metres.

I spent quite some time tracking the problem down – the main problem facing me was that I thought "there must be a standard API for converting units of measurement".  And there is.  The problem is that I couldn’t find it anywhere I looked – a few reference manuals, Google, Metalink all turned up a blank.  So as a last resort, I opened SQL*Developer and searched for packages containing "%UOM%" and found the right one – PO_UOM_S which has a function to convert between units of measurement for a given inventory item.

So, if you ever need to manually convert between units of measurement, hopefully I’ve saved you some time and effort by listing the package here.

This entry was posted on Monday, September 15th, 2008 at 7:25 pm and is filed under Oracle, Technical. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

« Do I need to test?
Displaying the notification history »

One Response to “Converting Units of Measurement (UOM) in OM”

  1. Ole Lunddahl Says:
    November 17th, 2008 at 3:25 pm

    Thanks. This was helpful.

    The function is also used in the standard report POXRCIPS which reports on variances between purchase requisition and what was invoiced by vendor. The specific use is:

    po_uom_s.po_uom_convert_p pol.unit_meas_lookup_code, rct.unit_of_measure, pol.item_id)

    For more on that report, open it up. The code is in query “Q_Pos” and the report is fairly straigthforward to read.

Leave a Reply

  • Pages

    • About Us
    • Services From WorkflowFAQ
    • Training
    • Workflow Book
    • Careers
    • Forum
    • Blog
  • Oracle 11i Workflow Certified Expert
    Oracle 11i System Administrator Certified Expert

  • Search


  • Blog

    Archives

    • January 2012
    • November 2011
    • October 2011
    • September 2011
    • August 2011
    • July 2011
    • June 2011
    • April 2011
    • February 2011
    • January 2011
    • December 2010
    • October 2010
    • September 2010
    • April 2010
    • March 2010
    • February 2010
    • January 2010
    • December 2009
    • October 2009
    • August 2009
    • July 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • May 2008
  • Categories

    • General Computing (30)
    • Non-Oracle (18)
    • Oracle (77)
      • Functional (20)
      • Technical (68)
    • Personal (2)

  • Links

  • General Computing

    • Computing Magazine
    • Download.com
    • SourceForge.net
    • The Daily WTF
    • The Register
  • Non-Computing

    • BBC News
    • Burnley-based professional photography
    • Cuteable
    • My wife’s shop
  • Oracle Related

    • AppsDBA
    • Oracle
    • Oracle Apps Blog
    • Oracle Magazine Interactive
    • Oracle Support
    • Oracle Technology Network
    • Oracle UK
    • Oracle Workflow Forum on OTN
    • Oracle WTF
    • OraFAQ
    • Steven Chan
    • Steven Feuerstein


Copyright © 2012 TS Fifteen Ltd. All rights reserved.