Search Results psa_ap_bc_pvt




Overview

PSA_AP_BC_PVT is a private PL/SQL package owned by APPS in the Oracle E-Business Suite Payables module. It belongs to the Payments, Systems, and Architecture (PSA) family of packages that implement the integration between Oracle Payables and Oracle General Ledger's budgetary control and funds checking framework. The package supports the creation of budgetary control events from invoice distributions, the deletion and maintenance of those events, and the retrieval of funds-check results so that Payables can react appropriately when a proposed expenditure fails or passes funds checking. Because the package is classified as PVT (private), it is not a published public API; it is intended for internal consumption by other Payables budgetary control packages and by the calling framework that orchestrates funds checking for invoices and invoice distributions. The metadata places it in the 12.1.1 and 12.2.2 code lines, where budgetary control integration is handled through event records stored in GL_BC_PACKETS and processed by the GL budgetary control engine.

Key Procedures and Functions

The package exposes nine documented program units. No parameter lists are reproduced here; the descriptions reflect their documented purpose.

  • CREATE_EVENTS — Builds budgetary control event records for invoice distributions passed in by the caller, deriving the data required for funds checking and inserting the corresponding packets for GL processing.
  • DELETE_EVENTS — Removes budgetary control events, typically by ledger and accounting date range, so that previously generated events can be purged or regenerated without leaving stale packets behind.
  • DELETE_PROCESSED_ORPHAN_EVENTS — Cleans up event records that have already been processed but are no longer associated with a valid source transaction, preventing orphaned packets from accumulating.
  • GET_DETAILED_RESULTS — Returns detailed funds-check outcome information for the events under consideration so the caller can determine per-distribution results.
  • GET_GL_FUNDSCHK_RESULT_CODE — Retrieves the funds-check result code recorded by General Ledger for a given event, allowing Payables to interpret success or failure outcomes.
  • PROCESS_FUNDSCHK_FAILURE_CODE — Interprets a funds-check failure code and applies the appropriate processing logic, such as raising holds or marking the transaction as failed.
  • REINSTATE_PO_ENCUMBRANCE — Reinstates purchase order encumbrance balances that were relieved, restoring the encumbrance position after a reversal or cancellation scenario.
  • GET_PO_REVERSED_ENCUMB_AMOUNT — Returns the amount of encumbrance that was reversed for a purchase order, used to reconcile encumbrance accounting.
  • ISPREPAYDIST — Determines whether a given invoice distribution represents a prepayment distribution, which affects how funds checking and encumbrance treatment are applied.

Tables Accessed

The package reads and writes the core Payables invoice tables, including AP_INVOICES, AP_INVOICES_ALL, AP_INVOICE_DISTRIBUTIONS, AP_INVOICE_DISTRIBUTIONS_ALL, and AP_INVOICE_LINES, to obtain the invoice and distribution attributes needed to construct events. AP_SELF_ASSESSED_TAX_DIST_ALL supplies self-assessed tax distribution information. GL_BC_PACKETS holds the budgetary control event packets created and queried by the package. Encumbrance processing relies on AP_ENCUMBRANCE_LINES_ALL. Holds behavior uses AP_HOLDS and AP_HOLD_CODES when failures must be recorded. Prepayment handling references AP_PREPAY_APP_DISTS and AP_PREPAY_HISTORY_ALL. Setup and system options are read from AP_SYSTEM_PARAMETERS and FINANCIALS_SYSTEM_PARAMETERS, and diagnostic output is written to FND_LOG_MESSAGES.

Usage Notes

PSA_AP_BC_PVT is invoked internally rather than called directly from forms or concurrent programs. It is referenced by four other packages, which drive event creation during invoice validation, apply funds-check results, and manage cleanup of processed events. The delete_events procedure is most relevant during regeneration or rollback of budgetary control events, for example when an invoice is cancelled or when events must be purged by ledger and date range. Custom code should not call this private package directly; instead, use the supported public Payables APIs and budgetary control flows. Debug output can be enabled through the package's internal debug flag, with messages routed to FND_LOG_MESSAGES for troubleshooting.