Search Results insert_safety_stocks




Overview

MTL_SAFETY_STOCKS_PKG is an Oracle EBS PL/SQL package owned by the APPS schema that provides the core logic for calculating, populating, and maintaining safety stock levels within Oracle Inventory and Oracle Planning. Safety stock represents a buffer quantity held to absorb demand and supply variability, and this package encapsulates the business rules that translate item, category, and calendar information into materialized safety stock records. The package carries an API classification of OTHER under ETRM 12.2.2, indicating that it is an internal utility rather than a formally published public API. It is delivered in a VALID state and is composed of both a package specification and a package body.

Key Procedures and Functions

The documented package exposes five procedures and functions, named as follows:

  • SAFETYSTOCK — The principal entry point for safety stock processing. It orchestrates the overall calculation flow, driving the supporting routines and applying the safety stock logic to the applicable item population.
  • INIT — Performs initialization. This routine establishes working state, resets or seeds control variables, and prepares the environment before the main calculation runs.
  • MAIN — The main processing driver. It coordinates calibration, selection of qualifying items, and insertion of computed results, sequencing the subordinate routines.
  • INSERT_SAFETY_STOCKS — Writes the derived safety stock quantities into the MTL_SAFETY_STOCKS table, persisting the calculated levels for downstream planning and replenishment use.
  • CALSF — The calculation routine. It derives safety stock quantities based on the calendar and item inputs read from the referenced tables.

Parameter lists are not documented in the available metadata and are therefore not reproduced here.

Tables Accessed

The package references the following tables through APPS synonyms:

  • MTL_SAFETY_STOCKS — The primary target table, receiving the inserted and updated safety stock records.
  • MTL_SYSTEM_ITEMS — Source of item-level attributes used to identify and qualify items for safety stock treatment.
  • MTL_ITEM_CATEGORIES — Provides category assignments that can drive safety stock by category.
  • MTL_PARAMETERS — Supplies organization-level Inventory parameters and defaults.
  • BOM_CALENDAR_DATES, BOM_CAL_WEEK_START_DATES, BOM_PERIOD_START_DATES — Define the manufacturing and planning calendars, including week and period boundaries, used for time-phased safety stock calculations.
  • MRP_FORECAST_DATES, MRP_FORECAST_DESIGNATORS — Provide forecast dates and designators supporting demand-based safety stock derivation.
  • DUAL — Utilized for single-row computations and utility queries.

Usage Notes

This package is an internal utility rather than a public API. It is typically invoked from Oracle Inventory and Oracle Planning flows, including concurrent programs that generate or refresh safety stock, and from related forms or application logic. Dependency metadata shows the package references FND_PROFILE and SYS.STANDARD, and that it is self-referenced within the APPS schema; it is not referenced by any other documented package (referenced by 0 packages). Custom extensions should not call these procedures directly without validating behavior against the specific EBS release (12.1.1 or 12.2.2), since the routines are unsupported for direct external use.