Search Results insert_sd_into_details_temp
Overview
MSC_ATP_PF is an Oracle E-Business Suite PL/SQL package owned by the APPS schema and classified as an OTHER API within the ETRM repository. Its name reflects its purpose: "PF" stands for Promising Functionality, the Oracle Advanced Supply Chain Planning (ASCP) and Global Order Promising (GOP) capability that determines how available-to-promise (ATP) and available-to-promise-with-capacity quantities are allocated and consumed across a planning horizon. The package header is declared with AUTHID CURRENT_USER, meaning it executes with the privileges of the calling schema rather than the definer, a design choice consistent with internal planning engine components that are invoked from within the ASCP/GOP runtime stack.
The package provides the low-level machinery for bucketed demand and supply processing. It handles the consumption of ATP against demands, the rolling forward and backward of availability, the allocation and pre-allocation of supplies to demands, and the construction of detail and summary records that feed the Promising results. Constants defined at the top of the specification identify the supported consumption modes — Backward, Forward, Cum, Bw_Fw_Cum, and Bw_Fw — as well as the profile-driven setup options (Demand_Priority, User_Defined_DC, User_Defined_CC) and the date types MADT and MASDDT. A record type, Bucketed_Demands_Rec, structures the paired memory (mem_) and promising (pf_) bucket fields used throughout the procedures.
Key Procedures and Functions
The documented API contains 35 procedures and functions. The bucketed demand operations form the core:
- ADD_PF_BUCKETED_DEMANDS — inserts new bucketed demand records for a given plan, parent demand, and refresh cycle.
- UPDATE_PF_BUCKETED_DEMANDS — modifies existing bucket quantities when demand, ATF, or demand-date quantities change.
- INCREMENT_BUCKETED_DEMANDS_QTY — increments quantity values on existing buckets based on the passed ATP record.
- MOVE_PF_BUCKETED_DEMANDS — relocates demand quantities from one bucket date to another, including a backward-pass ATF quantity (introduced for bug 3397904).
- FIND_PF_BUCKETED_DEMANDS — retrieves bucketed demand data for a plan and parent demand.
Supply-side and rollup operations include ADD_PF_ROLLUP_SUPPLIES and UPDATE_PF_ROLLUP_SUPPLIES, which build and maintain rolled-up supply records, and ADD_PF_STEALING_SUPPLY_DETAILS, which records supply-stealing details when availability is reallocated. Availability calculation is handled by GET_MAT_AVAIL_PF and GET_MAT_AVAIL_PF_DTLS, which return material availability at summary and detail levels respectively. Forward-looking variants are provided by GET_FORWARD_MAT_PF and GET_FORWARD_MAT_PF_SUMM.
Allocation and pre-allocation are governed by SET_ALLOC_RULE_VARIABLES, which initialises allocation rule context, and by the families ITEM_ALLOC_AVAIL_PF, ITEM_ALLOC_AVAIL_PF_UNALLOC, ITEM_ALLOC_AVAIL_PF_DTLS, ITEM_PREALLOC_AVAIL_PF, ITEM_PREALLOC_AVAIL_PF_SUMM, and ITEM_PREALLOC_AVAIL_PF_DTLS, which compute allocated and unallocated availability at item level. INSERT_SD_INTO_DETAILS_TEMP populates a temporary staging structure with supply/demand detail.
Tables Accessed
The package references APPS synonyms for several planning and promising tables. Demand and supply data are read from and written to MSC_DEMANDS, MSC_ALLOC_DEMANDS, and MSC_ALLOC_SUPPLIES. Temporary working storage is provided by MSC_ALLOC_TEMP, MSC_ALLOC_HIERARCHY_TEMP, MSC_ATP_DETAILS_TEMP, MSC_ATP_SD_DETAILS_TEMP, and MRP_ATP_DETAILS_TEMP. Configuration and rule definitions come from MSC_ATP_PARAMETERS and MSC_ATP_RULES. Summary output is persisted to MSC_ATP_SUMMARY_SD and MSC_ATP_SUMMARY_SO. Calendar bucketing relies on MSC_CALENDAR_DATES, and item designator attributes are drawn from MSC_DESIGNATORS. Two FND tables — FND_ORACLE_USERID and FND_PRODUCT_INSTALLATIONS — are referenced, likely for installation and user-context checks.
Usage Notes
MSC_ATP_PF is an internal planning-engine package rather than an end-user API. It is invoked by the ASCP/GOP runtime during the promising computation cycle, typically through the memory-based planner launched from concurrent programs such as the Planner or the ATP/Planning Manager. The "single agent doce3" search context suggests use in a distributed or multi-agent planning deployment, where individual planning agents invoke the promising logic for their assigned plans. The package is referenced by nine other packages, confirming its role as a shared service layer. Custom code should not call these procedures directly because they depend on transient temp-table state and plan context established by the planning engine; developers integrating with promising should use the supported MRP_ATP_PVT interfaces instead. The header revision ($Header: MSCPFATS.pls 120.1, dated 2007) indicates it has remained stable across 12.1.1 and 12.2.x releases.
-
APPS.MSC_ATP_PF SQL Statements
12.1.1
-
APPS.MSC_ATP_PF SQL Statements
12.2.2
-
PACKAGE: APPS.MSC_ATP_PF
12.1.1
-
PACKAGE: APPS.MSC_ATP_PF
12.2.2
-
APPS.MSC_ATP_ALLOC SQL Statements
12.1.1
-
PACKAGE BODY: APPS.MSC_ATP_PF
12.2.2
-
APPS.MSC_ATP_ALLOC SQL Statements
12.2.2
-
PACKAGE BODY: APPS.MSC_ATP_PF
12.1.1
-
APPS.MSC_ATP_PF dependencies on MSC_SCH_WB
12.2.2
-
APPS.MSC_ATP_PF dependencies on MSC_SCH_WB
12.1.1
-
APPS.MSC_ATP_ALLOC dependencies on FND_API
12.1.1
-
APPS.MSC_ATP_ALLOC dependencies on FND_API
12.2.2
-
PACKAGE BODY: APPS.MSC_ATP_ALLOC
12.1.1
-
PACKAGE BODY: APPS.MSC_ATP_ALLOC
12.2.2
-
APPS.MSC_ATP_DB_UTILS SQL Statements
12.1.1
-
APPS.MSC_ATP_PF dependencies on MRP_ATP_PUB
12.1.1
-
APPS.MSC_ATP_PF dependencies on MRP_ATP_PUB
12.2.2
-
APPS.MSC_ATP_PF dependencies on FND_API
12.2.2
-
APPS.MSC_ATP_PF dependencies on FND_API
12.1.1
-
APPS.MSC_ATP_DB_UTILS SQL Statements
12.2.2
-
APPS.MSC_ATP_ALLOC dependencies on MSC_SCH_WB
12.1.1
-
APPS.MSC_ATP_ALLOC dependencies on MSC_SCH_WB
12.2.2
-
APPS.MSC_POST_PRO SQL Statements
12.1.1
-
APPS.MSC_POST_PRO 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
-
PACKAGE BODY: APPS.MSC_POST_PRO
12.1.1
-
PACKAGE BODY: APPS.MSC_POST_PRO
12.2.2