Search Results delete_old_safety_stock
Overview
MSC_PUBLISH_SAFETY_STOCK_PKG is an Oracle Advanced Supply Chain Planning (ASCP) utility package that resides in the APPS schema and is delivered as part of the MSC (Material Planning / Supply Chain) module in Oracle E-Business Suite 12.1.1 and 12.2.2. Its principal business function is to publish calculated safety stock quantities from the planning server back into the operational data model so that safety stock levels determined during a planning run become visible to downstream collection, planning, and execution processes.
Safety stock represents a buffer quantity maintained to protect against demand variability and supply uncertainty. Within ASCP, these quantities are computed during the plan run and staged in plan-specific tables. When planning output must be exposed to the broader MSC planning schema, MSC_PUBLISH_SAFETY_STOCK_PKG is responsible for extracting the relevant safety stock values, resolving mandatory and optional attributes for each item/organization combination, and persisting the results into the appropriate MSC planning tables. The package is validated (Status: VALID) in the documented environments and is classified as an OTHER API type, indicating that it is an internal framework utility rather than a formally published open interface.
Key Procedures and Functions
The ETRM metadata documents eight procedures and functions within this package:
- PUBLISH_SAFETY_STOCKS — the primary driver procedure. It orchestrates the end-to-end publishing cycle for safety stock quantities, coordinating the retrieval, transformation, and insertion of data.
- GET_OPTIONAL_INFO — retrieves optional or supplementary attribute values associated with a safety stock record, such as descriptive or configuration-dependent information used when constructing the published row.
- GET_TOTAL_QTY — computes or returns the aggregate safety stock quantity for the item/organization context, likely summing across buckets, periods, or demand classes.
- INSERT_INTO_SUP_DEM — inserts safety stock records into the supply/demand structures (referenced through MSC_SUPPLIES). This is the write-path routine that materializes the published values.
- DELETE_OLD_SAFETY_STOCK — removes previously published safety stock rows so that the new publication does not duplicate or conflict with stale data.
- LOG_MESSAGE — writes diagnostic or status messages to the logging infrastructure during the publishing run.
- GET_MESSAGE — retrieves message text, typically resolving message names to localized strings via the FND message tables.
- GET_ORDER_TYPE — determines the order type classification applicable to a supply/demand record, used to categorize published safety stock entries correctly.
Tables Accessed
According to the dependency metadata, the package references the following APPS synonyms: FND_LOOKUP_VALUES, MSC_COMPANIES, MSC_COMPANY_SITES, MSC_SUPPLIES, MSC_SYSTEM_ITEMS, FND_APPLICATION, FND_LANGUAGES, FND_NEW_MESSAGES, MSC_APPS_INSTANCES, MSC_CALENDAR_DATES, MSC_CL_REFRESH_S, MSC_COMPANY_RELATIONSHIPS, MSC_DEMANDS, MSC_ITEMS, and MSC_ITEM_SUPPLIERS.
The core planning data resides in MSC_SUPPLIES and MSC_DEMANDS, where published safety stock rows are written. MSC_SYSTEM_ITEMS, MSC_ITEMS, and MSC_ITEM_SUPPLIERS provide item master and sourcing context. MSC_COMPANIES, MSC_COMPANY_SITES, and MSC_COMPANY_RELATIONSHIPS resolve the organization and inter-company hierarchy. MSC_CALENDAR_DATES and MSC_CL_REFRESH_S supply the calendar and refresh timestamps that govern when safety stock is valid. FND_LOOKUP_VALUES, FND_NEW_MESSAGES, FND_APPLICATION, and FND_LANGUAGES support lookup decoding, message resolution, and localization.
Usage Notes
MSC_PUBLISH_SAFETY_STOCK_PKG is an internal ASCP utility and is not exposed as an end-user API. It is typically invoked in one of three ways: from a concurrent program that runs immediately after the ASCP plan generation completes, from workflow logic within the planning engine that posts safety stock output back to the MSC schema, or from custom extensions that need to replicate the standard safety stock publishing behavior. Because the package is referenced by no other packages according to the metadata, it should be treated as a leaf-level utility; custom code may call it, but modifying it is not recommended. When invoked, callers should execute DELETE_OLD_SAFETY_STOCK or allow PUBLISH_SAFETY_STOCKS to manage cleanup, since stale rows will otherwise accumulate in MSC_SUPPLIES and inflate supply availability in subsequent plans. Deployment across 12.1.1 and 12.2.2 is consistent, though the Online Patching (adop) model in 12.2.2 requires standard patch cycle procedures when any change to the package body is applied.
-
PACKAGE: APPS.MSC_PUBLISH_SAFETY_STOCK_PKG
12.2.2
-
PACKAGE: APPS.MSC_PUBLISH_SAFETY_STOCK_PKG
12.1.1
-
APPS.MSC_PUBLISH_SAFETY_STOCK_PKG SQL Statements
12.1.1
-
APPS.MSC_PUBLISH_SAFETY_STOCK_PKG SQL Statements
12.2.2
-
PACKAGE BODY: APPS.MSC_PUBLISH_SAFETY_STOCK_PKG
12.1.1
-
PACKAGE BODY: APPS.MSC_PUBLISH_SAFETY_STOCK_PKG
12.2.2
-
APPS.MSC_PUBLISH_SAFETY_STOCK_PKG dependencies on FND_FILE
12.1.1
-
APPS.MSC_PUBLISH_SAFETY_STOCK_PKG dependencies on FND_FILE
12.2.2