Search Results get_plan_id




Overview

MSC_HP_UTIL is a utility package owned by the APPS schema within the Oracle E-Business Suite Advanced Supply Chain Planning (ASCP) module. Its primary function is to support the High Performance (HP) planning user interface and query framework. The package name prefix "HP" refers to the high-performance planning engine and its associated interactive planning screens used by planners to review, filter, and analyse supply chain plan data.

The package provides a collection of helper routines that create and resolve query identifiers, retrieve plan-level context such as the plan identifier and calendar code, prepare column and filter definitions for the user interface, and synchronise UI data with the underlying planning tables. It is classified as a UTIL (utility) API, meaning it is not an end-user facing business API but rather an internal support package consumed by other components of the ASCP application.

Key Procedures and Functions

  • CREATE_QUERY_ID — Generates and returns a new query identifier used to track a user's ad-hoc planning query session within the HP framework.
  • GET_PLAN_ID — Resolves and returns the plan identifier associated with a given query identifier. This is the routine most commonly referenced when callers need to translate a UI query context into the underlying plan for subsequent data retrieval.
  • PREPARE_COL_DTLS — Prepares the column detail metadata for a given plan and refresh flag, populating the structures that define which columns are displayed in the planning UI.
  • PREPARE_FILTERS — Accepts a query identifier, a filter type, and a filter string, and prepares the filter criteria applied to the planning query results.
  • GET_CALENDAR_CODE — Returns the calendar code associated with a specified plan, allowing the UI and downstream logic to align date buckets with the plan's defined calendar.
  • SYNC_UI_DATA — Synchronises user interface data for a given plan according to a specified mode, ensuring consistency between the interactive session and the persisted planning data.

The package also declares several constants, including planning filter type values (ft_organization, ft_category, ft_department, ft_resource, ft_exception, ft_item, ft_end_pegging) and sync mode values (sync_purge, sync_launch), which are used by callers to parameterise the above routines consistently.

Tables Accessed

MSC_HP_UTIL operates against both UI-oriented and planning data tables, referenced through APPS synonyms. The query and UI tables include MSC_FORM_QUERY, MSC_HP_QUERY_S, MSC_HP_COL_DTLS, MSC_HP_ROW_DTLS, and MSC_HP_UPDATES, which store query definitions, column layouts, row-level details, and staged UI updates. Plan and calendar context is drawn from MSC_PLANS, MSC_PLAN_BUCKETS, MSC_CALENDAR_DATES, MSC_CAL_WEEK_START_DATES, and MSC_PERIOD_START_DATES. Planning data itself is accessed via MSC_MATL_PLAN_DATA, MSC_RES_PLAN_DATA, and MSC_RES_PLAN_UPDATES, while MSC_TRADING_PARTNERS supplies partner information for filter and display logic. DUAL is used for scalar function returns.

Usage Notes

This package is typically invoked indirectly rather than called directly by end users. It is referenced by three other packages in the ASCP schema, which use its query-management and plan-resolution utilities as part of the HP planning interface flow. In Oracle EBS 12.1.1 and 12.2.2, customisations or extensions that interact with the high-performance planning screens may call GET_PLAN_ID to translate a query identifier into a plan identifier before querying plan data. Because the package is declared with AUTHID CURRENT_USER, privileges are evaluated against the invoking schema, and callers must have appropriate access to the underlying APPS synonyms. The embedded login_id constant indicates debug-only behaviour and should not be relied upon in production.