Search Results insert_rec
Overview
MSC_X_HZ_UPDATE is an internal Oracle E-Business Suite PL/SQL package body owned by the APPS schema and classified under the ETRM schema as an "Other" API. It belongs to the MSC (Advanced Supply Chain Planning / VCP) product family and is associated with the horizontal plan user interface layer used by planners. Its specific business purpose is to reconcile quantity adjustments entered by users through the Horizontal Plan UI with the underlying supply/demand data stored in the planning tables. The package header comment, retained from an early revision ($Header: MSCXHZUB.pls 120.2), states explicitly that its principal routine must update MSC_SUP_DEM_ENTRIES with updated values flowing from MSC_HZ_UI_LINES.
The package therefore acts as the persistence bridge between the ephemeral, session-based UI edit buffer and the durable supply/demand records that planning engines consume. It performs delta-based reconciliation rather than wholesale replacement, preserving the integrity of the plan while honoring manual planner overrides.
Key Procedures and Functions
ETRM documents a single program unit in this package body: UPDATE_SUPDEM_ENTRIES.
- UPDATE_SUPDEM_ENTRIES — The core reconciliation routine. Per the embedded documentation comment, it executes a three-stage algorithm. First, using the supplied query identifier, it selects rows from MSC_HZ_UI_LINES where an updated quantity bucket differs from the previously stored quantity, i.e. conditions of the form qty_bucket(X) <> old_qty(X). Second, for each delta value identified, it locates the corresponding transaction identifiers in MSC_SUP_DEM_ENTRIES, ordering candidates by quantity and creation date so that allocation is deterministic. Third, it applies the delta to those entries, increasing or reducing supply/demand quantities as appropriate. The routine exposes an OUT error message parameter and an IN query identifier parameter; planners familiar with the source refer to the internal insert_rec flag variable, which is one of the procedural control variables (alongside proceed) used within the routine's declarative section to govern row-level processing during the reconciliation loop.
No other public procedures or functions are documented for this package body.
Tables Accessed
The package reads and writes a broad set of MSC planning and trading-partner tables through APPS synonyms:
- MSC_HZ_UI_LINES and MSC_HZ_UI_HEADERS — the horizontal plan UI line and header staging tables holding planner-entered quantities; the source of delta values.
- MSC_SUP_DEM_ENTRIES and MSC_SUP_DEM_ENTRIES_S — the primary supply/demand entries updated by the routine.
- MSC_ITEMS, MSC_SYSTEM_ITEMS, MSC_ITEM_CUSTOMERS, MSC_ITEM_SUPPLIERS — item and sourcing context used to resolve entries.
- MSC_TRADING_PARTNERS, MSC_TRADING_PARTNER_MAPS, MSC_COMPANY_RELATIONSHIPS — trading-partner and organization relationship lookups for demand/supply attribution.
- MSC_CALENDAR_DATES, MSC_CAL_WEEK_START_DATES, MSC_PERIOD_START_DATES — calendar mapping needed to translate the WEEK_BUCKET and MONTH_BUCKET constants into date ranges.
- MSC_CL_REFRESH_S — collection/refresh sequence control.
Usage Notes
MSC_X_HZ_UPDATE is an internal utility rather than a published public API; ETRM records zero packages referencing it, and it is not intended for direct invocation by customer code. It is invoked from the Horizontal Plan UI flow (Oracle Advanced Supply Chain Planning) when a planner saves edited quantities, and it may also be called from related MSC concurrent or refresh logic that persists UI edits. The internal insert_rec control flag governs conditional insert-versus-update behavior during delta application. Because it bypasses standard public APIs and writes directly to MSC_SUP_DEM_ENTRIES, it should be treated as version-specific and upgrade-sensitive; customizations should not depend on its signature, and any direct calls risk data inconsistency if the expected query identifier context or UI staging rows are absent.
-
APPS.MSC_X_HZ_UPDATE SQL Statements
12.2.2
-
APPS.MSC_X_HZ_UPDATE SQL Statements
12.1.1
-
PACKAGE BODY: APPS.MSC_X_HZ_UPDATE
12.2.2
-
PACKAGE BODY: APPS.MSC_X_HZ_UPDATE
12.1.1
-
APPS.GMS_BUDG_CONT_SETUP SQL Statements
12.1.1
-
APPS.GMS_BUDG_CONT_SETUP SQL Statements
12.2.2
-
APPS.FA_MC_UPG3_PKG SQL Statements
12.2.2
-
APPS.FA_MC_UPG3_PKG SQL Statements
12.1.1
-
PACKAGE: APPS.GML_PO_INTERFACE
12.1.1
-
PACKAGE: APPS.GML_PO_INTERFACE
12.2.2
-
PACKAGE: APPS.PQH_DE_OPERATION
12.1.1
-
PACKAGE: APPS.GMS_BUDG_CONT_SETUP
12.2.2
-
PACKAGE: APPS.PQH_DE_OPERATION
12.2.2
-
PACKAGE: APPS.GMS_BUDG_CONT_SETUP
12.1.1
-
PACKAGE BODY: APPS.GMS_BUDG_CONT_SETUP
12.2.2
-
PACKAGE BODY: APPS.GMS_BUDG_CONT_SETUP
12.1.1
-
PACKAGE: APPS.FA_MC_UPG3_PKG
12.2.2
-
PACKAGE: APPS.FA_MC_UPG3_PKG
12.1.1
-
APPS.PQH_DE_OPERATION SQL Statements
12.2.2
-
APPS.GML_PO_INTERFACE SQL Statements
12.1.1
-
APPS.GML_PO_INTERFACE SQL Statements
12.2.2
-
APPS.PQH_DE_OPERATION SQL Statements
12.1.1
-
PACKAGE BODY: APPS.FA_MC_UPG3_PKG
12.2.2
-
PACKAGE BODY: APPS.FA_MC_UPG3_PKG
12.1.1
-
PACKAGE BODY: APPS.GML_PO_INTERFACE
12.2.2
-
PACKAGE BODY: APPS.GML_PO_INTERFACE
12.1.1
-
PACKAGE BODY: APPS.PQH_DE_OPERATION
12.1.1
-
PACKAGE BODY: APPS.PQH_DE_OPERATION
12.2.2
-
APPS.AMW_LOAD_PROC_DATA SQL Statements
12.1.1
-
APPS.GML_PO_INTERFACE dependencies on GML_PO_INTERFACE
12.2.2
-
APPS.GML_PO_INTERFACE dependencies on GML_PO_INTERFACE
12.1.1
-
APPS.GMS_BUDG_CONT_SETUP dependencies on FND_PROFILE
12.2.2
-
APPS.GMS_BUDG_CONT_SETUP dependencies on FND_PROFILE
12.1.1
-
APPS.GMS_BUDG_CONT_SETUP dependencies on FND_GLOBAL
12.1.1
-
APPS.GMS_BUDG_CONT_SETUP dependencies on FND_GLOBAL
12.2.2
-
APPS.PQH_DE_OPERATION dependencies on PQH_DE_OPERATION
12.2.2
-
APPS.PQH_DE_OPERATION dependencies on PQH_DE_OPERATION
12.1.1
-
APPS.FA_MC_UPG3_PKG dependencies on FA_SRVR_MSG
12.2.2
-
APPS.FA_MC_UPG3_PKG dependencies on APP_EXCEPTION
12.1.1
-
APPS.FA_MC_UPG3_PKG dependencies on FA_SRVR_MSG
12.1.1
-
APPS.FA_MC_UPG3_PKG dependencies on APP_EXCEPTION
12.2.2
-
APPS.FA_MC_UPG3_PKG dependencies on FA_MC_UPG3_PKG
12.1.1
-
APPS.FA_MC_UPG3_PKG dependencies on FA_MC_UPG3_PKG
12.2.2
-
APPS.FA_MC_UPG3_PKG dependencies on GL_INTERFACE
12.1.1
-
APPS.FA_MC_UPG3_PKG dependencies on GL_INTERFACE
12.2.2
-
PACKAGE BODY: APPS.AMW_LOAD_PROC_DATA
12.1.1
-
APPS.AMW_LOAD_PROC_DATA dependencies on FND_FILE
12.1.1