Search Results psp_matrix_driver2_pkg




Overview

The APPS.PSP_MATRIX_DRIVER2_PKG package is a PL/SQL driver utility within the Oracle EBS Human Resources (HR) and Oracle Payroll family, specifically associated with the PSP (Payroll/HR) vertical. The package is declared with AUTHID CURRENT_USER, meaning it executes with the privileges of the invoking schema rather than the defining schema — the standard model for EBS packages that are invoked from forms, concurrent programs, or other PL/SQL units running under APPS or a custom schema. Its principal business role is to populate, purge, and interrogate a driver/matrix staging structure (PSP_MATRIX_DRIVER2) that supports dynamic, period-driven calculations. The functions returning period metadata, dynamic totals, and dynamic prompts indicate the package powers a user-facing matrix or concurrent request whose columns or prompts vary based on the number of periods and a caller-supplied index. In 12.1.1 and 12.2.2, this package carries the older 115.4 header dating to 2002, indicating it is a stable legacy utility retained largely unchanged across releases.

Key Procedures and Functions

The package exposes seven documented program units, several of which drive the dynamic behavior that users encounter in the matrix UI:

  • LOAD_TABLE — Populates the driver/matrix structure for a given schedule identifier and date range. Likely the primary entry point invoked before any period-based reporting.
  • PURGE_TABLE — Removes existing driver rows, typically to clear stale data before a reload or after a reporting cycle.
  • SET_START_PERIOD — Establishes the starting period for the session, allowing the dynamic column/period logic to anchor against a caller-supplied value.
  • GET_MAX_PERIODS — Returns the maximum number of periods available, used to size the dynamic matrix.
  • GET_START_PERIOD — Returns a DATE representing the resolved start period; carries a PRAGMA RESTRICT_REFERENCES (WNDS, WNPS) declaration, confirming it is a pure, side-effect-free function safe for SQL use.
  • GET_DYNAMIC_TOTALS — Returns a numeric total for a given index, driving dynamically generated columns in the matrix.
  • GET_DYNAMIC_PROMPT — Returns a VARCHAR2 prompt string for a supplied index. This is the object most relevant to the user's search term: it supplies the label or prompt text displayed for a dynamically generated period or column.

Tables Accessed

Three tables are documented as referenced through APPS synonyms:

  • PSP_MATRIX_DRIVER2 — The primary driver table for the matrix; read and written by LOAD_TABLE and PURGE_TABLE, and queried by the dynamic getters.
  • PSP_SCHEDULE_LINES — Provides schedule/period line detail, used to determine period sequencing and boundaries.
  • PLITBLM — A standard EBS numeric-index/date range helper table commonly used to materialize period lists; supports the dynamic period enumeration.

Usage Notes

This package is typically invoked from an Oracle Forms-based matrix screen or a concurrent program that builds a driver matrix for a selected schedule. The get_dynamic_prompt function is called at runtime to supply the column heading or prompt text for each dynamically generated period, which explains why it returns VARCHAR2 rather than a date or number. Because the package is documented as referenced by one other package, it is also a dependency in a larger driver chain and should be treated as a shared utility. Custom code invoking it must first call load_table (or rely on a prior load) and set the start period, then use the getter functions to render output. Care should be taken in 12.1.1 and 12.2.2 environments to ensure APPS synonyms are valid and that the invoking session has EXECUTE on the package. Given the legacy 2002 vintage, customization should prefer wrapping rather than modifying the shipped specification.