Search Results mrp_assignment_pvt




Overview

MRP_ASSIGNMENT_PVT is a private PL/SQL package in the Oracle EBS Applications (APPS) schema that supports the maintenance of sourcing assignments used by Oracle Master Scheduling/MRP and Advanced Supply Chain Planning. Sourcing assignments define the prioritized rules by which a planning engine selects a source of supply — a supplier, a manufacturing organization, or a transfer relationship — for a given item and organization. The package name carries the _PVT suffix, indicating it is a private, implementation-level API rather than a public, externally supported interface. It is designed to be invoked by the public wrapper package MRP_SRC_ASSIGNMENT_PUB, which performs public API validation and then delegates the actual persistence work to this private layer. The package is declared AUTHID CURRENT_USER, so its SQL executes with the privileges of the invoker, consistent with the standard Apps private-API pattern.

Key Procedures and Functions

  • PROCESS_ASSIGNMENT — The central maintenance routine. It creates, updates, and deletes sourcing assignment records in a set. It conforms to the standard Oracle EBS API signature, taking an API version number, an initialization flag for the message list, a commit flag, a validation level, and a control record, and returning a return status along with message count and message data. It receives both the new and the old assignment-set record, and both the new and old assignment table (Tbl) structures, enabling the procedure to determine which rows must be inserted, changed, or removed. Output parameters return the resulting assignment-set record and assignment table.
  • LOCK_ASSIGNMENT — Provides pessimistic locking for a sourcing assignment set prior to modification. The documented signature includes an API version number, the initialization-message flag, the standard return status, message count, and message data outputs, and an input assignment-set record. Its purpose is to prevent concurrent users or processes from modifying the same assignment set simultaneously.
  • GET_ASSIGNMENT — Retrieves sourcing assignment data for a specified assignment set. It supplies the current state of the set and its detail rows so that callers — typically the public API’s update logic — can populate the old-record and old-table parameters required by PROCESS_ASSIGNMENT.

Tables Accessed

  • MRP_SOURCING_RULES — The header table storing the definition of a sourcing rule, including rule name, organization, and planning attributes. The package reads and writes this table when maintaining the rule header associated with an assignment set.
  • MRP_SR_ASSIGNMENTS — The detail table holding the individual assignment rows — the source type, source organization or supplier, allocation percentage, rank, and effective dates — that make up a sourcing rule. Consumer-level insert, update, and delete operations against this table are driven by PROCESS_ASSIGNMENT.
  • PLITBLM — The standard Oracle Application Object Library message table. The package references it to resolve and report messages raised through the FND message framework, which populates the output message data returned to the caller.

Usage Notes

Because MRP_ASSIGNMENT_PVT is classified as PVT, it should not be called directly by customer code. Customizations and integrations are expected to invoke the public package MRP_SRC_ASSIGNMENT_PUB, which handles validation-level processing and API message management before delegating to this private layer. Within the standard application, the Oracle Forms interface for sourcing rules and the concurrent processes that load or copy sourcing assignments drive these APIs, passing control records and record/table structures defined in MRP_GLOBALS and MRP_SRC_ASSIGNMENT_PUB. The p_commit flag allows the caller to defer or force a database commit, so callers that manage their own transaction boundaries — for example, a batch program processing many assignment sets — should pass FND_API.G_FALSE and commit explicitly. Callers updating existing assignments should invoke LOCK_ASSIGNMENT first to ensure exclusive access to the assignment set, then call GET_ASSIGNMENT to populate the old-record and old-table parameters, and finally call PROCESS_ASSIGNMENT to persist the changes. The documented metadata indicates this package is referenced by one other package, confirming its role as a subordinate helper rather than a top-level entry point. As with all private APIs, Oracle does not guarantee backward compatibility of the procedures in this package across patch or release boundaries.