Search Results mrp_get_order




Overview

MRP_GET_ORDER is a utility package owned by APPS within the Oracle E-Business Suite planning modules. Its business function is to resolve a human-readable order identifier (such as a purchase order number, work order name, or sales order number) from the internal numeric or surrogate identifiers used by Oracle's Material Requirements Planning (MRP) and supply chain planning tables. This resolution is necessary because MRP/MPS planning engines persist supply and demand records keyed on internal primary keys — demand identifiers, disposition identifiers, item identifiers, and organization identifiers — rather than on the document numbers that planners and end users recognize. When a planner views a planning detail, an exception message, or a pegging report, the application must map those internal keys back to the originating document reference. MRP_GET_ORDER centralizes that translation so that multiple planner workbench and Planning Manager components can render consistent, document-oriented labels. The package is declared with AUTHID CURRENT_USER, meaning that its unqualified object references resolve in the schema of the calling user, which is typical for APPS-owned utility packages that operate against APPS synonyms of the underlying MRP and MTL tables. The source header dates the file to 1999, indicating that this is long-standing core planning infrastructure carried forward through successive EBS releases, including 12.1.1 and 12.2.2.

Key Procedures and Functions

Two documented functions make up the package's public interface:

  • SUPPLY_ORDER — Returns a VARCHAR2 order reference for a supply-side record. Its inputs identify the supply order type, the disposition identifier, the compile designator, the organization, the item, and an optional by-product assembly identifier. It is the function that corresponds directly to the "supply_order" search term, and it is called whenever the application needs to display the document number or reference behind a supply row generated by the planning engine.
  • SALES_ORDER — Returns a VARCHAR2 order reference for a demand-side sales order, given a demand identifier. It resolves the internal demand key into the externally recognizable sales order reference.

Both functions carry PRAGMA RESTRICT_REFERENCES declarations with WNDS and WNPS, asserting that they write neither database state nor package state. This confirms the package is strictly a read-only lookup utility, safe for use within SQL statements and views.

Tables Accessed

The documented table references reflect the two resolution paths:

  • MRP_ITEM_PURCHASE_ORDERS — the planning table of supply records derived from purchasing, used to resolve purchase-order-based supply references.
  • MRP_ITEM_WIP_ENTITIES — the planning table of discrete work-in-process supply records, used to resolve work order and job-based supply references, including by-product assemblies.
  • MRP_SCHEDULE_DATES — provides planning schedule date information that supports date-sensitive order context for supply records.
  • MTL_SALES_ORDERS — the sales order demand interface table, used by SALES_ORDER to translate demand identifiers into sales order references.

Usage Notes

MRP_GET_ORDER is an internal helper rather than a user-facing API and is typically not invoked directly by end users. It is called by the Oracle Planning Manager and planner workbench forms, by planning exception and pegging logic, and by concurrent programs that produce formatted planning output requiring document references. Because the metadata records that it is referenced by six other packages, it functions as a shared service within the planning code stack. Customizations that need to reproduce planning display behavior in extensions, reports, or custom concurrent programs may call SUPPLY_ORDER or SALES_ORDER through PL/SQL or SQL, but developers should treat the signature as Oracle-controlled internal infrastructure and validate behavior against the specific EBS release, as no formal public API contract is documented.