Search Results get_receive_rcv




Overview

POS_PO_RCV_QTY is an Oracle E-Business Suite PL/SQL package owned by the APPS schema that provides quantity calculation utilities for the receiving and purchasing flow. Its central purpose is to derive accurate received, net, and net-received quantities for receipt transactions originating against purchase order shipment lines. The package exists because quantity received must be computed net of corrections, returns, and matching adjustments, and an earlier calculation approach (via get_net_quantity) was found to be incorrect. Oracle therefore introduced the get_net_qty_rcv function and invoked it from the view POS_RCV_TRANSACTIONS_V, as documented in the header comment referencing Bug 1086123.

The package is classified as OTHER in the ETRM metadata and is declared with AUTHID CURRENT_USER. It is referenced by four other packages in the EBS code base, indicating it functions as a shared low-level calculation layer rather than an end-user-facing API. Its most recent header revision dates to 2003, confirming its role as stable, long-standing infrastructure used by receiving inquiry screens and receiving-related reports.

Key Procedures and Functions

  • GET_RECEIVE_RCV — This is the function returned for the search term "get_receive_rcv." Its documented purpose is to return the received quantity associated with a given shipment line, accepting a shipment line identifier as input.
  • GET_NET_QTY — Computes a net quantity from a parent transaction identifier and a primary quantity. It is subject to pragma restrict_references (WNDS, RNPS, WNPS), meaning it does not write database state or package state and is therefore safe within SQL.
  • GET_NET_QTY_RCV — Introduced under Bug 1086123 to replace the incorrect get_net_quantity logic for received quantity. It accepts a shipment line identifier and a primary quantity, and it is the function called from POS_RCV_TRANSACTIONS_V. It also carries the restrict_references pragma.
  • GET_NET_RECEIVED_QTY — Returns the net received quantity for a given transaction identifier.
  • GET_NET_RCV_AMT — Derives a net received amount, providing the monetary counterpart to the quantity calculations.
  • GET_QTY_RCV — Returns a received quantity value used in receiving calculations.

The functions listed above constitute the six documented procedures; no additional signatures are documented in the ETRM metadata.

Tables Accessed

  • PO_LINE_LOCATIONS_ALL — The purchasing shipment line table. It supplies shipment line definitions and the shipment_line_id used as the primary input to GET_RECEIVE_RCV and GET_NET_QTY_RCV.
  • RCV_TRANSACTIONS — The receiving transactions table. It holds the individual receipt, correction, return, and delivery records whose quantities are aggregated and netted by the package's calculation functions.

Both tables are accessed through APPS synonyms. The package reads them to compute net quantities rather than to maintain them; the restrict_references pragmas on the quantity functions confirm read-only intent for those routines.

Usage Notes

POS_PO_RCV_QTY is not typically called directly by end users. It is invoked indirectly through the view POS_RCV_TRANSACTIONS_V, which exposes derived quantities to receiving inquiry forms and related UI. The functions may also be invoked from SQL statements, reports, or custom PL/SQL code that requires a reliable net received quantity for a shipment line or receipt transaction.

Because the package is referenced by four other packages, callers should treat it as a shared dependency and avoid assumptions about internal behavior beyond the documented functions. When replicating receiving quantity logic in custom code, developers should prefer GET_NET_QTY_RCV over the older get_net_quantity approach, consistent with the correction documented under Bug 1086123. The GET_RECEIVE_RCV function specifically answers the common requirement of retrieving the received quantity for a shipment line without requiring callers to aggregate RCV_TRANSACTIONS themselves.