Search Results undo_delete_summary_row
Overview
MSC_ATP_DB_UTILS is a private utility package body in the Oracle E-Business Suite Advanced Supply Chain Planning (ASCP) and Available-to-Promise (ATP) product family. It provides the low-level database access layer that supports ATP demand and supply processing within the MSC schema, primarily against the temporary staging tables used during ATP and planning computations. The package encapsulates row-level operations for material demands, planned orders, resource demands, pegging records, and summary demand rows, allowing the higher-level ATP engine routines to manipulate planning data without embedding direct SQL throughout the application logic. The header comment (revision 120.9.12010000.3, dated 2008/09/22) identifies it as shipping with the core ASCP/ATP codebase and subject to Oracle internal revision control. Package initialization derives runtime behavior from profile options: PG_DEBUG is set from the MSC_ATP_DEBUG profile and G_ORIG_INV_CTP from INV_CTP (per Bug 3295831), while the package-level variable PG_CLEAR_SD_DETAILS_TEMP is used as a performance optimization to avoid a redundant delete operation when Clear_SD_Details_Temp has already executed. The package is loaded on APPS and is on the dependency chain of six other packages, confirming its role as a shared infrastructure component rather than a callable public API.
Key Procedures and Functions
The package exposes 29 documented procedures and functions. The principal demand and supply routines include ADD_MAT_DEMAND, which inserts a material demand row derived from an MRP_ATP_PVT.AtpRec record and returns the generated demand identifier; ADD_RESOURCE_DEMAND, which records resource requirement rows; and ADD_PLANNED_ORDER, which creates planned order supply records. The companion routines UPDATE_PLANNED_ORDER and ADD_STEALING_SUPPLY_DETAILS modify planned order and supply-detail information respectively. Pegging maintenance is handled by ADD_PEGGING, UPDATE_PEGGING, and DELETE_PEGGING. Summary and detail management procedures include INSERT_SUMMARY_SD_ROW, UPDATE_PLAN_SUMMARY_ROW, UNDO_PLAN_SUMMARY_ROW, DELETE_SUMMARY_ROW, and the internal UNDO_DELETE_SUMMARY_ROW (a private declaration associated with change 5357370). Temporary staging operations are performed by CLEAR_SD_DETAILS_TEMP, MOVE_SD_TEMP_INTO_MRP_DETAILS, REMOVE_INVALID_SD_REC, and REMOVE_INVALID_FUTURE_SD. Row and date maintenance is provided by DELETE_ROW, UNDO_DELETE_ROW, UPDATE_SD_DATE, and DELETE_COPY_DEMAND. Several routines, including ADD_MAT_DEMAND and UPDATE_PLANNED_ORDER, are commonly targeted by developers for customization and debugging, which explains their frequent appearance in support and search queries.
Tables Accessed
The package reads and writes a defined set of ASCP/ATP and Oracle Applications tables through APPS synonyms. Staging and detail tables include MRP_ATP_DETAILS_TEMP, MSC_ATP_SD_DETAILS_TEMP, MSC_ATP_SUMMARY_SD, and MSC_ATP_SUMMARY_SO; these support temporary demand and supply storage and summarized ATP results. Core planning tables include MSC_DEMANDS and MSC_DEMANDS_S (demand records), MSC_ALLOC_DEMANDS and MSC_ALLOC_SUPPLIES (allocation results), MSC_FULL_PEGGING_S (pegging relationships), MSC_RESOURCE_REQUIREMENTS, and MSC_PLANS. Calendar-driven date logic relies on MSC_CALENDAR_DATES. Configuration and identity data are drawn from MSC_ATP_RULES (ATP processing rules), MSC_APPS_INSTANCES, and FND_PRODUCT_INSTALLATIONS. The naming pattern indicates that the package operates almost exclusively within the MSC schema plus standard FND lookups.
Usage Notes
MSC_ATP_DB_UTILS is not intended for direct invocation by end users. It is called internally by the ATP and planning engine packages, concurrent programs such as ATP processing and plan generation, and related workbench utilities. Because it is a package body of private utility routines, custom code should not depend on it directly; instead, developers should use supported public APIs such as MRP_ATP_PVT. When debugging ATP or planned order issues on 12.1.1 or 12.2.2, enabling the MSC_ATP_DEBUG profile to Y or C produces diagnostic output through MSC_SCH_WB.ATP_DEBUG, as illustrated by the Add_Mat_Demand trace logic. Any modification of this package invalidates dependent objects and must be validated against the six documented referencing packages.
-
APPS.MSC_ATP_DB_UTILS SQL Statements
12.1.1
-
APPS.MSC_ATP_DB_UTILS SQL Statements
12.2.2
-
PACKAGE BODY: APPS.MSC_ATP_DB_UTILS
12.1.1
-
PACKAGE BODY: APPS.MSC_ATP_DB_UTILS
12.2.2
-
APPS.MSC_ATP_DB_UTILS dependencies on MSC_SCH_WB
12.1.1
-
APPS.MSC_ATP_DB_UTILS dependencies on FND_PROFILE
12.1.1
-
APPS.MSC_ATP_DB_UTILS dependencies on MSC_SCH_WB
12.2.2
-
APPS.MSC_ATP_DB_UTILS dependencies on MSC_ATP_SUMMARY_SO
12.1.1
-
APPS.MSC_ATP_DB_UTILS dependencies on MSC_ATP_SUMMARY_SO
12.2.2
-
APPS.MSC_ATP_DB_UTILS dependencies on FND_GLOBAL
12.2.2
-
APPS.MSC_ATP_DB_UTILS dependencies on FND_GLOBAL
12.1.1
-
APPS.MSC_ATP_DB_UTILS dependencies on FND_PROFILE
12.2.2
-
APPS.MSC_ATP_DB_UTILS dependencies on MSC_ATP_DB_UTILS
12.1.1