Search Results msc_matl_plan_pkg




Overview

APPS.MSC_MATL_PLAN_PKG is a server-side PL/SQL package that supports the material planning workbench within Oracle Advanced Supply Chain Planning (ASCP), part of the Oracle E-Business Suite 12.1.1 and 12.2.2 supply chain management modules. The package exposes a stateful, query-driven API used by the material plan user interface to initialize a planning query, aggregate and retrieve result sets, persist user edits, and release working data when the session ends. It is declared with AUTHID CURRENT_USER, meaning that all unqualified references to the tables it touches are resolved against the synonyms and privileges of the calling schema rather than the package owner, so access is governed by the invoking user's grants on the APPS synonyms.

The header comment ($Header: MSCPCMHS.pls 120.0.12020000.2) indicates the file has been maintained through the 12.2 code line, and the ETRM registry classifies the package as API classification OTHER, reflecting that it is an internal, application-support package rather than a published open interface. It is referenced by no other packages, confirming its role as a leaf component invoked directly by the planning UI and its supporting concurrent processes.

Key Procedures and Functions

The package documents five procedures, which together form a complete query lifecycle for the material plan workbench:

  • INITIALIZE_DATA — Creates and seeds a working query context for a material plan. It accepts the query identifier, plan identifier, category set identifier, and filter strings for organizations, categories, and items, together with a page size. This is the entry point a caller invokes first; it establishes the row population and paging definitions that subsequent calls reference.
  • SUMMARIZE_DATA — Aggregates the populated query results for the supplied query identifier, producing the summarized planning view presented to the user.
  • FETCH_DATA — Retrieves a specific page of results for a query identifier and row index, driving the paged display of plan data in the workbench.
  • SAVE_CHANGES — Writes user modifications made against the working query back to the persistent planning tables.
  • CLOSE_DATA — Releases the working data associated with a query identifier, cleaning up temporary structures once the user has finished with the plan view.

All five procedures are parameterized by a query identifier, establishing a session or query-scoped context that is carried across the calls.

Tables Accessed

The package works against a set of MSC planning tables exposed through APPS synonyms. Supply and demand information is read from MSC_SUPPLIES, MSC_SUPPLIES_S, MSC_DEMANDS, and MSC_DEMANDS_S, which hold the horizontal plan source data. MSC_MATL_PLAN_DATA stores the material plan working rows, and MSC_HP_COL_DTLS, MSC_HP_ROW_DTLS, and MSC_HP_UPDATES hold the horizontal plan column definitions, row details, and user update records used by the interactive grid. Item and category context comes from MSC_SYSTEM_ITEMS, MSC_ITEM_CATEGORIES, and MSC_SAFETY_STOCKS, while MSC_TRADING_PARTNERS supplies partner information. MSC_FORM_QUERY stores the query definitions created by INITIALIZE_DATA. Collectively these tables provide the plan inputs, the display metadata, and the persistence targets for saved edits.

Usage Notes

MSC_MATL_PLAN_PKG is invoked programmatically by the material planning workbench forms and underlying UI controllers rather than by end users directly. Because the procedures share state through the query identifier, they must be called in lifecycle order: initialize, summarize, fetch (repeatedly, per page), optionally save, and finally close. The presence of SAVE_CHANGES and CLOSE_DATA implies explicit transactional and resource-management responsibility on the caller. Customers extending the workbench should treat the package as an internal API, respect the AUTHID CURRENT_USER privilege model, and avoid calling the procedures outside a properly initialized query context.