Search Results get_crp_status
Overview
The APPS.MRP_LAUNCH_PLAN_PK package is a server-side PL/SQL API within Oracle E-Business Suite that supports the Oracle Master Scheduling/MRP (Material Requirements Planning) and Advanced Supply Chain Planning modules. Its principal business purpose is to programmatically launch a planning run—referred to here as a "plan launch"—for a specified organization. Rather than requiring a planner to navigate the planning workbench manually, the package exposes a callable entry point that accepts the organizational context, designator, snapshot and planner identifiers, an anchor date, and a plan horizon, and then performs the validation and setup work necessary to initiate the plan. This makes the package the underlying programmatic mechanism behind plan generation, typically driven from a concurrent program. The package is declared with AUTHID CURRENT_USER, meaning its SQL statements execute with the privileges of the invoking user rather than the package owner, a design consistent with Oracle's application schema security model. The header comment indicates a baseline version of 115.4 dated 2002, reflecting that the core interface is long-established and stable across the 12.1.1 and 12.2.2 releases.
Key Procedures and Functions
The ETRM metadata documents two callable units within the package:
- MRP_LAUNCH_PLAN — The primary procedure and the core of the package. It drives the launch of a plan for a given organization and planning configuration. It accepts parameters covering the organization identifier, the compile designator, the launch snapshot flag, the launching planner, the anchor date, and the plan horizon (the latter defaulting to NULL). It returns the standard concurrent program
errbufandretcodeOUT parameters, confirming that it is intended to be registered as and invoked from a concurrent program. - GET_CRP_STATUS — A function that returns a VARCHAR2 status value. Based on its name, it reports the Capacity Requirements Planning (CRP) status relative to the application and dependent application identifiers supplied. It is declared with
PRAGMA RESTRICT_REFERENCES (get_crp_status, WNDS, WNPS), asserting that it writes no database state and packages no state, which permits its safe use within SQL and in read-consistent contexts.
The package also defines internal constants (SYS_YES, SYS_NO) and a VERSION constant that stores the source header string, but these are implementation details rather than external API surface.
Tables Accessed
The package references the following tables through APPS synonyms, each serving a distinct role in the plan launch process:
- MRP_PARAMETERS — Stores planning parameter defaults and controls that govern how a plan is compiled and launched.
- MRP_PLANS — The master table of plan definitions; the launch process validates and updates the target plan definition here.
- MRP_DESIGNATORS and MRP_SCHEDULE_DESIGNATORS — Hold designator definitions used to determine the compilation scope and scheduling characteristics for the launch.
- MRP_SUB_INVENTORIES and MTL_SECONDARY_INVENTORIES — Provide subinventory and secondary inventory information required to scope the planning run across the correct inventory locations.
Usage Notes
This package is normally invoked indirectly. The MRP_LAUNCH_PLAN procedure matches the signature convention of an Oracle concurrent program (errbuf, retcode), so it is registered and submitted through the Concurrent Programs form rather than called ad hoc. The package metadata notes that it is referenced by one other package, indicating it participates in a larger planning framework and may be called from a coordinating planning package as well as from the concurrent manager. Because the interface has remained essentially unchanged since the 115.4 source revision, custom code that invokes it should continue to function across 12.1.1 and 12.2.2, though developers should confirm subinventory and designator data is valid before launching. The GET_CRP_STATUS function is safe to embed in SQL statements because of its declared purity restrictions.