Search Results poa_dbi_template_pkg




Overview

APPS.POA_DBI_TEMPLATE_PKG is a PL/SQL package body in the Oracle E-Business Suite APPS schema that belongs to the Procurement and Oracle Advanced Procurement (POA) database intelligence (DBI) subsystem. It provides the internal SQL generation and template-handling logic used by the Procurement DBI analytics layer, which supplies the data behind Procurement dashboards, spend analyses, and related DBI reporting regions. The package is classified as OTHER, meaning it is not a public, supported integration API but rather an internal helper used by other objects within the same functional area.

The name itself reflects its role: POA denotes the Advanced Procurement product family, DBI denotes the Database Intelligence analytics framework, and TEMPLATE indicates that the package builds reusable SQL fragments, column calculations, and clause templates consumed by higher-level DBI query builders. The package is documented as VALID in ETRM and, notably, is referenced by approximately ninety other database objects, confirming its position as a foundational utility rather than an entry point invoked directly by end-user flows.

Key Procedures and Functions

The ETRM metadata documents nine procedures and functions within this package body. Each serves a specific role in assembling dynamic analytical SQL:

  • STATUS_SQL — Generates SQL used to produce procurement status-based analytical results, forming the base query used by status dashboards and regions.
  • UNION_ALL_STATUS_SQL — Builds the UNION ALL variant of the status SQL, combining multiple status query blocks into a single result set for consolidated status reporting.
  • GET_STATUS_COL_CALC — Supplies the column calculation expressions for status columns, allowing the DBI layer to render computed status metrics consistently.
  • GET_TREND_COL_CLAUSES — Produces the clause fragments required to render trend-based columns and comparisons over time.
  • TREND_SQL — Generates the SQL underlying procurement trend analysis, providing period-over-period or time-series reporting constructs.
  • UNION_ALL_TREND_SQL — Constructs the UNION ALL form of the trend SQL, consolidating multiple trend query blocks.
  • DTL_STATUS_SQL — Generates the detail-level status SQL, used for drill-down or detail regions complementing the summary status queries.
  • DTL_STATUS_SQL2 — A second detail-level status SQL generation routine, supporting an alternate detail query pattern.
  • GET_VIEWBY_RANK_CLAUSE — Produces the ranking clause tied to the selected “view by” dimension, enabling ranked output in DBI reports.

No parameter lists are documented; accordingly, only the functional purpose of each routine is described.

Tables Accessed

The documented table references for this package are limited to DUAL and PLITBLM, accessed through APPS synonyms. DUAL is used for scalar evaluations and SQL fragment validation typical of dynamic SQL builders. PLITBLM is the standard PL/SQL index-by table used to hold collections of VARCHAR2 strings; within this package it is used to accumulate and return SQL text fragments, clause lists, or column definitions that are later concatenated into complete statements.

All business data is referenced indirectly: this package emits SQL text rather than querying procurement tables directly. Its runtime dependencies include FND_GLOBAL (session and context values), FND_PROFILE (profile option retrieval), and POA_DBI_UTIL_PKG, a sibling utility package. STANDARD and the APPS schema are also listed dependencies.

Usage Notes

POA_DBI_TEMPLATE_PKG is not intended for direct invocation by customers or custom code. It is an internal dependency of the Procurement DBI analytics infrastructure and is called by other packages and DBI objects to obtain SQL templates, column calculations, and clauses. Because it is referenced by roughly ninety database objects, changes to its behavior can ripple across Procurement dashboards and reporting regions.

Typical invocation occurs when a DBI reporting region or dashboard is executed, at which point higher-level DBI code calls the relevant template routine, receives SQL fragments, assembles them, and executes the resulting statement. Given its classification as OTHER, it should be treated as an unsupported internal object: customization should not depend on its interface, and any modification risks affecting dependent analytics objects. Review via ETRM and dependency tracing is advisable before any upgrade or patch analysis in EBS 12.1.1 or 12.2.2.