Search Results get_default_ship_method




Overview

MRP_SCATP_PVT is a private (PVT) PL/SQL package owned by the APPS schema in Oracle E-Business Suite. Its name associates it with Oracle Advanced Supply Chain Planning and the Supply Chain ATP (Available-to-Promise) feature set, where it supports the calculation of inter-organization shipping and transit characteristics used during planning and order promising. A private package of this classification is not intended for direct customer invocation; it functions as a server-side utility layer that exposes deterministic lookup routines to other packages, forms, and planning programs within the application.

The package was declared with AUTHID CURRENT_USER, meaning its SQL statements execute under the privileges of the calling schema rather than the definer, which is consistent with its role as an internal helper whose callers already hold the required data access. The header carries a PRAGMA RESTRICT_REFERENCES clause for every function (WNDS, WNPS — Write No Database State, Write No Package State), confirming that all four routines are read-only and side-effect free. This purity guarantee allows the functions to be called from SQL statements and from other PL/SQL contexts without violating database purity rules.

Key Procedures and Functions

The package exposes four documented functions, each returning a single scalar value:

  • GET_DEFAULT_SHIP_METHOD — Returns the default shipping method for a movement between two locations, resolved from the source and destination location identifiers supplied by the caller.
  • GET_DEFAULT_INTRANSIT_TIME — Returns the default in-transit time, in the unit used by the planning engine, for a movement between two locations.
  • GET_SHIP_METHOD — Returns the effective shipping method for an inter-organization movement. It resolves the method by considering the source organization, the destination organization, an optional source ship method, and the receipt organization, allowing a caller-supplied method to be validated or replaced by the applicable default.
  • GET_INTRANSIT_TIME — Returns the effective in-transit time for an inter-organization movement, resolved from the same organizational and shipping-method context used by GET_SHIP_METHOD.

The paired design is deliberate: the ship method functions establish which carrier or transportation mode applies, while the intransit time functions derive the corresponding lead time. The location-based variants serve location-to-location resolution, and the organization-based variants serve organization-to-organization resolution with an explicit ship method and receipt organization. The latter variant forms the primary interface for planning calculations.

Tables Accessed

The documented table reference for this package is MTL_INTERORG_SHIP_METHODS, accessed through APPS synonyms. This table stores the shipping method definitions and associated in-transit times that govern transfers between inventory organizations. The four functions read from it to resolve default and effective shipping methods and transit times; no writes are performed, consistent with the purity pragmas in the package header.

Usage Notes

MRP_SCATP_PVT is referenced by three other packages, which is the expected consumption pattern for a private utility: other planning and ATP packages call its functions to obtain shipping methods and transit times rather than querying MTL_INTERORG_SHIP_METHODS directly. This centralizes the resolution logic, including the precedence rules that determine when a caller-supplied ship method is honored and when a default is substituted.

Because the functions are declared WNDS/WNPS, they are safe to invoke from SQL within other PL/SQL units and from view or query contexts inside the planning engine. Custom code should treat the package as an internal API: the supported integration points are the public planning packages and the Oracle-supplied forms that call them. Direct invocation is possible where callers hold appropriate privileges on the underlying synonym, but such usage is not warranted by Oracle, and the package signature may change between releases without notice. In 12.1.1 and 12.2.2 environments the object is compiled into the APPS schema and depends only on the MTL_INTERORG_SHIP_METHODS synonym; it requires no setup beyond the standard inter-organization shipping method definitions maintained in that table.