Search Results get_delivery




Overview

WSH_PR_CREATE_DELIVERIES is an Oracle Shipping Execution (WSH) package owned by the APPS schema. Its documented purpose is to support the autocreate deliveries process used during picking line insertion in Oracle Order Management and Oracle Shipping Execution. When order lines are pick released, the shipping engine must determine which delivery the resulting picking line details should be assigned to, either by locating an existing eligible delivery or by allowing a new delivery to be created. This package encapsulates the lookup logic that resolves the correct delivery identifier for a given set of order and shipping attributes.

The package is classified as OTHER in the ETRM metadata, indicating that it is an internal, non-public API rather than a supported open interface or public API. It is referenced by one other package, confirming that it is consumed internally by the shipping autocreate flow rather than being called directly by end users or external integrations.

Key Procedures and Functions

The package exposes two documented program units:

  • Init — A function that initializes the package. It returns a status indicator where -1 signals failure and 0 signals success. Initialization establishes the internal state the package requires before delivery resolution can occur.
  • Get_Delivery — The central function of the package, and the object referenced by the user's search term. It returns the delivery_id to be used during autocreate deliveries when inserting picking line details. The documented arguments are the order header identifier (p_header_id), the ultimate ship-to site use identifier (p_ship_to_site_use_id), the freight carrier / ship method code (p_ship_method_code), and the organization identifier (p_organization_id). Return values follow the package convention: -1 indicates failure, while any other value represents the resolved delivery_id.

The package also declares two PL/SQL types: delRecTyp, a record type capturing header_id, ship_to_site_use_id, ship_method_code, customer_id, fob_code, freight_terms_code, currency_code, and delivery_id; and delRecTabTyp, an index-by table of delRecTyp. A public variable, delivery_table, is declared of type delRecTabTyp and serves as the in-memory collection used during delivery grouping and resolution.

Tables Accessed

The ETRM metadata documents the following referenced tables through APPS synonyms:

  • SO_HEADERS_ALL — The order headers table. It supplies header-level attributes (such as customer, ship-to, freight terms, and currency) needed to match picking lines to a delivery.
  • MTL_UNITS_OF_MEASURE — The units of measure table, referenced for UOM validation or conversion during the delivery-building process.
  • PLITBLM — The picking line detail interface table, which holds the picking line rows being inserted. Get_Delivery is called precisely at the point these rows are processed, so the delivery_id it returns can be stamped onto them.

Usage Notes

Get_Delivery is not intended for direct invocation by end users. It is called internally by the shipping autocreate deliveries logic during pick release, typically as part of a concurrent program run or an order line workflow activity. Custom code should not rely on this package, because it is an internal OTHER-classified API whose signature and behavior may change between releases without notice. The documented conventions — Initialization via Init before use, and a -1 return code for failure versus a positive delivery_id for success — are the key integration facts for anyone tracing autocreate behavior. In Oracle EBS 12.1.1 and 12.2.2, this package remains an implementation detail of the WSH delivery creation stack rather than a supported extension point.