Search Results current_report_start_date
Overview
OPI_DBI_CALENDAR_PKG is a PL/SQL package owned by the APPS schema in Oracle E-Business Suite, classified under the ETRM API classification "OTHER." It is a utility calendar package that supplies date-boundary calculations for the Oracle Price Index (OPI) / Daily Business Intelligence (DBI) reporting infrastructure. Its central purpose is to translate an arbitrary "as of" date into the corresponding start dates for the current reporting period, the previous reporting period, and the current calendar period, based on a caller-supplied period type and comparison type. In effect, the package encapsulates the fiscal and calendar logic that reporting engines need in order to determine which slice of transactional data belongs in a given report run.
The package is declared AUTHID CURRENT_USER, meaning it executes with the privileges of the invoking session rather than the definer. The header carries the revision marker $Header: OPIDRCALS.pls 115.1 2002/10/02 ... noship $, indicating it was shipped as a standalone (non-"ship" flagged) file and has been part of the OPI/DBI codebase since the early 11i lineage, carried forward into 12.1.1 and 12.2.2.
Key Procedures and Functions
- CURRENT_REPORT_START_DATE — Returns the start date of the report period that contains the supplied as-of date. This is the function most commonly referenced when users search for "current_report_start_date," because it anchors the reporting window for the active run.
- PREVIOUS_REPORT_START_DATE — Returns the start date of the report period immediately preceding the one containing the as-of date, supporting period-over-period comparisons.
- PREVIOUS_PERIOD_START_DATE — Returns the start date of the prior calendar or fiscal period, as distinguished from the prior report period.
- CURRENT_PERIOD_START_DATE — Returns the start date of the current calendar/fiscal period for the given as-of date. Unlike the report variants, this function does not take a comparison type.
- PREVIOUS_PERIOD_ASOF_DATE — Returns the as-of date that corresponds to the previous period, effectively shifting the reference date backward by one period for comparison logic.
Tables Accessed
The package resolves its date boundaries by reading the OPI/DBI time dimension tables exposed through APPS synonyms: FII_TIME_ENT_PERIOD, FII_TIME_ENT_QTR, FII_TIME_ENT_YEAR, and FII_TIME_WEEK. These tables constitute the reporting time hierarchy — period, quarter, year, and week — and allow the functions to map an as-of date to the correct period start regardless of the period_type and comparison_type requested by the caller. FII_TIME_ENT_PERIOD supplies the base period definition; the quarter, year, and week tables provide the higher and alternative granularities used when the period_type argument selects a non-period calendar.
Usage Notes
OPI_DBI_CALENDAR_PKG is an internal reporting utility rather than an end-user API. It is invoked primarily from the OPI/DBI reporting packages and concurrent programs that build dashboard and index reports, and from any custom code that needs to align its query window with the standard OPI calendar. ETRM documentation records that it is referenced by one other package, confirming its role as a dependency of the reporting layer.
Typical invocation passes an as-of date (often SYSDATE or a user-entered run parameter), a period type that selects the calendar granularity, and, where applicable, a comparison type that determines whether the current or prior window is required. Because the package is AUTHID CURRENT_USER, custom callers must ensure their own schema has the necessary SELECT privileges on the referenced FII time tables, or must call it from a context that already holds them, such as APPS. Developers overriding reporting date logic should reuse these functions rather than reimplementing period-boundary arithmetic, so that custom reports remain consistent with standard OPI behavior across 12.1.1 and 12.2.2.
-
PACKAGE: APPS.OPI_DBI_CALENDAR_PKG
12.1.1
-
PACKAGE: APPS.POA_DBI_CALENDAR_PKG
12.1.1
-
PACKAGE: APPS.BIV_DBI_BAK_AGE_PKG
12.1.1
-
PACKAGE BODY: APPS.OPI_DBI_CALENDAR_PKG
12.1.1
-
PACKAGE BODY: APPS.POA_DBI_CALENDAR_PKG
12.1.1
-
PACKAGE: APPS.BIM_PMV_DBI_UTL_PKG
12.1.1
-
PACKAGE: APPS.OKI_DBI_UTIL_PVT
12.1.1
-
APPS.ISC_FS_TASK_BAC_AGING_RPT_PKG SQL Statements
12.1.1
-
PACKAGE BODY: APPS.BIV_DBI_BAK_AGE_PKG
12.1.1
-
PACKAGE BODY: APPS.BIM_PMV_DBI_UTL_PKG
12.1.1
-
APPS.OKI_DBI_UTIL_PVT dependencies on BIS_COMMON_PARAMETERS
12.1.1
-
PACKAGE BODY: APPS.OKI_DBI_UTIL_PVT
12.1.1
-
APPS.ISC_FS_TASK_BAC_AGING_RPT_PKG dependencies on ISC_FS_TASK_BAC_AGE_ETL_PKG
12.1.1
-
APPS.POA_DBI_CALENDAR_PKG dependencies on POA_DBI_CALENDAR_PKG
12.1.1
-
APPS.BIV_DBI_BAK_AGE_PKG dependencies on BIV_DBI_BAK_AGE_PKG
12.1.1
-
APPS.BIV_DBI_BAK_AGE_PKG dependencies on BIS_COMMON_PARAMETERS
12.1.1
-
APPS.OPI_DBI_CALENDAR_PKG dependencies on OPI_DBI_CALENDAR_PKG
12.1.1
-
APPS.BIM_PMV_DBI_UTL_PKG dependencies on BIS_COMMON_PARAMETERS
12.1.1
-
PACKAGE BODY: APPS.ISC_FS_TASK_BAC_AGING_RPT_PKG
12.1.1
-
APPS.BIV_DBI_BAK_AGE_PKG dependencies on POA_DBI_UTIL_PKG
12.1.1