Search Results get_uom_properties




Overview

INV_DECIMALS_PUB is a public PL/SQL API belonging to the APPS schema in Oracle E-Business Suite 12.1.1 and 12.2.2. It provides centralized services for unit of measure (UOM) conversion and quantity validation within Oracle Inventory. Its principal purpose is to compare and validate quantities that are expressed in one unit of measure against quantities expressed in another, using the conversion relationships defined between those units and applying the decimal quantity and rounding controls configured for each UOM. The package is declared with AUTHID CURRENT_USER and carries the header identifier INVDECPS.pls, version 120.1, indicating it is a long-standing, stabilized component of the Inventory product family.

The business need it addresses is straightforward but pervasive: inventory transactions, receiving, shipping, and dual UOM entry scenarios must guarantee that two representations of the same physical quantity agree, within the tolerance permitted by the conversion rate and the decimal precision of the units involved. INV_DECIMALS_PUB isolates that logic so that multiple callers apply identical rules rather than reimplementing conversion arithmetic locally.

Key Procedures and Functions

The ETRM metadata documents seven public subprograms. Each serves a distinct role in the quantity lifecycle:

  • CONVERT_UOM — Performs the core conversion of a quantity from a source unit of measure to a target unit of measure, returning the converted value.
  • GET_UOM_PROPERTIES — Returns the properties associated with a given unit of measure, such as its decimal precision and related UOM class attributes. This is the entry point most commonly used by callers that need to know how many decimal places a UOM supports before performing their own arithmetic or display formatting.
  • COMPARE_QUANTITIES — Compares two quantities expressed in different units of measure and reports the relationship between them.
  • VALIDATE_QUANTITY — Validates a single quantity against the controls defined for its unit of measure.
  • VALIDATE_COMPARE_QUANTITIES — Compares and validates two quantities supplied in two different UOMs, based on conversion rates together with the UOM and decimal quantity controls.
  • VALIDATE_AND_COMPARE (documented in the source excerpt) — Accepts an inventory item, organization, lot and sublot information, a from-quantity and from-UOM, and a to-UOM with a to-quantity to check; it returns the resultant calculated to-quantity, a comparison result, and standard API message and return status outputs.
  • GET_PRIMARY_QUANTITY — Derives the primary quantity for an item, supporting the dual UOM model in which a secondary quantity is maintained alongside the primary unit.

The VALIDATE_AND_COMPARE API returns x_comparison as -1, 0, 1, or -99, denoting less-than, equal, greater-than, or an error condition respectively. Comparisons are performed in the base unit of the UOM class to which the first UOM belongs, which ensures consistent rounding behavior across conversions.

Tables Accessed

The documented table reference for this package is MTL_SYSTEM_ITEMS, accessed through APPS synonyms. This table is read to retrieve item-level attributes required for validation, including the item's unit of measure configuration, lot control code, and sublot control code. The lot and sublot control codes passed into VALIDATE_AND_COMPARE align with the control settings maintained on the item definition, so the package consults MTL_SYSTEM_ITEMS to confirm that supplied lot and sublot values are consistent with the item's configured controls. Conversion rate and UOM property data are supplied through the Inventory UOM infrastructure rather than through the item master itself.

Usage Notes

INV_DECIMALS_PUB is a public API and is referenced by 42 other packages in the EBS data model, making it a foundational dependency for Inventory and Order Management processing. It is typically invoked from Inventory forms and transaction processing logic during receiving, shipping, subinventory transfer, and miscellaneous transaction entry, where user-entered quantities must be reconciled against converted values. Concurrent programs that process inventory data in bulk may also call the validation routines to detect conversion inconsistencies before committing records. Custom extensions and integrations that accept quantities in two units of measure should call VALIDATE_AND_COMPARE or GET_UOM_PROPERTIES rather than duplicating conversion and rounding logic, ensuring consistent behavior with standard EBS functionality. Because the package is declared AUTHID CURRENT_USER, privilege resolution occurs against the invoking user's schema, which is relevant when granting execute privileges to custom database users.