Search Results compare_options




Overview

APPS.MSC_NETCHANGE_PKG is a PL/SQL package that implements net change comparison logic within the Oracle Advanced Supply Chain Planning (ASCP) module of Oracle E-Business Suite. The package is declared with AUTHID CURRENT_USER, meaning it executes with the privileges of the invoking user and relies on APPS-owned synonyms for access to the MSC schema objects. Its principal business purpose is to compare two planning scenarios — a source plan and a target plan — and to identify the differences between them across options, aggregates, organizations, schedules, constraints, goal programs, and exceptions. These comparisons are persisted into the MSC_NEC_COMPARE_PLANS and related net change tables so that planners can review what changed between planning runs and evaluate the impact of those changes.

Key Procedures and Functions

The documented API exposes nineteen procedures and functions that collectively support the net change workflow:

  • COMPARE_PLANS — The primary entry point. It orchestrates a comparison between a from_plan and a to_plan, accepting a comparison options flag, folder identifier, exception list, and criteria identifier, and returning identifiers for the generated option and exception queries.
  • CONVERT_CONDITION — A utility function that translates a numeric operator into its equivalent SQL comparison string.
  • COMPARE_OPTIONS, COMPARE_AGGREGATE, COMPARE_OPTIMIZE, COMPARE_ORGS, COMPARE_SCHEDULES, COMPARE_CONSTRAINTS, COMPARE_GOALPROG — Focused comparison routines that evaluate individual plan attributes between the two plans under comparison.
  • COMPARE_EXCEPTIONS — Compares exception sets, accepting an exception list together with item_where_clause and resource_where_clause parameters. The item_where_clause parameter, which is the term the user searched for, is a SQL predicate fragment used to restrict the item dimension of the exception comparison to a specific subset of items.
  • POPULATE_ALL_EXCEPTIONS — Populates the exception detail structures for a given plan and report.
  • CALCULATE_START_DATE — A function returning a start date based on organization, source instance, plan start date, and daily, weekly, and period cutoff buckets.
  • CHECKPLANSTATUS — Validates the status of the from_plan and to_plan and returns a status code and report identifier.
  • COMPARE_ALL_EXCEPTIONS, COMPARE_EACH_EXCEPTION — Concurrent-program style wrappers (with errbuf and retcode) that drive exception comparison and process each exception type individually.
  • FILTER_DATA — Applies an exception type and where clause to filter comparison results for a report.
  • CATEGORY_NAME — Returns the category name for a given organization, instance, item, and plan.
  • COMPARE_PLAN_NEED_REFRESH — Determines whether a plan comparison requires refresh.
  • PURGE_PLAN — Removes plan comparison data, exposed with errbuf and retcode for concurrent invocation.

Tables Accessed

The package reads and writes several MSC tables through APPS synonyms. MSC_PLANS, MSC_DEMANDS, and MSC_FULL_PEGGING supply the source planning data. MSC_NEC_COMPARE_PLANS and its _S sequence-backed table store the comparison header records, while MSC_NEC_EXC_DTL_COMPARE and MSC_NEC_EXC_DTL_TEMP hold exception comparison details and scratch data. MSC_CRITERIA and MSC_NET_CHANGE_CRITERIA store the filtering criteria that drive the item_where_clause and resource_where_clause predicates. MSC_ASSIGNMENT_SETS, MSC_CATEGORY_SETS, and MSC_DESIGNATORS resolve item categorization, and MSC_EXCEPTION_DETAILS, MSC_FORM_QUERY, and MSC_FORM_QUERY_S support query storage and reporting.

Usage Notes

MSC_NETCHANGE_PKG is typically invoked from the ASCP Plan Comparison and net change concurrent programs, which call COMPARE_ALL_EXCEPTIONS and PURGE_PLAN using standard errbuf/retcode conventions. The Oracle Forms user interface supplies criteria identifiers and folder identifiers that drive COMPARE_PLANS. Custom code should treat this package as internal to ASCP; direct calls are possible but must respect the AUTHID CURRENT_USER context and the APPS synonym grants. The item_where_clause is most relevant when custom integrations need to constrain exception comparison output to a specific set of items.