Search Results pa_events_pkg




Overview

PA_EVENTS_PKG is a PL/SQL package body in the APPS schema that supports the Oracle Projects (PA) event-based revenue and billing subsystem. Its principal business purpose is to provide the low-level, table-maintenance logic that underlies customer events — the user-defined occurrences (for example, milestones reaching completion or deliverables being accepted) that trigger revenue recognition, invoicing, and unbilled receivable processing in the Projects application. Because it is a package body with an API classification of OTHER rather than a public, documented business API, PA_EVENTS_PKG is best understood as a supporting utility layer rather than a formally published integration interface.

Key Procedures and Functions

The package exposes six documented program units, partitioned cleanly into DML helpers and status-check predicates.

  • INSERT_ROW — Creates a new row in the underlying event table structure. It is the codepath used when a new customer event is registered against a project or contract.
  • LOCK_ROW — Acquires an exclusive row lock prior to a modification, providing optimistic concurrency control so that concurrent revenue or billing programs cannot corrupt an event mid-update.
  • UPDATE_ROW — Modifies an existing event record, applying changed event attributes and audit columns.
  • DELETE_ROW — Removes an event row, typically invoked when a wrongly entered or reversed event must be eliminated.
  • IS_EVENT_PROCESSED — A predicate that returns whether a given event has already been processed (for example, swept into revenue or draft invoice generation). Callers use this to guard against double processing.
  • IS_EVENT_BILLED — A predicate that determines whether an event has already been billed, allowing billing logic to skip events that have already produced invoice lines.

All six units are named without disclosed parameter lists here; the DML routines perform standard CRUD semantics, while the two IS_ functions provide boolean status evaluation against related transaction tables.

Tables Accessed

The package operates across the core event and billing tables, all reached through APPS synonyms:

  • PA_EVENTS — the master event table; the primary insert, lock, update, and delete target.
  • PA_EVENTS_S — the sequence source used to generate unique event identifiers on insert.
  • PA_EVENT_TYPES — the event-type setup/validation table, read to classify an event for revenue and billing treatment.
  • PA_CUST_EVENT_REV_DIST_LINES — customer event revenue distribution lines; consulted by IS_EVENT_PROCESSED to confirm revenue has been distributed.
  • PA_DRAFT_INVOICE_ITEMS — draft invoice item detail; consulted by IS_EVENT_BILLED to confirm billing status.

Additional dependencies include PA_EVENTS_PKG (recursive/internal calls), APP_EXCEPTION and FND_MESSAGE for standardized error handling, and DUAL/STANDARD.

Usage Notes

PA_EVENTS_PKG is not intended for direct customer invocation, and it is not referenced by any database object outside its own dependency chain; rather, it is invoked by six other packages within the Projects suite. Typical invocation occurs from Oracle Projects forms (event entry and maintenance windows), from concurrent programs performing revenue generation and draft invoice creation, and from internal PL/SQL in the event and billing APIs. Custom code should prefer the supported, published Projects APIs; direct calls to PA_EVENTS_PKG carry the risk that the package is private and may change between EBS 12.1.1 and 12.2.2. When custom development must call it, invoke the DML helpers inside a single transaction with LOCK_ROW, and use IS_EVENT_PROCESSED and IS_EVENT_BILLED to enforce idempotency before reprocessing events.