Search Results msd_uom_conversion




Overview

MSD_DEM_COMMON_UTILITIES is a shared PL/SQL utility package owned by the APPS schema within Oracle E-Business Suite Release 12.1.1 and 12.2.2. It belongs to the Advanced Supply Chain Planning / Demand Planning (MSC/MSD) product family and functions as a foundational library of common routines consumed across the ETRM (Enterprise Territory and Resource Management) and planning modules. The package encapsulates cross-cutting logic that would otherwise be duplicated throughout the planning codebase, including session initialization, dynamic logging, distributed database link resolution, instance metadata retrieval, unit-of-measure conversion, and organization and calendar lookups. Because it is referenced by roughly forty other packages, it is effectively an internal infrastructure component rather than an end-user-facing API. Its procedures are invoked indirectly during planning runs, data collections, and concurrent processing to ensure consistent handling of globalization, multi-organization security, and cross-instance data access.

Key Procedures and Functions

The package exposes sixty-four documented procedures and functions spanning several functional areas. Session and environment management is handled by APPS_INITIALIZE, which establishes FND global context within an autonomous transaction, and by GET_INSTANCE_INFO, GET_SCHEMA_NAME, and GET_SR_INSTANCE_ID_FOR_ZONE, which resolve instance, schema, and region-specific identifiers. Diagnostics are supported by LOG_MESSAGE and LOG_DEBUG, which write trace and debug output for troubleshooting planning executions.

Data access and synchronization routines include GET_DBLINK and GET_DEST_DBLINK for resolving database links between source and destination instances, UPDATE_SYNONYMS for maintaining synonym definitions, and REFRESH_PURGE_SERIES and CLEANUP_ENTITIES_INUSE for housekeeping of purge and in-use records. Reference-data resolution is provided by GET_PARAMETER_VALUE, GET_LOOKUP_VALUE, GET_UOM_CODE, and GET_ALL_ORGS. Calendar and planning utilities include DM_TIME_LEVEL, GET_SUPPLIER_CALENDAR, and GET_SAFETY_STOCK_ENDDATE. Forecasting-specific logic is isolated in IS_PF_FCSTABLE_FOR_ITEM and IS_PRODUCT_FAMILY_FORECASTABLE. Unit-of-measure handling, the most complex area, is implemented through UOM_CONVERT and the private MSD_UOM_CONVERSION procedure, which supports item-specific, standard, and interclass conversions using MSC_UOM_CONVERSIONS and MSC_UOM_CLASS_CONVERSIONS.

Tables Accessed

The package reads from and writes to a defined set of tables accessed through APPS synonyms. Planning configuration and instance data are drawn from MSC_APPS_INSTANCES, MSC_PLANS, MSC_REGIONS, and MSC_TP_ID_LID, MSC_TP_SITE_ID_LID, and MSC_TRADING_PARTNERS, which supply trading-partner and instance context. Item and organization reference data come from MSC_SYSTEM_ITEMS, MSC_CATEGORY_SET_ID_LID, and MSC_ITEM_SUPPLIERS. Calendar computations rely on MSC_CALENDAR_DATES, MSC_CAL_WEEK_START_DATES, and MSC_PERIOD_START_DATES. Safety-stock logic accesses MSC_SAFETY_STOCKS, while lookup and user resolution use FND_LOOKUP_VALUES and FND_USER. These tables are queried primarily to supply the utility functions with validated reference values rather than to perform transactional updates.

Usage Notes

MSD_DEM_COMMON_UTILITIES is not intended for direct end-user invocation. It is called programmatically from within planning engine code, concurrent programs, and custom extensions that require standardized UOM conversion, organization enumeration, or lookup resolution. Custom developers referencing this package should treat its signatures as internal and subject to change across patches, since the header indicates ongoing version maintenance through 2013. The APPS_INITIALIZE routine is particularly significant for any standalone callers, as it enforces correct FND context and commits autonomously. When troubleshooting planning behavior, LOG_DEBUG and LOG_MESSAGE output is typically the first diagnostic source to inspect.