Search Results trim_mast




Overview

MRP_ATP_UTILS is a public PL/SQL package body in the APPS schema that supports Oracle E-Business Suite's Available-to-Promise (ATP) functionality within the Material Requirements Planning (MRP) and Advanced Supply Chain Planning (ASCP) product family. In Oracle EBS 12.1.1 and 12.2.2, the package acts as a functional wrapper and utility layer, delegating core processing to the MSC_ATP_UTILS package while providing ATP-specific entry points invoked from external callers. Its primary responsibilities include staging ATP request and response data through temporary tables, orchestrating calls to ATP calculation logic, and managing the persistence of scheduling results through the EXTEND_MAST and TRIM_MAST routines. The package is typically referenced from concurrent programs, OAF pages, and other ATP-related APIs within the supply chain planning suite. As the source header (MRPUATPB.pls, version 115.39) indicates, it has evolved substantially across release levels, with the package retained largely intact through the 12.x code line.

Key Procedures and Functions

The documented public interface exposes six routines. Several are thin wrappers around MSC_ATP_UTILS, whereas EXTEND_MAST and TRIM_MAST manage the temporary table image used for ATP scheduling. The user search term "trim_mast" corresponds directly to the TRIM_MAST procedure, which trims or removes rows from the master staging table after ATP processing completes, preventing stale data from persisting between calls.

  • PUT_INTO_TEMP_TABLE — Loads an ATP record, supply/demand, period, and detail structures into a temporary staging table keyed by session identifier. It iterates over the supplied record types and persists them via a delegated call to MSC_ATP_UTILS. It returns the standard FND_API return status, message data, and message count.
  • GET_FROM_TEMP_TABLE — Retrieves the stored ATP structures from the temporary table for the given session, returning them through OUT parameters. It is the complement to PUT_INTO_TEMP_TABLE and is called when results need to be re-read from the staging area.
  • CALL_ATP_11 — Invokes the core ATP calculation logic (the "11" suffix denotes the ATP 11i-lineage engine). It takes a group identifier to scope the calculation run and is the entry point for material availability checks.
  • EXTEND_MAST — Extends the master staging data, typically by duplicating or replicating rows across additional time buckets or session ranges to support multi-period ATP analysis.
  • TRIM_MAST — Trims the master staging data, deleting rows that are no longer required after scheduling completes. This is the routine associated with the "trim_mast" search term and is important for housekeeping of the temporary table used during ATP.
  • TEST — A diagnostic or smoke-test entry point used to validate package installation and basic behavior.

Tables Accessed

The documented table reference for this package is PLITBLM, referenced through an APPS synonym. PLITBLM is a temporary/master staging table used by the ATP and planning engine to hold PL/SQL index-by-table image data between calls. It is written by PUT_INTO_TEMP_TABLE and read by GET_FROM_TEMP_TABLE. EXTEND_MAST and TRIM_MAST operate against this same staging structure to grow or shrink the persisted image as the ATP window changes. Because the table is session-scoped, callers must pass a valid session identifier to keep concurrent ATP requests isolated from one another.

Usage Notes

In practice, MRP_ATP_UTILS is not invoked directly by end users. It is called by other PL/SQL packages (the metadata notes it is referenced by one other package), by ATP-related concurrent programs, and by the supply chain planning forms and OAF pages that request availability. A typical invocation sequence is: PUT_INTO_TEMP_TABLE to stage inputs, CALL_ATP_11 to run the check, GET_FROM_TEMP_TABLE to read results, and TRIM_MAST to clean up. Debugging output is controlled by the MSC_ATP_DEBUG profile option; when set to 'Y' or 'C', diagnostic messages are written through msc_sch_wb.atp_debug. Errors are surfaced via the standard FND_API return status and message data, with a 100-character SQLERRM truncation. Customizations or extensions should be handled by wrapping these public procedures rather than modifying the package body, since the source is shipped and versioned with patch sets across 12.1.1 and 12.2.2.