Search Results get_pending_qty
Overview
RCV_QUANTITIES_S is a server-side PL/SQL package in the APPS schema that centralizes the quantity calculations required by Oracle E-Business Suite's receiving and inbound logistics flow. Declared AUTHID CURRENT_USER, it executes under the privileges of the calling session and is therefore invoked primarily from other receiving modules, Oracle Forms, and API-driven interfaces rather than being run directly by end users. Its business purpose is to answer the core question that every receiving transaction asks before it can be committed: how much of a given order, shipment line, or distribution is still open to transact, and in which unit of measure should that quantity be expressed.
The package supports the full receiving transaction lifecycle, including RECEIVE, MATCH, TRANSFER, INSPECT, DELIVER, CORRECT, RETURN TO VENDOR, RETURN TO RECEIVING, DIRECT RECEIPT, and STANDARD DELIVER. It resolves available, tolerable, and pending quantities against the parent entity supplied by the caller (a line location, shipment line, transaction, or PO distribution) and returns the corresponding unit of measure. Because the header references RCVTXQUS.pls (115.6, last updated 2003), the package is long-standing and stable across both 12.1.1 and 12.2.2.
Key Procedures and Functions
- GET_AVAILABLE_QUANTITY — The primary documented procedure. It returns the quantity available to transact for a given receiving transaction, along with a tolerable quantity and the parent transaction's unit of measure. It accepts the transaction type, parent identifier, receipt source code, parent transaction type, grand-parent identifier, and correction type as inputs, and returns the available quantity, tolerable quantity, and UOM as output parameters. Tolerable quantity applies to vendor receipts and tolerances; it is returned as null in other contexts.
- GET_PENDING_QTY — The function matching the user's search term. It supplies the pending quantity for a receiving context, allowing callers to distinguish quantity already in the pipeline (for example, in the receiving or inspection stages) from quantity still fully available to act upon.
- GET_PRIMARY_QTY_UOM — Returns the primary unit of measure associated with the quantity calculation, enabling callers to normalize or display quantities consistently with the item's primary UOM.
- NAME — The package-level identifier construct exposed in the documented procedure list.
The package exposes eleven documented procedures and functions in total, of which the quantity resolvers above are the most heavily referenced.
Tables Accessed
The package reads and writes a broad set of receiving, purchasing, inventory, and order management tables through APPS synonyms. RCV_SHIPMENT_LINES, RCV_TRANSACTIONS, and RCV_TRANSACTIONS_INTERFACE hold the inbound receipt and transaction records whose quantities are being evaluated. RCV_SUPPLY and MTL_SUPPLY provide the supply-side quantity picture used to derive pending and available amounts. PO_LINE_LOCATIONS_ALL, PO_LINES_ALL, PO_LINES, and PO_DISTRIBUTIONS_ALL supply ordered, received, and distributed quantities for purchase order matching. MTL_SYSTEM_ITEMS_B, MTL_SYSTEM_ITEMS_KFV, and MTL_UNITS_OF_MEASURE resolve item definitions and UOM conversions. OE_ORDER_LINES_ALL and WSH_DELIVERY_DETAILS cover internal order and shipping-side receiving scenarios.
Usage Notes
RCV_QUANTITIES_S is typically invoked from the Receiving Transactions and Receiving Returns forms, from receiving-related concurrent programs, and from custom PL/SQL code that extends the standard receiving flow. It is referenced by 23 other packages, confirming its role as a shared quantity service layer. When writing custom receiving logic, developers should call GET_AVAILABLE_QUANTITY before attempting RECEIVE or MATCH, and use GET_PENDING_QTY when validating whether a shipment line or distribution still has quantity in flight. Because the package is AUTHID CURRENT_USER, callers must be granted appropriate privileges on the underlying tables and must supply a valid parent identifier consistent with the transaction type, as documented in the package header.