Search Results next_eventnum
Overview
The APPS.PA_BILLING_SEQ package is a utility package within the Oracle E-Business Suite Projects (PA) module responsible for generating serial numbers of various types used during project billing and event processing. As defined in the source header, its stated purpose is to provide "procedures which return serial numbers of any sort." In practice, the package centralizes sequence-number generation logic so that dependent billing and event-handling routines obtain consistent, unique numeric identifiers without querying sequence objects directly. The package is declared with AUTHID CURRENT_USER, meaning its procedures execute with the privileges of the invoking user rather than the package owner, which allows it to respect the calling session's security context when resolving objects such as the PA_EVENTS table.
The package is classified as OTHER in the ETRM API classification, indicating that it is not a formal public API intended for external integration but rather an internal helper package used by other Projects components. The header comment dates the original source to 1999, reflecting its long-standing role in the billing code base across releases including 12.1.1 and 12.2.2.
Key Procedures and Functions
Two functions are documented in the package specification:
- NEXT_EVENTNUM — Returns the next event number for a given project or task. Per the embedded usage comment, the function is invoked as
new_eventnum = next_eventnum(project_id, task_id). Theproject_idparameter is mandatory; the task identifier scopes the sequence to a task level when supplied. The function returns aNUMBERrepresenting the next available event number. This is the function most commonly sought by users searching fornext_eventnum, as it is the primary entry point for obtaining sequential event identifiers within the billing event lifecycle. - SESSION_ID — Returns a numeric session identifier. This function supports the package's broader sequence-generation role, supplying a session-scoped number that callers can use to distinguish activity across concurrent sessions.
The package specification enumerates only these two callable elements. No additional procedures or functions are documented in the provided metadata, and parameter lists should not be assumed beyond what is shown.
Tables Accessed
The ETRM metadata records two objects referenced by this package via APPS synonyms:
- PA_EVENTS — The Projects events table, which stores billing events generated against projects and tasks. The package reads this table to determine the highest existing event number and thereby return the next value in sequence.
- DUAL — The standard Oracle single-row pseudo-table, used here for lightweight expression evaluation and sequence-style value retrieval.
Because the package is AUTHID CURRENT_USER, access to PA_EVENTS is validated against the calling user's privileges.
Usage Notes
PA_BILLING_SEQ is typically invoked indirectly rather than by end users. It is referenced by two other packages, which call NEXT_EVENTNUM when creating or staging billing events so that each event receives a monotonically increasing identifier scoped to its project or task. Typical entry points include billing event generation routines executed from the Projects Billing forms and concurrent programs that process event revenue and invoicing.
Custom code extending Oracle Projects billing should call NEXT_EVENTNUM rather than computing event numbers independently, ensuring consistency with the standard event-numbering logic and avoiding collisions with PA_EVENTS records created by the application. Because the function is task-aware, callers must pass the correct task_id where event numbering is expected to be task-specific. As an internal helper package, its signature is stable across 12.1.1 and 12.2.2 but is not formally published as a supported extension API, so customizations relying on it should be regression-tested during upgrades.
-
PACKAGE: APPS.PA_BILLING_SEQ
12.2.2
-
PACKAGE: APPS.PA_BILLING_SEQ
12.1.1
-
PACKAGE BODY: APPS.PA_BILLING_SEQ
12.2.2
-
PACKAGE BODY: APPS.PA_BILLING_SEQ
12.1.1