Search Results igc_cbc_inquiry_pkg




Overview

IGC_CBC_INQUIRY_PKG is a public PL/SQL package owned by the APPS schema in Oracle E-Business Suite, associated with the Oracle Grants/Contracts Budgetary Control (CBC) module. It is declared with AUTHID CURRENT_USER, meaning its SQL statements execute with the privileges of the invoking user rather than the package owner, and it relies on APPS synonyms to reach the underlying base tables. The package encapsulates the inquiry-side logic used to resolve, validate, and retrieve budgetary control balances from committed and encumbered journal detail. Its primary purpose is to support budgetary inquiry screens and reports that display funds-checked balances by code combination, set of books, budget version, period, quarter, and encumbrance type. The package exposes a small, tightly scoped public interface consisting of five documented program units, of which four are helper functions and one is a bulk retrieval function. It is referenced by 14 other packages, indicating that it acts as a shared utility layer for budgetary inquiry rather than an standalone feature.

Key Procedures and Functions

  • Initialize — Entry point used to set up the package state prior to inquiry. It receives an amount type, a period cutoff, a set of books identifier, and a GL budget version identifier, establishing the context (ledger, budget version, and cutoff period) against which subsequent balance lookups are performed.
  • Check_Amount_Type — Function that validates or classifies the amount type in the context of a given period name, period year, quarter number, period number, actual flag, and budget version. It returns a VARCHAR2 result. The RESTRICT_REFERENCES pragma (RNDS, WNDS, WNPS) declares purity, ensuring it does not write database state, package state, or package-private state, which allows it to be called from SQL and from constrained contexts.
  • Get_Amount_Type — Returns the currently configured amount type as a VARCHAR2, with the same purity constraints. It is used by callers to discover which amount type the package was initialized with.
  • Get_Period_Name — Returns the current period name as a VARCHAR2 under identical purity pragmas, providing the period context established during initialization.
  • Get_FC_Balances — The core retrieval function. It returns a NUMBER representing the funds-checked balance for a specific detail code combination, set of books, budget version, period year, period number, quarter, CBC journal batch, actual flag ('B' or 'E'), encumbrance type, and CBC journal line number. Its mode parameter selects the retrieval behavior. The RESTRICT_REFERENCES pragma (WNDS, WNPS, RNPS) permits reading database and package state while prohibiting writes, suitable for a query-only balance function.

Tables Accessed

  • IGC_CBC_JE_LINES — The primary budgetary control journal line table; source of code combination, set of books, budget version, period, quarter, actual flag, encumbrance type, batch, and line number used to identify a balance.
  • GL_PERIODS — Provides period name, period year, quarter number, and period number validation context.
  • GL_PERIOD_STATUSES — Supplies period status by set of books, used to confirm that the queried period is open or otherwise valid for inquiry.
  • GL_BUDGET_VERSIONS — Identifies the budget version against which balances are evaluated.
  • FND_APPLICATION — Referenced for application context or installation metadata supporting the CBC inquiry logic.

Usage Notes

IGC_CBC_INQUIRY_PKG is typically invoked from budgetary control inquiry forms, concurrent programs, and reporting components, and is also called by other PL/SQL packages (14 documented referrers). In a typical custom integration, a caller first invokes Initialize to establish the set of books, budget version, amount type, and period cutoff, then calls Get_Amount_Type and Get_Period_Name to confirm the active context, uses Check_Amount_Type to validate candidate amount types, and finally calls Get_FC_Balances per journal line to obtain the funds-checked amount. Because the package is AUTHID CURRENT_USER, the invoking user must have execute privilege on the package and select privileges on the underlying APPS synonyms (or be granted them through standard EBS responsibility and data access grants). The purity pragmas on the functions permit embedded SQL invocation; however, Get_FC_Balances performs read operations against the CBC journal tables on each call, so callers iterating over large line sets should expect row-by-row lookup cost and should use the Initialize/context pattern to avoid redundant validation. The package is designed for inquiry and reporting only; it does not post, update, or delete budgetary control data.