Search Results uom_convert




Overview

OPI_DBI_REP_UOM_PKG is a PL/SQL package owned by the APPS schema that centralizes unit-of-measure (UOM) conversion logic for Oracle's Daily Business Intelligence (DBI) reporting infrastructure. Its primary purpose is to translate quantities expressed in a transactional UOM into the reporting UOM configured for a given measure, so that DBI dashboards, fact tables, and analytical summaries present consistent, comparable figures across items, organizations, and reporting periods.

The package is classified as OTHER within the ETRM inventory for Oracle EBS 12.1.1 and 12.2.2. It provides a small, focused API surface: conversion functions, lookups for the reporting UOM associated with a measure, utility accessors, and canned error-message output routines. It is a dependency of at least five other packages, making it a shared building block within the OPI (Oracle Product Intelligence) DBI layer rather than an end-user-facing component.

Key Procedures and Functions

  • UOM_CONVERT — The central conversion function and the object most commonly associated with the search term "uom_convert." It converts a quantity from one UOM to another for a specified item, honoring a caller-supplied precision. It is declared PARALLEL_ENABLE, indicating that it is designed to run safely inside parallel query and parallel DML execution plans typical of large DBI aggregation jobs.
  • GET_REPORTING_UOM — Returns the reporting UOM code that applies to a given measure code. This resolves the mapping between a business measure and the UOM in which that measure must be reported.
  • GET_W, GET_V, GET_D — Utility accessors that return packaged constant or configuration values. Also declared PARALLEL_ENABLE, allowing them to be embedded in parallel SQL without inhibiting parallelism.
  • ERR_MSG_HEADER — Emits a standard header line for error output generated by the package, ensuring consistent formatting across DBI diagnostic messages.
  • ERR_MSG_FOOTER — Emits the corresponding standard footer line that closes an error-message block.
  • ERR_MSG_MISSING_UOMS — Produces a diagnostic message when a required conversion path is unavailable, identifying the from and to UOM codes that could not be resolved.
  • ERR_MSG_HEADER_SPEC — Emits a specialized error header that includes the measure code and entity type, used to give context when reporting-specific failures occur.

Tables Accessed

  • MTL_UNITS_OF_MEASURE — The base Oracle Inventory UOM definitions. The package reads this table (through an APPS synonym) to validate UOM codes and obtain their defining attributes during conversion.
  • OPI_DBI_REP_UOMS — The DBI-owned configuration table that stores the reporting UOM assignments. This is the source that GET_REPORTING_UOM consults to determine which UOM a given measure should be reported in.
  • OPI_DBI_UOM_CLASS_STD_CONV — The UOM class standard conversion table, supplying the conversion factors between UOMs within a class. UOM_CONVERT relies on this data to perform the actual from-to quantity arithmetic.

Usage Notes

OPI_DBI_REP_UOM_PKG is an internal DBI component and is not typically invoked directly by end users or through standard Oracle EBS forms. Its documented callers are other packages—five APPS-level packages are recorded as referencing it—which call UOM_CONVERT and GET_REPORTING_UOM during the population of DBI fact tables and reporting views. Because the conversion functions are PARALLEL_ENABLE, they are intended to be called from SQL statements inside concurrent program batch loads, where large volumes of transactional rows must be normalized to a single reporting UOM.

Custom development that needs DBI-consistent UOM normalization should call UOM_CONVERT rather than reimplementing conversion logic, and should call GET_REPORTING_UOM to discover the correct target UOM for a measure. The error-message procedures are supplied so that callers can emit package-standard diagnostics when a conversion cannot be resolved—for example, when a UOM pair is absent from OPI_DBI_UOM_CLASS_STD_CONV. As with all APPS-owned OPI_DBI objects, the package is subject to change without notice across releases and should be treated as a supported but version-specific integration point.