Search Results demand_priority




Overview

The APPS.MSC_SET_DEMAND_PRIORITY package body is a component of the Oracle Advanced Supply Chain Planning (ASCP) schema within Oracle E-Business Suite. Its principal business function is to establish and assign a numerical priority ranking to demand records processed by the planning engine. In the context of supply chain planning, demands that are not honored equally must be sequenced according to business-defined rules. This package codifies that sequencing logic by translating a configured scheduling rule into an ordered set of demand identifiers, so that constrained and unconstrained plans can consume scarce supply according to the organization's stated priorities.

The package derives its ordering criteria dynamically from the MSC_SCHEDULING_RULES table and constructs sort expressions at runtime based on the meaning of the selected rule. This design allows administrators to change priority behavior through configuration rather than code changes.

Key Procedures and Functions

Two program units are documented for this package.

  • MSC_DEMAND_PRIORITY — The core function. It accepts a plan identifier and returns a numeric demand priority value. Internally it deletes any residual rows in the demand sort working set, retrieves the default demand priority rule from MSC_SCHEDULING_RULES (where DEFAULT_FLAG is 'Y'), and then builds a set of ordering criteria. The criteria are derived by decoding the rule meaning into SQL order expressions covering gross margin, sales order priority, schedule date, promise date, and request date. The package declares a constant LOWEST_PRIORITY of 100000, used as a fallback for demands with no explicit priority, and declares cursor and record types (RefCurType, t_DemandSort) to support the dynamic SQL assembly.
  • GET_INTERPLANT_DEMAND_PRIORITY — A companion function that returns the priority applicable to interplant (internal transfer) demand. It supports the requirement that transfer demands between organizations carry a distinct priority treatment from external sales or forecast demand.

Tables Accessed

The package reads and writes the following documented tables through APPS synonyms:

Usage Notes

This package is internal to the ASCP planning engine and is not intended as a public API. It is invoked during plan execution when demands must be sequenced, typically from the plan generation and demand scheduling flows rather than directly from Oracle Forms. No other packages are documented as referencing it, indicating a localized invocation point within the planning runtime. Because the package depends on the default flag in MSC_SCHEDULING_RULES, at least one scheduling rule must be defined as default for the function to return meaningful results. Custom code should not modify this package; organizations seeking different prioritization behavior should adjust the scheduling rule definitions instead.