Search Results get_default




Overview

The package body APPS.PA_PAFPEXRP_XMLP_PKG is the generated PL/SQL implementation that supports the Oracle Projects XML Publisher (BI Publisher) report driven by the concurrent report definition PA_PAFPEXRP. The module belongs to the Oracle Projects (PA) application suite and is associated with project forecasting and periodic project performance reporting. Its principal responsibility is to satisfy the report event hooks that Oracle Reports/PAPublisher invokes during execution, including initialization of the Multi-Org (MO) security context and resolution of user-entered report parameters before the report query fires.

Although the package is classified as OTHER within the ETRM repository, its content follows the predictable structure produced by the Oracle Reports-to-XML Publisher migration utility: a small set of formula functions plus the standard BeforeReport and AfterReport program units, with additional parameter-value helper functions. The package originates from source revision PAFPEXRPB.pls (120.1, dated 2008/06/16) and is deployed under the APPS schema in both EBS 12.1.1 and 12.2.2.

Key Procedures and Functions

  • CF_REJECTION_DESCRIPTIONFORMUL — A formula (user-defined) function that converts a stored rejection code into a user-readable description. It calls FND_MESSAGE.SET_NAME and FND_MESSAGE.GET against the PA message dictionary, returning the resolved message text; if the message is not found it falls back to returning the raw rejection code. This function supplies the descriptive column displayed on the report output.
  • BEFOREREPORT — The primary initialization program unit. It declares local variables for forecast period type, period set name, accounting period type, functional currency code, number of periods, template identifier, structure version, forecast start and end dates, and organization identifier. It initializes Multi-Org via mo_global.init('PA'), resolves the current organization through MO_GLOBAL.GET_CURRENT_ORG_ID, and, when no organization is available, invokes pa_moac_utils.GET_DEFAULT_OU. It then establishes the single-organization policy context with MO_GLOBAL.set_policy_context('S', p_org_id) and performs parameter defaulting (including the start organization identifier).
  • AFTERREPORT — The post-report program unit, used to release report-level context or perform cleanup after the report result set has been produced.
  • P_FCST_START_DATE_P — A parameter helper function that derives or validates the forecast start date value used by the report's date-range parameter.
  • P_FCST_END_DATE_P — The corresponding helper that derives or validates the forecast end date parameter.
  • P_PROJECT_ID_PARAMETER_P — A parameter helper that resolves the project identifier passed into the report.

Tables Accessed

ETRM documents a single table reference for this package: PA_IMPLEMENTATIONS, accessed through its APPS synonym. This table stores the configuration flags and installation-level options for the Oracle Projects application. The package reads it as part of the BeforeReport initialization logic to determine whether specific Projects features and Multi-Org behaviors are enabled before the forecast report executes. No other base tables are recorded as directly referenced by this package body; the report's own data query is defined separately in the associated XML Publisher data definition.

Usage Notes

This package is not intended for direct invocation by custom code. It is executed automatically by the Oracle Reports runtime / XML Publisher engine when the PA_PAFPEXRP concurrent program is submitted. The report's parameter form triggers execution of the BeforeReport unit, which establishes the operating unit policy context; failure to resolve an organization causes the package to fall back to pa_moac_utils.GET_DEFAULT_OU so that the report still runs against a default operating unit.

Because the package references the global MO_GLOBAL and PA_MOAC_UTILS utilities, it is sensitive to Multi-Org configuration and to the initialization state of the session. In EBS 12.2.2 the same source is used as in 12.1.1; the body remains shipped with the NOSHIP header comment because it is regenerated from the report definition rather than maintained by hand. When diagnosing "get_default"–style lookups, the relevant logic is the default operating unit resolution in BEFOREREPORT, which delegates to PA_MOAC_UTILS.GET_DEFAULT_OU and then to MO_GLOBAL.GET_CURRENT_ORG_ID.