Search Results get_plan_owning_org
Overview
MSD_COMMON_UTILITIES_LB is a shared PL/SQL utility package owned by APPS within the Oracle E-Business Suite supply chain and demand planning modules. It is compiled with AUTHID CURRENT_USER, meaning that its SQL statements execute under the privileges of the calling schema rather than the definer, so runtime access to the underlying planning tables depends on the grants held by the invoking user. The package centralizes constants, level-based hierarchy lookups, plan metadata retrieval, unit-of-measure and calendar resolution, and liability processing logic that would otherwise be duplicated across the MSD (demand planning) and MSC (supply chain planning) family of programs.
The "_LB" suffix reflects the package's lineage in the legacy "level-based" planning architecture, where demand and supply are aggregated and disaggregated through level values and level associations rather than through a fixed item hierarchy. The package exposes level, plan, and organization metadata through a small set of scalar functions, and it also encapsulates pre- and post-processing logic for liability planning runs.
Key Procedures and Functions
- GET_LEVEL_PK — The function associated with the user's search. It resolves the surrogate primary key of a level value from a level identifier, allowing callers to translate between a logical level member and the physical key stored in the level values table.
- GET_DEMAND_PLAN_ID — Returns the demand plan identifier associated with a given plan.
- GET_ITEM_CAT_NAME / GET_ITEM_CAT_DESC — Return the name and description of an item category for a given inventory item and category set.
- GET_SUPPLY_PLAN_NAME / GET_SUPPLY_PLAN_ID / GET_SUPPLY_PLAN_START_DATE / GET_SUPPLY_PLAN_END_DATE — Retrieve supply plan identity and date-range boundaries.
- GET_CP_END_DATE — Returns the end date used by the collaboration or constraint planning horizon.
- GET_PLAN_OWNING_ORG / GET_PLAN_OWNING_INSTANCE — Identify the inventory organization and application instance that own a plan.
- GET_DEFAULT_MFG_CAL / GET_DEFAULT_UOM / GET_BASE_UOM — Resolve default manufacturing calendar, default unit of measure, and base unit of measure values.
- GET_LIABILITY_URL — Returns the URL used for liability output or navigation.
- LIABILITY_PREPROCESSOR / LIABILITY_POST_PROCESS / LIABILITY_PLAN_UPDATE / LIABILITY_PLAN_EXISTS — Support the liability planning lifecycle: validating whether a liability plan exists, preparing data before a run, updating plan records, and processing results after the run completes.
Tables Accessed
The package references planning and inventory tables through APPS synonyms. MSD_LEVEL_VALUES_LB and MSD_LEVEL_ASSOCIATIONS_LB hold the level hierarchy used by the level-based planning model; MSD_DEMAND_PLANS, MSD_DP_PARAMETERS, MSD_DP_SCENARIOS, and MSD_DP_SCENARIO_REVISIONS hold demand plan and scenario definitions. MSC_PLANS, MSC_SYSTEM_ITEMS, MSC_ITEM_CATEGORIES, MSC_ITEM_SUPPLIERS, MSC_ASL_AUTH_DETAILS, MSC_DESIGNATORS, MSC_TRADING_PARTNERS, and MSC_UOM_CONVERSIONS provide plan definitions, item attributes, approved supplier sourcing rules, trading partner data, and unit-of-measure conversion factors. MSD_CS_DEFINITIONS and MSD_CS_DEFN_DIM_DTLS supply collaboration or constraint definition metadata used by the liability and plan lookup functions.
Usage Notes
MSD_COMMON_UTILITIES_LB is an internal utility package and is not exposed as a user-facing API. It is invoked by other PL/SQL packages — the ETRM metadata records five dependent packages — and by concurrent programs in the demand and supply planning modules that need consistent plan, level, category, or UOM metadata. Customizations should call the documented functions rather than querying the underlying tables directly, because the package also carries a declared set of table-name and column-name constants (for example LEVEL_VALUES_FACT_TABLE, LEVEL_VALUE_PK_COLUMN, and SR_LEVEL_PK) that the planning engine relies on remaining synchronized with the physical schema. Because the package runs with invoker's rights, any custom caller must hold appropriate SELECT privileges on the referenced MSC and MSD tables, and the package should be recompiled after upgrades across releases 12.1.1 and 12.2.2.