Search Results derive_location_id




Overview

APPS.PO_LINE_LOCATIONS_SV1 is a server-side validation package body within the Oracle Purchasing module. Its role is to enforce data integrity rules on line location (shipment) records stored in the PO_LINE_LOCATIONS table. The SV1 suffix denotes a "server validation" package, a common naming convention in Oracle EBS where validation logic is separated from the base table handlers and user interface code. In the context of Oracle EBS 12.1.1 and 12.2.2, this package supports records created through quotations, blanket purchase agreements, and standard purchase orders by validating shipment numbers and shipment types before they are committed to the database.

The user search term "derive_location_id" reflects a common requirement in purchasing extensions: determining the correct line location identifier associated with a shipment line. While the documented excerpt focuses on validation routines rather than an explicit derivation function, the package's validation logic underpins the integrity of the LOCATION_ID relationships stored in PO_LINE_LOCATIONS.

Key Procedures and Functions

  • val_shipment_num — Validates that a shipment number is unique within the combination of shipment type, PO header, and PO line. It queries PO_LINE_LOCATIONS and returns TRUE when no conflicting record exists (excluding the current row via ROWID) and FALSE otherwise. This prevents duplicate shipment numbering across quotations and standard documents.
  • val_shipment_type — Validates the shipment type against a supplied lookup code. The documented logic restricts supported values to QUOTATION and BLANKET, returning TRUE only when the shipment type matches the expected document context. This guards against invalid shipment type assignments during quotation and blanket agreement processing.
  • Three additional functions — The ETRM metadata documents five procedures/functions in total, but only the names of two are surfaced in the excerpt. The remaining routines follow the same SV1 validation pattern and operate against the same table.

Tables Accessed

The package references PO_LINE_LOCATIONS (accessed through the APPS synonym). This is the core shipment/line location table in Oracle Purchasing, storing records keyed by PO header, PO line, shipment number, and shipment type. The package performs read-only validation queries against it, primarily counting matching rows to confirm uniqueness or type correctness. No insert, update, or delete operations are documented, confirming the package's role as a validation layer rather than a data-manipulation layer. The LOCATION_ID column in this table associates each shipment with a ship-to or deliver-to location, which is why location derivation and validation logic is inseparable from this package's domain.

Usage Notes

PO_LINE_LOCATIONS_SV1 is invoked indirectly by Purchasing forms, concurrent programs, and the Purchasing Public APIs during shipment creation and maintenance. Because it is classified as OTHER rather than a public API, it is intended for internal Oracle use; however, custom extensions that create or modify line locations frequently call its validation functions or replicate their logic.

When implementing "derive_location_id" logic in custom code, developers typically query PO_LINE_LOCATIONS by PO_HEADER_ID, PO_LINE_ID, and SHIPMENT_NUM to retrieve the LOCATION_ID. Any custom routine that inserts new shipments should first invoke val_shipment_num and val_shipment_type semantics to avoid violating Purchasing integrity constraints. Two other packages reference PO_LINE_LOCATIONS_SV1, confirming it is a shared validation dependency within the Purchasing schema. In EBS 12.2.2 the package remains compatible with the online patching model, residing in the APPS schema and invoked at runtime rather than during patching.