Search Results get_reporting_currency_code




Overview

MSC_PHUB_UTIL is a utility package owned by APPS within the Oracle E-Business Suite Advanced Supply Chain Planning (ASCP) / Planning Hub schema. It is classified as a UTIL package, meaning it provides reusable helper routines rather than a business transaction API. The package consolidates commonly needed lookups and calculations that support the Planning Hub user interface and associated planning workflows, including currency conversion, reporting currency resolution, plan metadata retrieval, list price lookup, planning constraint evaluation, and diagnostic logging. Because it is a shared utility, it is referenced by sixteen other packages in the planning schema, making it a foundational dependency for reporting, exception handling, and plan administration functions. The package is present in both EBS 12.1.1 and 12.2.2; the header comment reflects a 2008 ship date consistent with its long-standing role in the MSC family.

Key Procedures and Functions

  • GET_CONVERSION_RATE — Overloaded function returning a conversion rate. One form derives the rate from a functional currency and a source instance together with an effective date; the other derives it from a source instance, an organization, and a date. This is the routine most directly associated with the user search term.
  • GET_PLANNING_HUB_MESSAGE — Returns the message text associated with a planning hub message code.
  • GET_REPORTING_CURRENCY_CODE — Returns the reporting currency code, typically read from the global variable g_rpt_curr_code.
  • GET_EXCEPTION_GROUP / GET_EXCEPTION_DRP_GROUP — Return the exception group description for a given exception type identifier.
  • GET_LIST_PRICE — Retrieves the list price for an item within the context of a plan, instance, and organization.
  • IS_PLAN_CONSTRAINED — Overloaded function that evaluates whether a plan is constrained, either from a plan identifier or from daily, weekly, and monthly supply/demand values.
  • GET_PLAN_TYPE — Returns the numeric plan type for a plan identifier.
  • GET_DEFAULT_PLAN_ID — Resolves a default plan identifier from a scenario, plan type, and plan run name.
  • GET_USER_NAME — Returns the user name for a user identifier.
  • VALIDATE_ICX_SESSION — Validates a planning session using the ICX cookie, user, and password.
  • INIT_LOG, DELETE_LOG, SET_LOG_FILE, SET_LOG_LEVEL, LOG_FILE, LOG, LOG_SQL, SUFFIX — Logging and diagnostic helpers used to initialize, control, and write debug and SQL trace output.
  • DECODE_ORGANIZATION_KEY, DECODE_ITEM_KEY — Decoding helpers that resolve organization and item key values.
  • POPULATE_ITEM_CATEGORIES — Populates item categories for a query, plan, plan run, and plan type.

Tables Accessed

The package queries several planning and application tables through APPS synonyms. FND_USER, FND_RESPONSIBILITY, and FND_ORACLE_USERID support user and responsibility lookups such as GET_USER_NAME. MSC_PLANS, MSC_PLAN_RUNS, and MSC_HUB_QUERY with its sequence MSC_HUB_QUERY_S provide plan and planning hub query metadata. Currency and reporting logic draws on conversion data, while MSC_SYSTEM_ITEMS, MSC_TRADING_PARTNERS, MSC_SUPPLIES, MSC_DEMANDS, MSC_RESOURCE_REQUIREMENTS, and MSC_NET_RESOURCE_AVAIL supply item, partner, supply, demand, and resource availability information used in list price and constraint evaluation. AD_DDL and ALL_INDEXES are accessed for diagnostic and structural queries supporting the logging routines.

Usage Notes

MSC_PHUB_UTIL is not invoked directly by end users. It is called from Planning Hub forms, concurrent programs, and other planning packages that require currency conversion, plan metadata, user names, or logging services. Because the package is referenced by sixteen other packages, changes to its specification carry broad impact. Custom code should call the documented function signatures and avoid reliance on internal state such as g_rpt_curr_code, which is populated during initialization of the planning session.