Search Results msd_dp_formulas




Overview

The APPS.MSD_DP_FORMULA_PKG package body is a member of the Oracle Demand Planning (MSD) schema within Oracle E-Business Suite, providing the row-level data loading logic used by the Demand Planning open interface. Its primary business function is to accept denormalized, char-based interface records representing demand plan formulas and to reconcile those records against the existing MSD_DP_FORMULAS table, inserting, updating, or skipping rows according to ownership and last-update-date rules enforced by the loader utility FND_LOAD_UTIL. This package is therefore part of the bulk data migration and seeding framework that supports the seeding of Demand Planning plan definitions, equation specifications, and related formula configuration from external files or upstream planning engines.

The body carries header revision msddpfb.pls 120.2 (dated 2005/12/22), and its signature reflects multiple incremental patches applied through Oracle bug fixes, notably Bug#4373422, which introduced the P_FORMAT column, and Bug#4744717, which introduced P_START_PERIOD. These additions indicate that the package has evolved in step with schema changes to MSD_DP_FORMULAS.

Key Procedures and Functions

The package exposes a single documented public procedure:

  • LOAD_ROW — Loads a single formula row into the Demand Planning formula tables. The procedure accepts a large set of character-typed parameters corresponding to each interface column, including demand plan name, formula name, owner, creation sequence, formula description, custom type and subtype fields, equation text, custom numeric and additional calculation fields, numerator and denominator expressions, supply plan flag and name, upload formula identifier, last update date, format, start period, and customization mode. Its documented logic first translates the demand plan name into the internal DEMAND_PLAN_ID, translates the owner string into an application user identifier via fnd_load_util.owner_id, converts the character last-update-date into a date value, and then queries the existing row in MSD_DP_FORMULAS to obtain the database owner and update date. It subsequently invokes fnd_load_util.upload_test using the file and database owner/date values together with the customization mode to decide whether to update the existing row, insert a new one, or leave it unchanged.

Tables Accessed

Three tables are documented as referenced through APPS synonyms:

  • MSD_DEMAND_PLANS — Read to resolve the demand plan name supplied in the interface record into the numeric DEMAND_PLAN_ID used as the primary key component in downstream processing.
  • MSD_DP_FORMULAS — The principal target of the load. It is queried to retrieve the existing owner and last update date for change detection, and is then updated (or inserted into) with the values passed to the procedure.
  • MSD_DP_PARAMETERS_S — Referenced as a supporting table in the formula parameter definition model; the package consults it in the context of formula parameter validation and relationship management.

Usage Notes

This package is invoked indirectly rather than directly by end users. It is typically called by the Demand Planning open interface concurrent programs and by the loader programs that process flat files exported from legacy systems or from the seeded planning templates. Because LOAD_ROW relies on FND_LOAD_UTIL.owner_id and FND_LOAD_UTIL.upload_test, it inherits the standard Oracle Applications seed-data customization protections: records owned by the database rather than the loading user, or records updated more recently than the file, are preserved. Custom code that bypasses this package and writes directly to MSD_DP_FORMULAS risks corrupting the LAST_UPDATED_BY and LAST_UPDATE_DATE audit columns that the change-detection logic depends on. No other packages are documented as referencing this body, so its use is confined to the standard Demand Planning interface load path.