Search Results retention_billing_processing




Overview

APPS.PA_RETN_BILLING_PKG is the retention billing engine within Oracle Projects (PA). Its principal business function is to transform eligible retention receivable balances accumulated on a project into a formatted draft invoice, apply the customer-defined retention invoice format, and generate the resulting invoice header, lines, and detail records. The package bridges the Projects retention subledger and Oracle Receivables' invoice interface by populating the PA_DRAFT_INVOICES hierarchy, thereby allowing retention amounts withheld from prior progress billings to be released and billed on a contractual schedule. The package header version recorded in the source excerpt (PAXIRTBB.pls 120.6.12010000.2) is consistent with EBS 12.1.1 and carries forward into 12.2.2, where the identical PL/SQL remains the runtime component behind the Retention Billing concurrent program.

The package is classified as OTHER in the ETRM metadata, indicating it is an internal engine rather than a supported public API. It exposes a debug switch governed by the PA_DEBUG_MODE profile option, which routes trace messages through PA_RETENTION_UTIL.WRITE_LOG when set to 'Y'.

Key Procedures and Functions

  • GET_RETN_BILLING_INV_FORMAT — Returns a PL/SQL table describing the retention invoice format for a given project. It joins PA_INVOICE_GROUP_COLUMNS, PA_INVOICE_FORMATS, PA_INVOICE_FORMAT_DETAILS, and PA_PROJECTS_ALL, keyed on the project's RETN_BILLING_INV_FORMAT_ID. Each element carries the column code, user-facing text, start and end positions, and the right-justify flag used to assemble a fixed-width retention billing line.
  • RETENTION_BILLING_PROCESSING — The main driver invoked by the retention billing concurrent program. It orchestrates the end-to-end flow: determining eligible retention, building the invoice, and writing the resulting lines and details. This is the entry point corresponding to the user search term "retention_billing_processing."
  • BUILD_RETN_INVOICE_HEADER — Constructs the draft invoice header record for the retention invoice, establishing the invoice identity consumed by downstream line creation.
  • CHECKINVOICEEXISTS — Validates whether a retention invoice already exists for the project or billing cycle, preventing duplicate invoice generation.
  • CREATE_RETN_INVOICE_LINES — Populates the draft invoice line records using the format returned by GET_RETN_BILLING_INV_FORMAT.
  • CREATE_RETN_INVOICE_DETAILS — Writes the item-level detail rows that support each retention invoice line.
  • UPDATE_PROJFUNC_ATTRIBUTES — Updates project functional attributes, typically flags that mark retention as billed or adjust related billing status.
  • UPDATE_INV_TRANS_ATTRIBUTES — Updates invoice transaction attributes, recording the linkage between the source retention transactions and the generated invoice.
  • INVOICE_GENERATION_EXCEPTIONS — Supplies or raises the exception handling path used when invoice generation cannot proceed.

Tables Accessed

The package reads and writes the Projects draft invoice hierarchy through PA_DRAFT_INVOICES, PA_DRAFT_INVOICES_ALL, PA_DRAFT_INVOICES_S, and PA_DRAFT_INVOICE_ITEMS, which hold the generated retention invoice and its lines and details. PA_AGREEMENTS_ALL and PA_BILLING_CYCLES provide the contractual and cycle context that determines billing eligibility, while PA_IMPLEMENTATIONS supplies operating unit configuration. PA_INVOICE_FORMATS and PA_INVOICE_FORMAT_DETAILS (referenced through the format query) define the retention invoice layout. PA_DISTRIBUTION_WARNINGS captures warning conditions raised during processing. Several Oracle Trading Community (HZ) tables — HZ_PARTIES, HZ_CUST_ACCOUNTS, HZ_CUST_ACCT_RELATE, HZ_CUST_ACCT_SITES, HZ_CUST_SITE_USES, HZ_CUSTOMER_PROFILES, and HZ_ROLE_RESPONSIBILITY — resolve the bill-to customer, site, and contact information required on the generated invoice.

Usage Notes

PA_RETN_BILLING_PKG is not intended for direct invocation from forms or custom PL/SQL. It is executed by the Retention Billing concurrent program, which submits the retention release for one or more projects or billing cycles. In 12.1.1 and 12.2.2 the same package body is used, so behavior and table dependencies are consistent across releases; the only visible configuration surface is the PA_DEBUG_MODE profile option and the retention invoice format defined on the project. Because the package is referenced by one other package in the APPS schema, customizations should avoid direct calls to its internal procedures and instead invoke the concurrent program, relying on the standard exception reporting to diagnose failures.