Search Results get_unalloc_data_from_sd_temp




Overview

The APPS.MSC_AATP_PROC package is a member of the Oracle Advanced Supply Chain Planning (ASCP) ATP processing infrastructure within Oracle E-Business Suite 12.1.1 and 12.2.2. Its header, tagged with the revision marker MSCPAATS.pls 120.1, identifies the object as a procedure-only PL/SQL specification (no function bodies) owned by the APPS schema and classified under ETRM as API classification "OTHER." The package encapsulates the arithmetic and adjustment logic used to manipulate available-to-promise (ATP) quantities during planning and order promising. It operates on the two canonical ATP structures defined in the planning schema: MRP_ATP_PVT.ATP_Info (the internal ATP record) and MRP_ATP_PUB collections (the period and quantity arrays exposed by the public ATP layer). Together these procedures consolidate, forward-consume, net out negative values, and load unallocated ATP data from a staging table into the working ATP record.

Key Procedures and Functions

Five procedures are documented in the package specification:

  • ADD_TO_CURRENT_ATP — Merges a "steal" ATP record into the current ATP record, accepting both MRP_ATP_PVT.ATP_Info parameters as IN OUT NOCOPY and returning a status code. It is the mechanism by which ATP quantities sourced from an alternate supply or substitute are folded into the primary ATP picture.
  • ATP_FORWARD_CONSUME — Consumes ATP across time by walking the period array (MRP_ATP_PUB.date_arr) from an effective ATF date forward, adjusting the quantity array (MRP_ATP_PUB.number_arr) in place. This supports forward consumption logic in which demand in one bucket reduces availability in later buckets.
  • ATP_ADJUSTED_CUM — Recomputes a cumulative ATP figure by combining a current ATP record with an unallocated ATP record, both passed as MRP_ATP_PVT.ATP_Info IN OUT NOCOPY parameters. It is used to reconcile cumulative availability after allocation and de-allocation events.
  • ATP_REMOVE_NEGATIVES — Iterates the ATP quantity array and eliminates negative values, returning a status code. Removing negatives prevents invalid availability from propagating into downstream promising calculations.
  • GET_UNALLOC_DATA_FROM_SD_TEMP — Loads unallocated ATP data from the supply/demand temporary staging area into the p_unallocated_atp record and returns the corresponding period array via x_atp_period (type MRP_ATP_PUB.ATP_Period_Typ).

Each procedure returns an x_return_status output, allowing callers to test success or failure consistently across the ATP chain.

Tables Accessed

The documented table references are MSC_ATP_SD_DETAILS_TEMP and PLITBLM. MSC_ATP_SD_DETAILS_TEMP is the supply/demand detail staging table that holds pre-computed ATP records prior to consolidation; GET_UNALLOC_DATA_FROM_SD_TEMP reads it to populate unallocated ATP. PLITBLM is the standard Oracle Applications "PL/SQL Index-by Table Bugfix Monitor" table used for server-side updates and array fetching, indicating the package relies on indexed table operations when materializing period data. All other inputs and outputs flow through the MRP_ATP public and private record types rather than persistent tables.

Usage Notes

MSC_AATP_PROC is referenced by three other packages in the APPS schema and is not intended for direct ad hoc execution. It is invoked as an internal helper within ATP workflows — typically from forms-level order promising code, from ASCP concurrent programs that compute availability, and from custom extensions that need to adjust ATP records. The temporary-table dependency means callers must ensure that MSC_ATP_SD_DETAILS_TEMP is populated for the current planning session before calling GET_UNALLOC_DATA_FROM_SD_TEMP. Because all parameters use NOCOPY semantics, calling code must treat the IN OUT structures as mutable and expect rejection of records containing negatives unless ATP_REMOVE_NEGATIVES is executed first. The absence of documented grants or public-function bodies reinforces that the package is a private implementation layer beneath the published ATP APIs.