Search Results ss_date




Overview

APPS.MTL_SAFETY_STOCKS_PKG is a server-side PL/SQL package in Oracle E-Business Suite (12.1.1 and 12.2.2) that maintains safety stock definitions for inventory items within Oracle Inventory. Safety stock represents a buffer quantity held to absorb demand variability and supply uncertainty, and it is used by planning and replenishment processes. This package provides the programmatic and batch interfaces used to create, regenerate, and delete safety stock records for a specified organization, item, and selection scheme. Its operational focus is broad: supporting the Oracle-defined safety stock "code" selection schemes (for example, fixed quantity and forecast-, category-, or calendar-driven calculations), computing the appropriate safety stock value, and writing the resulting rows to the MTL_SAFETY_STOCKS table. The package also contains a project/task validation helper and a debug logging utility used internally to trace execution.

Key Procedures and Functions

  • SAFETYSTOCK — The primary entry point. It accepts the organization, item, selection scheme, forecast designation, category set, and related driving parameters, and drives the generation or maintenance of safety stock for the targeted scope. It coordinates the remaining routines.
  • INIT — An initialization routine that establishes the working context, such as validating inputs and preparing collection or staging structures prior to calculation.
  • MAIN — The controlling driver that orchestrates the overall safety stock processing flow across the selected items and calculation method.
  • CALSF — The calculation routine that derives the safety stock quantity for the applicable selection scheme, typically using forecast demand, calendar, or category data.
  • INSERT_SAFETY_STOCKS — The write routine that inserts (or re-establishes) the computed safety stock rows into MTL_SAFETY_STOCKS with the associated effectivity date.

Two additional helpers appear in the source but are not part of the documented procedure list: the function check_project_task, which returns TRUE when an effectivity-dated safety stock record exists for the item/organization combination with a non-null project or task, and the local procedure println, which writes truncated debug messages to the concurrent log via FND_FILE. The package header carries no meaningful signature beyond these routines and is not referenced by any other package, so it is effectively a standalone utility object rather than a shared dependency.

Tables Accessed

Usage Notes

The package is invoked from the Inventory safety stock maintenance form and from batch or concurrent processing where safety stocks are regenerated across a selected item range. Because it is an OTHER-classified package with no dependents, it is generally called directly by application logic or custom extension code rather than through a documented public API. The effectivity date (referred to informally as ss_date in query context) is the pivot point: existing records are matched on effectivity date, and check_project_task tests existence at or after a supplied effectivity date. Custom code invoking this package should respect item and organization validation and the caller's responsibility for committing inserts.