Search Results truncate_date




Overview

GME_RESCHEDULE_BATCH_PVT is a private (PVT) PL/SQL package in the Oracle EBS Process Manufacturing (OPM) module. It belongs to the family of application program interfaces that manage batch scheduling and rescheduling within the GME schema. In discrete and process manufacturing environments, production batches are frequently subject to change after initial creation: resource availability shifts, workday calendars are updated, ingredient deliveries slip, or a planner manually adjusts the target start and end dates of a batch. The rescheduling logic that reconciles these changes across the batch header, the constituent batch steps, step activities, step resources, charges, and material details is encapsulated in this private API.

Because the package is classified as PVT rather than PUBLIC, it is intended as an internal implementation layer consumed by other EBS packages rather than as a directly callable extension point. The ETRM metadata records that it is referenced by eight other packages, confirming its role as a shared scheduling utility invoked by higher-level batch and process order functions.

Key Procedures and Functions

The package exposes two documented procedures.

  • RESCHEDULE_BATCH — The core routine. It accepts a batch header record, a workday calendar usage indicator, and a contiguity override flag. It recalculates the batch schedule and returns an updated batch header record along with a return status. The p_use_workday_cal parameter governs whether working-day calendar rules are applied when shifting dates, while p_contiguity_override controls whether batch steps must remain contiguous across the rescheduled window. This procedure is the primary entry point for date-shifting logic and propagates changes through the batch step hierarchy.
  • TRUNCATE_DATE — A supporting procedure that normalizes or truncates a supplied date value, optionally scoped to a specific batch step. Its purpose is to align date components (for example stripping time elements) consistently across the batch's step records so that downstream calculations operate on uniform date boundaries.

Both procedures return an x_return_status value, allowing callers to detect success or failure and to trap errors without unhandled exceptions propagating.

Tables Accessed

The package reads and writes a wide range of OPM and shared manufacturing tables via APPS synonyms. Central to its operation are GME_BATCH_HEADER and GME_BATCH_STEPS, which hold the batch-level and step-level schedule attributes it recalculates. Detailed step composition is drawn from GME_BATCH_STEP_ACTIVITIES, GME_BATCH_STEP_CHARGES, GME_BATCH_STEP_ITEMS, and GME_BATCH_STEP_RESOURCES. Material and resource movements are represented in GME_MATERIAL_DETAILS, GME_RESOURCE_TXNS, and GME_RESOURCE_TXNS_GTMP. Scheduling rules and validity windows come from GMD_RECIPE_VALIDITY_RULES, and status validation uses GMD_STATUS. Item references are validated against MTL_SYSTEM_ITEMS, and work-in-process ties are supported through WIP_ENTITIES. Utility access uses DUAL, and PLITBLM supports PL/SQL table handling.

Usage Notes

As a private package, GME_RESCHEDULE_BATCH_PVT is not intended for direct customer invocation. It is most commonly invoked indirectly when a user reschedules a batch through the OPM batch maintenance forms, or when a concurrent program performs bulk rescheduling across a range of batches. The referenced-by count of eight packages indicates that other OPM processing modules delegate their reschedule requirements to this API.

Custom code should avoid calling the package directly, since private APIs may change without notice between releases such as 12.1.1 and 12.2.2. Where custom rescheduling is required, developers should call the supported public APIs or the standard forms and concurrent programs that in turn invoke this private layer. Error handling should always inspect the returned status value.