Search Results pa_billing




Overview

PA_BILLING is a core PL/SQL package body in the Oracle E-Business Suite Projects (PA) module, owned by the APPS schema and validated as VALID under ETRM 12.2.2 and 12.1.1. It serves as the primary internal engine behind the Project Billing workbench, supporting the generation of draft invoices, draft revenue, and the associated accounting distributions for contract projects. The package encapsulates the procedural logic that orchestrates the billing cycle: identifying billable agreements and billing assignments, computing bill amounts through cost-plus, labor, and non-labor billing extensions, and populating the draft invoice and revenue tables that later feed Oracle Receivables and the general ledger.

The package is a composite of reusable private helpers and driver routines rather than a customer-facing API. Oracle classifies it as OTHER, and although APPS.PA_BILLING is not referenced by any database object, it is referenced by 23 other packages, underscoring its role as a shared billing utility layer consulted by higher-level programs such as PA_BILLING_PUB, PA_MULTI_CURRENCY_BILLING, and PA_MCB_INVOICE_PKG. The package also exposes client-extension hooks (via PA_CLIENT_EXTN_BILLING, PA_NON_LABOR_BILL_CLT_EXTN, and PA_BILLING_EXTENSIONS), enabling customers to inject custom billing logic during invoice generation.

Key Procedures and Functions

The ETRM metadata documents 28 procedures and functions. Prominent public accessors include GETINVOICENZ, GETINVOICEDATE, GETPADATE, GETGLDATE, GETGLPERIODNAME, GETPAPERIODNAME, GETBILLTHRUDATE, and GETBILLINGASSIGNMENTID, which retrieve invoice numbers, invoice dates, PA and GL dates, period names, bill-through dates, and billing assignment identifiers used during processing. GETMASSGEN and SETMASSGEN manage the mass-generation indicator controlling bulk invoice runs, while GETREQID, GETPROJID, and SETPROJID track the concurrent request and project context in session state.

Control-flow helpers GETCALLPLACE and GETCALLPROCESS determine the invoking context so the same logic can be reused across the Billing workbench and concurrent generators. GETBILLINGEXTENSIONID resolves the appropriate billing extension to apply for a given agreement.

Several routines perform substantive billing work. BILL_EXT_DRIVER drives the billing extension framework, invoking customer-defined extensions where configured. CCREV appears related to revenue computation (cost-based revenue), while CALL_CALC_BILL_AMOUNT invokes bill amount calculation for eligible expenditure items. DELETE_AUTOMATIC_EVENTS removes system-generated events when billing is regenerated, preventing duplicate distributions. Together these functions form the internal call chain that transforms expenditure items and events into draft invoices and draft revenues.

Tables Accessed

The package reads and writes through APPS synonyms. Billing configuration is read from PA_AGREEMENTS_ALL, PA_BILLING_ASSIGNMENTS, and PA_BILLING_EXTENSIONS. Billable transactions are sourced from PA_EXPENDITURE_ITEMS_ALL and PA_EVENTS, with event classification from PA_EVENT_TYPES. Project context is derived from PA_PROJECTS_ALL and PA_TASKS. Output is written to PA_DRAFT_INVOICES and PA_DRAFT_INVOICES_ALL, PA_DRAFT_INVOICE_ITEMS, PA_DRAFT_REVENUES and PA_DRAFT_REVENUES_ALL, and PA_DRAFT_REVENUE_ITEMS. Revenue distribution lines are posted to PA_CUST_EVENT_REV_DIST_LINES and PA_CUST_EVENT_RDL_ALL. PA_IMPLEMENTATIONS supplies installation-level setup values.

Usage Notes

PA_BILLING is not invoked directly from Oracle Forms; it is called by concurrent programs such as Generate Draft Invoices and Generate Draft Revenue, and by the Billing workbench client extension points. Custom developers should treat it as an internal package and prefer the sanctioned public API PA_BILLING_PUB for integrations. Because of its wide dependency footprint, any customization affecting its behavior should be isolated to client extensions registered through PA_CLIENT_EXTN_BILLING, preserving upgrade safety across 12.1.1 and 12.2.2.