Search Results disable_trace




Overview

MSC_ATP_PUB is a public PL/SQL package in the Oracle E-Business Suite Advanced Supply Chain Planning (ASCP) module. Its principal business function is to expose the Available-to-Promise (ATP) calculation engine to external callers, most notably Oracle Order Management and backlog scheduling processes. The package body (script MSCEATPB.pls, version 120.15) provides a controlled entry point through which callers submit an ATP record and receive scheduling results, without requiring them to interact directly with the underlying planning engine interface MRP_ATP_PUB.

The package is classified as a PUB (public) API under the APPS schema, meaning its procedures form a supported integration surface for both Oracle-authored and customer-written code. A significant design characteristic, documented in the package header comments, is the deliberate split between Call_ATP and Call_ATP_No_Commit: the former behaves as an autonomous transaction that commits, while the latter performs the same processing without committing, leaving transaction control to the caller. To simplify maintenance, Call_ATP internally invokes Call_ATP_No_Commit and then issues the commit.

Key Procedures and Functions

  • CALL_ATP — The primary public entry point used by Order Management and other callers requiring the ATP result to be persisted immediately. It delegates processing to CALL_ATP_NO_COMMIT and then performs a commit, effectively operating as an autonomous transaction.
  • CALL_ATP_NO_COMMIT — The processing core invoked by backlog scheduling and by CALL_ATP itself. It executes the ATP logic and returns results without committing, allowing the invoking transaction to retain control over unit-of-work boundaries.
  • UPDATE_TABLES — The documented routine responsible for persisting or refreshing the working data sets produced during ATP processing.

Internally, the body also defines Check_CTO, which is now a null stub following the CTO rearchitecture project, and Update_Custom_Information, which writes caller-supplied attribute data against the ATP record. These are not part of the documented public interface. Debug tracing is governed by the MSC_ATP_DEBUG profile option through the PG_DEBUG flag, and the INV_CTP profile is read at package initialization.

Tables Accessed

The package reads and writes a mixture of transactional staging tables and planning reference data through APPS synonyms. The staging and result tables — MRP_ATP_DETAILS_TEMP, MRP_ATP_SCHEDULE_TEMP, MSC_ATP_SRC_PROFILE_TEMP, MSC_OE_DATA_TEMP, MSC_REGIONS_TEMP and MSC_DEMANDS — hold the ATP input/output records and source profile resolution during a calculation. Supply and demand context is drawn from MSC_SUPPLIES, MSC_ALLOC_SUPPLIES, MSC_ALLOC_DEMANDS, MSC_RESOURCE_REQUIREMENTS and MSC_PLANS, which provide the planning engine's view of availability, allocations and capacity. MSC_APPS_INSTANCES is used to resolve the target application instance (the body constants NO_APS_INSTANCE and PROF_TBL_NOT_IN_SYNC govern error reporting when no instance is found or source profiles are out of synchronization). Reference data includes FND_USER for session and user context, HZ_CUST_ACCOUNT_ROLES for customer role resolution, and MRP_AP_REFRESH_S for planning refresh state.

Usage Notes

MSC_ATP_PUB is referenced by seven other packages and is typically invoked indirectly. Oracle Order Management calls CALL_ATP during order line scheduling, while backlog scheduling calls CALL_ATP_NO_COMMIT so that the broader scheduling transaction controls commit semantics. Custom code integrating with ATP should follow the same convention: use CALL_ATP_NO_COMMIT when the ATP call must participate in an existing transaction, and CALL_ATP only when an immediate, independent commit is acceptable. Because several underlying tables are temporary staging structures named with a _TEMP suffix, callers should not assume their contents persist beyond the current transaction.