Search Results get_shipment_num




Overview

APPS.PO_SHIPMENTS_SV1 is a server-side PL/SQL package that encapsulates shipment-level logic for Oracle Purchasing. It belongs to the family of "SV" (server validation/servicing) packages in the PO schema, whose purpose is to centralize business rules that would otherwise be duplicated across Oracle Forms, concurrent programs, and public APIs. In the Oracle EBS 12.1.1 and 12.2.2 architectures, PO_SHIPMENTS_SV1 provides utility routines for deriving shipment sequence numbers and for retrieving planned shipment attributes such as ship-to information, quantities, price overrides, and promised dates. Because it operates directly against purchasing base tables through APPS synonyms, it is tightly coupled to the purchasing data model and is primarily intended for internal consumption by other purchasing modules rather than for direct end-user or external integration use. The package is classified as OTHER in the ETRM metadata, indicating that it is not a formally published public API and that its interface may change between releases. The header comment in the package body references file POXPOS1B.pls (revision 120.4, dated 2006), confirming a long-standing, stable lineage across the EBS release stream.

Key Procedures and Functions

The ETRM metadata documents four procedures or functions within this package. Their purposes are as follows:

  • get_shipment_num — The routine most commonly associated with the "get_shipment_num" search term. It determines the next shipment number to be assigned to a new line location. When a release identifier is supplied, it derives the number from existing shipments for that release; otherwise, it derives the number from shipments associated with the given PO line, restricted to the shipment types STANDARD, PLANNED, and PRICE BREAK. If no prior shipment is found, the routine returns a value of 1, designating the first shipment. The shipment number is returned through a NOCOPY IN OUT parameter.
  • get_planned_ship_info — Retrieves the default attribute set for a planned shipment. Based on the documented signature, it resolves ship-to location code and identifier, ship-to organization code and identifier, quantity, price override, and promised date, taking a source shipment identifier and set of books identifier as inputs. This supports the creation of planned shipments that inherit characteristics from an existing source shipment.
  • The metadata lists two further procedures whose names are recorded as NAME. These additional routines perform supporting shipment servicing tasks within the same internal family and are not exposed as published interfaces.

All routines follow the standard error-handling convention of the PO_SV package family: exceptions are logged through PO_MESSAGE_S.SQL_ERROR and then re-raised, allowing the calling form or program to present the SQL error through the standard purchasing message framework.

Tables Accessed

The package reads the following tables via APPS synonyms:

  • PO_LINE_LOCATIONS — The primary operating table. get_shipment_num queries MAX(SHIPMENT_NUM) from this table, filtered either by PO_RELEASE_ID or by PO_LINE_ID and SHIPMENT_TYPE. get_planned_ship_info also derives its default attribute values from line location records. This is the central repository of shipment and distribution scheduling information in Purchasing.
  • PO_DISTRIBUTIONS — Referenced in support of quantity and accounting-related shipment attributes, since distributions carry the charge, quantity, and delivery detail tied to each line location.

No write operations are implied by the documented metadata; the package behaves predominantly as a read-and-derive utility layer over these purchasing entities.

Usage Notes

PO_SHIPMENTS_SV1 is invoked internally by other purchasing packages and by Oracle Purchasing forms and concurrent programs whenever a new shipment must be added or a planned shipment must be populated. The ETRM metadata records that it is referenced by three other packages, confirming its role as a shared dependency within the PO module rather than an entry point invoked directly by users. The typical calling pattern for get_shipment_num is to pass either the release identifier or the line identifier, then supply the returned number as the SHIPMENT_NUM for the new PO_LINE_LOCATIONS row, ensuring sequence integrity without exposing the caller to the underlying MAX query logic. Custom extensions should treat this package as internal and unsupported: because it is classified OTHER and its procedures may be altered by patches, direct calls from custom code carry upgrade risk. Where possible, customizations should rely on documented public APIs such as PO_SHIPMENTS_PUB rather than calling PO_SHIPMENTS_SV1 directly.