Search Results invoice_generation_exceptions
Overview
PA_RETN_BILLING_PKG is an Oracle Applications (APPS) PL/SQL package that supports the retention billing functionality within the Oracle E-Business Suite Projects (PA) module. Retention billing is the practice of withholding a percentage of contract billings until project milestones or acceptance criteria are satisfied. This package provides the core logic used to identify retention-eligible transactions, construct draft retention invoices, generate corresponding invoice lines and details, and manage exceptions that arise during the retention invoice generation process.
The package resides in the APPS schema and holds a VALID status in both Oracle EBS 12.1.1 and 12.2.2. Within the ETRM classification, it is categorized as an OTHER (non-API) package, which indicates that it is intended primarily for internal invocation by Oracle Projects billing processes rather than as a documented external integration interface. Its presence under PA_RETN_BILLING_PKG ensures that retention-related billing activities remain centralized and consistent with the broader Projects billing engine.
Because the package depends on the SYS.STANDARD construct and is referenced by PA_INVOICE_CURRENCY as well as by one additional package, it occupies a mid-tier position in the Oracle Projects billing dependency chain — invoked during invoice construction, currency handling, and retention processing rather than being a top-level entry point itself.
Key Procedures and Functions
The documented package exposes nine procedures and functions:
- GET_RETN_BILLING_INV_FORMAT — Retrieves the invoice format configuration applicable to retention billing, typically to align generated documents with the expected retention invoice layout.
- RETENTION_BILLING_PROCESSING — The principal driver routine that orchestrates the end-to-end retention billing workflow, coordinating header construction, line creation, and detail generation.
- BUILD_RETN_INVOICE_HEADER — Constructs the retention invoice header record, populating identifying and descriptive attributes required before lines can be attached.
- CHECKINVOICEEXISTS — Validates whether a retention invoice already exists for the given context, preventing duplicate invoice generation.
- CREATE_RETN_INVOICE_LINES — Creates the individual retention invoice line records associated with a draft retention invoice.
- CREATE_RETN_INVOICE_DETAILS — Generates the supporting detail records for the retention invoice lines, ensuring linkage between retention amounts and underlying project transactions.
- UPDATE_PROJFUNC_ATTRIBUTES — Updates project functional attributes, such as flags or statuses, to reflect that retention billing activity has occurred.
- UPDATE_INV_TRANS_ATTRIBUTES — Updates invoice transaction attributes, marking retention transactions as processed or otherwise adjusting their billing state.
- INVOICE_GENERATION_EXCEPTIONS — Captures and handles exceptions encountered during retention invoice generation so that failures are recorded rather than silently discarded.
Tables Accessed
The package operates against a well-defined set of application tables, accessed through APPS synonyms. The billing and projects tables include PA_DRAFT_INVOICES, PA_DRAFT_INVOICES_ALL, PA_DRAFT_INVOICES_S, PA_DRAFT_INVOICE_ITEMS, PA_AGREEMENTS_ALL, PA_BILLING_CYCLES, PA_DISTRIBUTION_WARNINGS, and PA_IMPLEMENTATIONS. These support draft invoice headers, lines, agreement terms, billing cycle configuration, and installation-level settings.
Trading partner and customer information is drawn from the HZ tables: HZ_CUSTOMER_PROFILES, HZ_CUST_ACCOUNTS, HZ_CUST_ACCT_RELATE, HZ_CUST_ACCT_SITES, HZ_CUST_SITE_USES, HZ_PARTIES, and HZ_ROLE_RESPONSIBILITY. These provide the bill-to and ship-to context required on retention invoices.
Usage Notes
PA_RETN_BILLING_PKG is invoked internally by Oracle Projects billing processes rather than by end users directly. In standard Oracle EBS 12.1.1 and 12.2.2 deployments, it is triggered through the Projects billing cycle and retention billing concurrent programs, and it is called from within related packages such as PA_INVOICE_CURRENCY. Forms-based invoice review and adjustment operate on the draft invoices that this package produces.
Custom extensions may call the package when implementing specialized retention scenarios, but any such use should respect the internal nature of the routines and the dependency chain documented in ETRM. Because the procedures assume valid draft invoice context and application installation settings, appropriate error handling and reference to INVOICE_GENERATION_EXCEPTIONS is advisable in any custom invocation.
-
PACKAGE: APPS.PA_RETN_BILLING_PKG
12.1.1
-
PACKAGE: APPS.PA_RETN_BILLING_PKG
12.2.2
-
PACKAGE BODY: APPS.PA_RETN_BILLING_PKG
12.1.1
-
PACKAGE BODY: APPS.PA_RETN_BILLING_PKG
12.2.2
-
APPS.PA_RETN_BILLING_PKG SQL Statements
12.1.1
-
APPS.PA_RETN_BILLING_PKG SQL Statements
12.2.2
-
APPS.PA_RETN_BILLING_PKG dependencies on PA_DISTRIBUTION_WARNINGS
12.1.1
-
APPS.PA_RETN_BILLING_PKG dependencies on PA_DISTRIBUTION_WARNINGS
12.2.2
-
APPS.PA_RETN_BILLING_PKG dependencies on PA_RETENTION_UTIL
12.1.1
-
APPS.PA_RETN_BILLING_PKG dependencies on PA_RETENTION_UTIL
12.2.2
-
APPS.PA_RETN_BILLING_PKG dependencies on PA_RETN_BILLING_PKG
12.1.1
-
APPS.PA_RETN_BILLING_PKG dependencies on PA_RETN_BILLING_PKG
12.2.2