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:

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.