Search Results get_quantity_onhand




Overview

PO_GML_DB_COMMON is a shared PL/SQL utility package owned by the APPS schema in Oracle E-Business Suite. It functions as a common database layer for Oracle Process Manufacturing (OPM) receipt and purchasing integrations, providing reusable units-of-measure conversion, on-hand quantity lookup, inventory transaction creation, and validation logic. Although the PO_ prefix associates it with the Purchasing module, the package operates predominantly against OPM inventory tables (IC_*) and standard Oracle Inventory tables (MTL_*), reflecting its role in bridging the discrete purchasing/receiving model with the process manufacturing inventory model.

The package is classified as OTHER in the ETRM documentation and was captured with a VALID status in both EBS 12.1.1 and 12.2.2. It is referenced by eight other packages, including GML_MLT_CNTR_RCPT, GML_MOBILE_RECEIPT, GML_RCV_DB_COMMON, GML_RQ_DB_COMMON, PO_LINES_SV11, and the PO workflow accounting packages PO_WF_PO_ACCRUAL_ACC and PO_WF_PO_CHARGE_ACC. This dependency footprint indicates the package is invoked across receiving, requisition import, validated derivation, and workflow accrual processing.

Key Procedures and Functions

The ETRM metadata documents eight procedures or functions within the package:

  • CHECK_PROCESS_ORG — Validates whether a given organization is enabled as an OPM (process manufacturing) organization, allowing callers to branch between discrete and process logic paths.
  • GET_OPM_UOM_CODE — Retrieves the OPM units-of-measure code corresponding to a supplied UOM, supporting conversions between the OPM inventory model and the standard Oracle UOM model.
  • GET_APPS_UOM_CODE — Returns the standard Oracle Applications UOM code, effectively the inverse mapping to GET_OPM_UOM_CODE.
  • GET_QUANTITY_ONHAND — Returns the on-hand quantity for an item at a given location or warehouse, used during receipt validation and transaction construction.
  • CREATE_INV_TRANS_OPM — Creates the OPM inventory transaction record, driving the inventory movement that corresponds to a receipt or delivery.
  • GET_SECONDARY_TRAN_QTY — Computes the secondary transaction quantity when an item carries dual UOM tracking, applying the item's conversion relationship.
  • VALIDATE_QUANTITY — Performs quantity validation against tolerance rules or available balances before a transaction is committed.
  • CREATE_LOT_SPECIFIC_CONVERSION — Establishes a lot-specific UOM conversion, which is required in process manufacturing where conversion factors may vary by lot.

Parameter lists are not documented in the ETRM extract; callers should inspect the package specification directly before invoking these routines from custom code.

Tables Accessed

Referenced tables are reached through APPS synonyms and span both the OPM and standard Inventory schemas:

Usage Notes

PO_GML_DB_COMMON is never invoked directly by an end user; it is a server-side dependency of receiving and purchasing programs. It is called from the mobile receipt flow (GML_MOBILE_RECEIPT), the container receipt process (GML_MLT_CNTR_RCPT), requisition import (GML_REQIMPORT_GRP), validated derivation (GML_VALIDATEDERIVE_GRP), and the PO workflow accounting packages that build accrual and charge entries. Because those callers run in a process-manufacturing context, any custom extension that performs OPM receipts, lot conversions, or on-hand validation should reuse this package rather than duplicating logic. Custom code should reference the package through the APPS synonym with standard EBS initialization (FND_GLOBAL.APPS_INITIALIZE or an equivalent session setup), since FND_PROFILE and SYS.STANDARD are among its direct dependencies. Debugging typically involves enabling FND debugging on the calling concurrent program, as errors surface either through PO_INTERFACE_ERRORS or as propagated PL/SQL exceptions.