Search Results receiving_org




Overview

MRP_SOURCING_RULE_PUB is a public PL/SQL API package in the Oracle EBS Applications (APPS) schema that governs the definition and maintenance of sourcing rules used by Oracle's supply chain planning and procurement modules. Sourcing rules determine how an organization satisfies demand for an item—whether by transferring from another organization, buying from a supplier, or manufacturing in-house—and they are central to planning engine behavior. This package provides a programmatic, business-logic-encapsulated interface for creating, modifying, and retrieving sourcing rule definitions, including the receiving and shipping organization assignments that route supply across a multi-org enterprise.

The package follows Oracle's standard public API design pattern, exposing version-numbered entry points, standard FND_API message-list handling, and NOCOPY OUT parameters for performance. It is classified as a PUB (public) API, meaning it is intended for supported external invocation by other application modules and custom code rather than being reserved for internal use.

Key Procedures and Functions

Three procedures are documented in the package metadata:

  • PROCESS_SOURCING_RULE — The primary transactional entry point. It accepts a sourcing rule record together with receiving-org and shipping-org collections and processes the create or update operation, including validation, ID-to-value and value-to-ID conversion, message-list population, and optional commit control. Standard API parameters such as p_api_version_number, p_init_msg_list, p_return_values, p_commit, and the x_return_status/x_msg_count/x_msg_data outputs govern invocation behavior.
  • LOCK_SOURCING_RULE — Obtains a concurrency lock on a sourcing rule record so that no competing session can modify it during a transaction, ensuring data integrity in multi-user environments.
  • GET_SOURCING_RULE — Retrieves an existing sourcing rule definition, returning the rule and its associated organization assignments for use by calling programs.

The body also declares two internal helper procedures, Id_To_Value and Value_To_Id, which translate between internal surrogate keys and user-facing values for the sourcing rule, receiving org, and shipping org entities. These helpers are implementation details rather than documented public entry points.

Tables Accessed

The documented table reference for this package is PLITBLM, an APPS synonym. Consistent with the receiving_org and shipping_org collections handled by the API, the package operates against the underlying sourcing rule and organization assignment tables that store the rule header and its receiving/shipping organization distribution lines. The ID/value conversion helpers indicate that the API reads reference data to resolve organization identifiers and displays values, while the transactional procedures write and update the rule and assignment rows. Because the package is a validation-and-write API, all access is performed through APPS synonyms under standard EBS multi-org and MOAC (Multi-Org Access Control) conventions.

Usage Notes

MRP_Sourcing_Rule_PUB is typically invoked from Oracle sourcing-rule maintenance forms, from concurrent programs that bulk-load or migrate sourcing definitions, and from custom PL/SQL code that must create or adjust sourcing rules as part of a larger supply chain integration. Callers should establish the correct operating unit context before invocation, pass a valid API version number, and inspect x_return_status and the FND message list for validation errors. The p_commit flag allows the caller to control transaction boundaries. Because lock and get operations are exposed separately, custom code should use LOCK_SOURCING_RULE before update processing and GET_SOURCING_RULE to read current state. The package is referenced by numerous other application packages, reflecting its role as a shared, stable interface for sourcing-rule maintenance across the EBS supply chain modules in both 12.1.1 and 12.2.2.