Search Results p_balance_type




Overview

PSB_DISCOVERER_FUNCTIONS is a utility package body owned by the APPS schema in Oracle E-Business Suite, classified under the ETRM standard as an "OTHER" API type. It belongs to the Public Sector Budgeting (PSB) product family, which supports budgetary formulation, revision tracking, and integration with Oracle General Ledger for public sector and government entities. The package exposes a small set of PL/SQL functions that operate as plumbing between Oracle Discoverer reports or worksheets and the underlying PSB budget revision logic. Its principal responsibility is to resolve display-ready amounts and General Ledger balance figures so that Discoverer-based budget analysis workbooks can present consistent, period-aware values without embedding business logic directly in the report layer.

The package body carries an older version header ($Header: PSBVDISB.pls 115.2, dated 2002/11/22), indicating that this code dates from a much earlier release but remains part of the shipped APPS schema in both 12.1.1 and 12.2.2. The package contains two documented functions, both of which are declared as standalone program units inside the package body with no visible package specification-level wrappers in the excerpt, suggesting the specification is minimal or the functions are exposed primarily for Discoverer invocation.

Key Procedures and Functions

  • WS_GET_AMOUNT — Returns a numeric amount conditioned on stage sequencing. Internally it compares a required stage sequence against a start stage and a current stage; when the required stage falls within that inclusive range, the year-to-date amount is returned, otherwise zero is returned. This zero-otherwise behavior lets Discoverer worksheets suppress amounts for stages that are not yet applicable, producing stage-aware cumulative reporting without additional report logic.
  • GET_GL_BALANCE — A thin wrapper that delegates to PSB_BUDGET_REVISIONS_PVT.Get_GL_Balance, forwarding the caller's parameters unchanged. Because the user searched for p_balance_type, this is the relevant entry point: p_balance_type is one of the parameters accepted here and passed through to the PVT layer, where it selects the balance flavor (for example, the distinction between budget and actual, or between different GL balance categories) that the Discoverer report wishes to display. Other forwarded parameters include revision type, set of books, XBC enabled flag, GL period name, GL budget version, currency code, and code combination, indicating that the function resolves a single currency-denominated GL balance for a specific account combination and period context.

Tables Accessed

The ETRM metadata records no direct table references via APPS synonyms for this package. All data access is indirect: GET_GL_BALANCE delegates to PSB_BUDGET_REVISIONS_PVT.Get_GL_Balance, which performs the actual General Ledger queries against GL_BALANCES, GL_CODE_COMBINATIONS, GL_PERIODS, and related budget version tables on behalf of the caller. This delegation pattern keeps GL access centralized in the PVT layer and means the Discoverer package itself holds no SQL against base tables. Because the metadata documents no table synonyms, DBAs reviewing dependencies should inspect PSB_BUDGET_REVISIONS_PVT to understand the full data footprint.

Usage Notes

This package is referenced by zero other PL/SQL packages, so its consumers are external. Its naming and structure — a tight set of value-returning functions with Discoverer-oriented semantics — indicate that it is invoked from Oracle Discoverer end-user layers, typically through custom folders, calculations, or PL/SQL functions registered in an EUL, rather than from Oracle Forms or concurrent programs. Users and report developers call WSW_GET_AMOUNT to present stage-qualified YTD figures and GET_GL_BALANCE to surface a specific GL balance selected via p_balance_type. Because both functions are read-only and stateless, they are safe to invoke repeatedly in worksheet refreshes. In 12.1.1 and 12.2.2, the package remains available in the APPS schema unchanged from its original 2002 vintage, so any custom Discoverer workbook, OBIEE integration, or ad hoc PL/SQL script that depends on p_balance_type or the stage-sequence logic should continue to function as long as the underlying PSB_BUDGET_REVISIONS_PVT signature is preserved.