Search Results order_forecast_cst




Overview

MSC_X_HZ_PLAN is a private PL/SQL package body owned by APPS within the Oracle E-Business Suite Advanced Supply Chain Planning (ASCP) module. Its name reflects its purpose: it supports the horizontal (HZ) plan view — the time-phased, bucketed display of supply and demand planning data presented to planners. Unlike the core MSC_* planning engine packages, this package is oriented toward presentation-layer aggregation, taking raw planning entries and reshaping them into day, week, or month buckets suitable for on-screen analysis in the Planner Workbench.

The package declares an extensive set of named constants mapping integer codes to planning entry types. These include demand-side categories such as SALES_FORECAST, ORDER_FORECAST_CST, HISTORICAL_SALES, SELL_THRU_FORECAST, NEGOTIATED_CAPACITY, SAFETY_STOCK, and PROJ_SAFETY_STOCK, alongside supply-side categories such as PURCHASE_ORDER, SALES_ORDER, ASN, SHIPMENT_RECEIPT, INTRANSIT, WORK_ORDER, REPLENISHMENT, REQUISITION, PLANNED_ORDER, RELEASED_PLAN, and PO_FROM_PLAN. This constant vocabulary is the package's central contract: the horizontal plan view is driven by these type codes, and the bucketing logic aggregates quantities against them.

Key Procedures and Functions

The package exposes two documented program units:

  • POPULATE_BUCKETED_QUANTITY — The principal procedure. Its documented purpose is to calculate the bucket boundaries and aggregate planning quantities into the appropriate buckets for display on the HZ view. It accepts an OUT query identifier, meaning it registers or returns a handle to a stored query whose results the caller then renders. The header comment in the source explicitly states this intent: to calculate buckets and aggregate quantities for the HZ view. Because the constant list includes DAY_BUCKET, WEEK_BUCKET, and MONTH_BUCKET, this procedure is responsible for translating heterogeneous planning records into a uniform time-phased grid.
  • GET_LOOKUP_NAME — A utility function that resolves a lookup code to its display name, sourcing values from FND_LOOKUP_VALUES. It supports labelling of the type codes enumerated in the package constants so that planners see meaningful descriptions rather than numeric identifiers.

Tables Accessed

The package reads and writes a focused set of application tables:

Usage Notes

MSC_X_HZ_PLAN is an internal ASCP component rather than a public API. It is invoked through the horizontal plan user interface in the Planner Workbench, where the package computes the bucketed result set and registers it via MSC_FORM_QUERY for rendering. Because the package is referenced by only one other package and is classified as OTHER in the ETRM metadata, it should be treated as unsupported for direct customer calls. The "last_order" search term is best understood as a display ordering concern: the query produced by POPULATE_BUCKETED_QUANTITY returns aggregated quantities in time-bucket sequence, and any "last order" behaviour observed on the HZ view originates from that query's ordering and calendar bucketing logic rather than from a separately documented procedure. Customizations should avoid modifying this package directly; extensions belong in a private copy or an adjacent custom package, given its exposure to patch cycles (the source header indicates patch level 120.7.12010000.2).