Search Results calc_lead_time




Overview

GMP_LEAD_TIME_CALCULATOR_PKG is an Oracle EBS Process Manufacturing (OPM) utility package owned by the APPS schema. Its principal business function is to derive and populate manufacturing lead times for process inventory items by combining routing definitions, operation and resource data, and plant calendar availability. Lead time is a foundational input for planning, capacity evaluation, and scheduling in the process manufacturing environment, and this package provides the calculation engine that converts routing and calendar structures into usable time-based values.

The package is declared AUTHID CURRENT_USER, meaning its SQL executes with the privileges of the invoking schema rather than the definer. It is classified under the ETRM API classification "OTHER," indicating it is an internal utility rather than a formally published open interface. The header comment reflects a header revision of 120.1.12010000.1 (2008/07/30), and the source contains clear evidence of an Inventory convergence refactor, in which organization code and item number parameters were replaced by internal organization and item identifiers.

Key Procedures and Functions

  • CALCULATE_LEAD_TIMES — The primary driver procedure. It accepts standard concurrent program OUT parameters (errbuf, retcode) and processing scope parameters. Following the Inventory convergence refactor, the legacy organization code and item number parameters were replaced with numeric identifiers: p_from_orgn, p_to_orgn, p_from_item_id, and p_to_item_id. This is the procedure associated with the user search term "p_from_item_id," which denotes the starting inventory item identifier for the calculation range.
  • CALC_LEAD_TIME — Performs lead time calculation for a single routing, driven by p_routing_id.
  • LOG_MESSAGE — Writes a caller-supplied message (pbuff) to the package's logging mechanism, supporting diagnostics during long-running calculations.
  • TIME_STAMP — Records a point-in-time marker, typically used to time or trace execution stages.
  • GET_AVG_WORKING_HOURS — A function added to return the average working hours for a given calendar code (p_calendar_code), supporting calendar-aware lead time computation.

Tables Accessed

The package reads from a broad set of OPM and Oracle Manufacturing tables via APPS synonyms:

Usage Notes

This package is typically invoked as a concurrent program, evidenced by the errbuf and retcode OUT parameters on CALCULATE_LEAD_TIMES, which follow the standard Oracle EBS concurrent manager signature. It is commonly scheduled or run on demand to recalculate lead times across a range of organizations and items defined by p_from_orgn, p_to_orgn, p_from_item_id, and p_to_item_id. The p_from_item_id parameter specifically bounds the low end of the item selection range.

The package is referenced by zero other packages according to the documented metadata, indicating it is a terminal utility rather than a shared library dependency. Custom code may call CALC_LEAD_TIME directly for single-routing recalculation, or GET_AVG_WORKING_HOURS to obtain calendar-based working-hour averages. Because processing is organization- and item-scoped, large ranges should be scheduled during off-peak windows to avoid contention on the referenced OPM and manufacturing tables.