Search Results get_where_statement




Overview

FII_AR_UTIL_PKG is a shared utility package in the Oracle E-Business Suite Receivables (AR) intelligence layer, owned by APPS and classified under ETRM as an OTHER (non-API) object. Its primary business function is to support the Financial Intelligence for Receivables (FII) reporting and analytics features, most notably Days Sales Outstanding (DSO) analysis, trend reporting, and receivables dashboards. The package centralizes the session context, security profile resolution, period derivation, currency determination, and dynamic SQL generation required by the various FII Receivables reports and graphical regions.

A distinguishing characteristic of this package is its extensive use of package-level global variables. The specification declares a large set of globals such as g_as_of_date, g_currency, g_region_code, g_session_id, g_org_id, g_collector_id, g_security_profile_id, g_business_group_id, and many period-boundary variables (g_curr_per_start, g_prior_per_start, g_curr_month_start). These globals act as a per-session cache that is populated once and then reused throughout the lifetime of a reporting action, which is a common pattern in EBS reporting utilities that must avoid repeated round trips to the database for the same parameters. The package is declared AUTHID CURRENT_USER, meaning that name resolution and privilege checks occur under the calling schema's authority.

Key Procedures and Functions

ETRM documents 22 procedures and functions in this package. Their purposes are as follows:

  • RESET_GLOBALS — Reinitializes the package-level global variables, clearing cached session context between report executions.
  • GET_PARAMETERS — Reads and loads the runtime report parameters into the global variables.
  • GET_TREND_VIEWBY — Determines the "view by" dimension used for trend-style reporting.
  • BIND_VARIABLE — Dynamically binds a value into a SQL statement, supporting the package's dynamic SQL model.
  • POPULATE_SUMMARY_GT_TABLES — Populates global temporary summary tables used as the data source for reports.
  • INSERT_INTO_DEBUG_TABLE — Writes diagnostic information into a debug table for troubleshooting; this is the routine matched by the user's search term and is the standard debugging hook invoked during report execution.
  • POPULATE_PARTY_ID — Resolves party identifiers for hierarchical or drill-down reporting.
  • GET_SEC_PROFILE — Retrieves the security profile applicable to the current user, driving org/operating unit data restrictions.
  • GET_DSO_PERIOD_PROFILE — Obtains the DSO period profile configuration used to compute DSO periods.
  • GET_CURR — Determines the display currency for the report.
  • GET_DSO_SETUP_VALUE — Reads a specific setup value from the DSO configuration tables.
  • GET_DSO_TABLE_VALUES — Loads the DSO setup values into the package state.
  • GET_PRIM_GLOBAL_CURRENCY_CODE and GET_SEC_GLOBAL_CURRENCY_CODE — Resolve the primary and secondary global currency codes respectively.
  • DETERMINE_OU_LOV — Establishes the operating unit list-of-values scope for the session.
  • GET_BUSINESS_GROUP — Resolves the business group identifier for the current context.
  • GET_DISPLAY_CURRENCY — Returns the currency to be shown on the report output.
  • GET_FROM_STATEMENT, GET_WHERE_STATEMENT, and GET_MV_WHERE_STATEMENT — Build the dynamic SQL fragments (FROM clause, WHERE clause, and materialized-view-specific WHERE clause) used to assemble the report queries and predicates.

Tables Accessed

The package references the following objects through APPS synonyms:

  • AR_SYSTEM_PARAMETERS_ALL — Supplies Receivables system-level defaults such as functional currency and accounting context.
  • BIS_OBJ_PROPERTIES — Provides metadata about the reporting objects used to drive dynamic SQL construction.
  • FII_AR_DSO_SETUP and FII_TIME_ENT_PERIOD — Store the DSO configuration and time-period definitions consumed by GET_DSO_SETUP_VALUE, GET_DSO_TABLE_VALUES, and the period routines.
  • PER_ORGANIZATION_LIST and PER_SECURITY_PROFILES — Used by GET_SEC_PROFILE and DETERMINE_OU_LOV to enforce organization security and build the list of accessible operating units.
  • ALL_TABLES — Consulted for dynamic SQL validation and object existence checks.
  • DUAL — Used for scalar derivations and single-value computations.
  • PLITBLM — An EBS internal table typically used in combination with dynamic SQL or OWA/PLSQL utility processing.

Usage Notes

FII_AR_UTIL_PKG is a supporting utility rather than a public integration API. It is invoked indirectly by the FII Receivables reporting components — Oracle Forms-based DSO and trend reports, the associated concurrent programs, and the dynamic reporting regions that render dashboards in EBS. The documented "referenced by 25 other packages" statistic confirms that it acts as a dependency hub for the FII Receivables suite.

Customization and extension should treat this object as read-only internals. Unlike an ETRM-classified API, no compatibility guarantee applies, and signature or global-variable changes can break the 25 dependent packages. Developers debugging FII Receivables output will encounter INSERT_INTO_DEBUG_TABLE as the mechanism that records trace information during report runs; enabling or reviewing that debug path is the standard technique for diagnosing parameter-resolution or dynamic SQL problems in this reporting stack.