Results for “pa_ic_inv_utils”
50+ results
AI-generated from documented ETRM metadata — verify critical details on the linked pages.
Overview
PA_IC_INV_UTILS is a PL/SQL package body in the APPS schema that supports Oracle Projects intercompany (IC) invoicing. It provides the low-level utilities used by the intercompany invoice generation flow: creating draft intercompany invoices, populating and updating draft invoice lines and items, marking expenditure items as billed, updating project funding summaries, and recording validation or warning messages. In Release 12.1.1 and 12.2.2 the object is documented with a status of VALID and classified as an OTHER API. The package is a supporting utility rather than a public business API; it is consumed internally by the intercompany invoicing programs and the packages they call.
Key Procedures and Functions
The documented package exposes twelve procedures and functions, described below by purpose only.
- INIT — Initializes package-level state and session context before intercompany processing begins.
- GET_NEXT_DRAFT_INV_NUM — Returns the next draft invoice number used when creating a new draft intercompany invoice.
- COMMIT_INVOICE — Finalizes and commits a completed draft intercompany invoice.
- UPDATE_SPF — Updates the project summary funding record in line with the intercompany invoice activity.
- MARK_INV_ERROR — Records an error condition against an invoice so that processing can report the failure.
- MARK_EI_AS_BILLED — Flags expenditure items as billed once they have been included on an intercompany invoice.
- SET_USER_LOCK — Acquires a user-level lock to prevent concurrent processing of the same invoice or project.
- RELEASE_USER_LOCK — Releases the user-level lock previously acquired.
- CHECK_IF_UNRELEASED_INVOICE — Determines whether an unreleased draft intercompany invoice exists, guarding against duplicate generation.
- UPDATE_DI_FOR_MRC — Propagates draft invoice updates to the multiple reporting currency (MRC) context in releases where MRC applies.
- GET_ACTIVE_SITES — Retrieves active customer site usage information required to populate intercompany invoice header or line data.
- LOG_MESSAGE — Writes diagnostic or progress messages to the standard Projects debug/logging mechanism.
Tables Accessed
The package reads and writes the core intercompany invoice tables through APPS synonyms. PA_DRAFT_INVOICES and PA_DRAFT_INVOICES_ALL hold the draft invoice header and its multi-organization variant; PA_DRAFT_INVOICE_DETAILS and PA_DRAFT_INVOICE_ITEMS store invoice line detail and item-level amounts. PA_EXPENDITURE_ITEMS_ALL supplies the source expenditure items and is updated when items are marked as billed. PA_SUMMARY_PROJECT_FUNDINGS is refreshed through UPDATE_SPF to keep funding balances consistent. PA_DISTRIBUTION_WARNINGS captures warning messages raised during distribution processing. Supporting lookups and customer data are drawn from PA_LOOKUPS, HZ_CUSTOMER_PROFILES and HZ_CUST_SITE_USES, while GL_ALC_LEDGER_RSHIPS_V provides ledger relationship information used in the intercompany accounting context. Utility dependencies include FND_PROFILE, PA_DEBUG, PA_PLSQL_DATATYPES, PA_MC_INVOICE_DETAIL_PKG and STANDARD.
Usage Notes
PA_IC_INV_UTILS is invoked indirectly. It is called by the intercompany invoice generation concurrent programs and by the five other packages documented as depending on it; it is not referenced by any database object outside that dependency set. Typical invocation occurs when the intercompany invoice process creates a draft invoice, assigns a draft invoice number, validates the expenditure items to be billed, applies user locks to prevent concurrent runs, and writes results back to the draft invoice and funding tables. Customers and implementers generally do not call these procedures directly. Custom extensions should instead use the supported intercompany billing APIs, and any debugging of intercompany invoice generation can rely on LOG_MESSAGE output, which is controlled through the standard Projects debug profile options.