Search Results get_holds_count
Overview
APPS.AP_INVOICES_UTILITY_PKG is a Payables utility package in Oracle E-Business Suite that centralizes reusable lookup, validation, and derived-value logic for invoices. Rather than embedding repetitive SQL against the invoice, distribution, hold, and prepayment tables inside individual forms, concurrent programs, and APIs, the E-Business Suite codebase exposes this logic through a single package of scalar functions and validation procedures. The package header carries the revision marker $Header: apinvuts.pls 120.17.12010000.2 2008/11/11, placing its principal evolution in the 12.1.x code line, and the object remains catalogued under the APPS schema in both 12.1.1 and 12.2.2. Its functions are oriented toward presentation and decision support: returning descriptive attributes (PO, release, receipt, prepayment references), monetary aggregates (distribution totals, withheld and prepaid amounts), status determinations (posting, approval, encumbrance), and hold indicators. The package is classified as OTHER in the ETRM registry and is referenced by 45 other packages, underscoring its role as shared infrastructure within the Payables and related modules.
Key Procedures and Functions
The documented interface divides into validation procedures, reference/derivation functions, and status functions.
- CHECK_UNIQUE — Validates uniqueness of an invoice number for a given vendor and operating unit context.
- CHECK_UNIQUE_VOUCHER_NUM — Validates uniqueness of a voucher number.
- GET_PREPAY_NUMBER / GET_PREPAY_DIST_NUMBER — Return the prepayment identifier and prepayment distribution identifier associated with a prepayment distribution.
- GET_DISTRIBUTION_TOTAL — Returns the aggregated distribution amount for an invoice.
- GET_POSTING_STATUS — Returns the posting status of an invoice, used to determine accounting transfer state.
- GET_APPROVAL_STATUS — Derives the approval status from invoice amount, payment status flag, and invoice type.
- GET_PO_NUMBER / GET_RELEASE_NUMBER / GET_RECEIPT_NUMBER — Return the purchasing document references associated with an invoice line population.
- GET_PO_NUMBER_LIST — Returns a concatenated list of PO numbers where multiple purchase orders apply.
- GET_AMOUNT_WITHHELD / GET_PREPAID_AMOUNT — Return withheld and prepaid monetary amounts for an invoice.
- GET_NOTES_COUNT — Returns the count of invoice notes.
- GET_HOLDS_COUNT — Returns the number of active holds on an invoice, the function most commonly searched for in this package.
- GET_SCHED_HOLDS_COUNT — Returns the count of holds applied to invoice schedules (introduced via Bug 5334577).
- GET_AMOUNT_HOLD_FLAG / GET_VENDOR_HOLD_FLAG — Return flags indicating whether amount-level or vendor-level holds exist.
- GET_TOTAL_PREPAYS / GET_AVAILABLE_PREPAYS — Return total and available prepayment amounts for a vendor and operating unit.
- GET_ENCUMBERED_FLAG — Returns a flag indicating whether the invoice is encumbered.
Tables Accessed
The package reads and, for validation purposes, may query the principal Payables invoice tables through APPS synonyms. Header-level logic draws on AP_INVOICES_ALL and its interface counterpart AP_INVOICES_INTERFACE. Line and distribution logic uses AP_INVOICE_LINES_ALL, AP_INVOICE_LINES, AP_INVOICE_DISTRIBUTIONS_ALL, AP_INVOICE_DISTRIBUTIONS, and AP_INVOICE_LINES_INTERFACE. Hold-related functions query AP_HOLDS and AP_HOLDS_ALL. Prepayment and payment references rely on AP_CHECKS. Purchasing-reference and history functions use AP_HISTORY_INVOICES_ALL and AP_EXPENSE_REPORT_HEADERS, with AP_APINV_APPROVERS supporting approval-related logic.
Usage Notes
AP_INVOICES_UTILITY_PKG is typically invoked from Oracle Forms (notably the Invoice Workbench), concurrent programs, and custom PL/SQL extensions to obtain derived invoice attributes without duplicating business logic. Because the functions are read-oriented, they are safe to call in validation, defaulting, and display contexts. Custom code should always call the packaged functions rather than reimplementing queries, since internal SQL is owned and patched by Oracle. Note that GET_HOLDS_COUNT and GET_SCHED_HOLDS_COUNT serve distinct purposes — invoice-level versus schedule-level holds — and both should be considered when summarizing hold exposure. As with all objects in APPS, execute privileges and any dependency on specific form or view state should be considered before reuse in extensions.
-
PACKAGE: APPS.AP_INVOICES_UTILITY_PKG
12.1.1
-
PACKAGE: APPS.AP_INVOICES_UTILITY_PKG
12.2.2
-
PACKAGE: APPS.AP_INVOICES_PKG
12.1.1
-
PACKAGE: APPS.AP_INVOICES_PKG
12.2.2
-
PACKAGE BODY: APPS.AP_INVOICES_UTILITY_PKG
12.1.1
-
PACKAGE BODY: APPS.AP_INVOICES_UTILITY_PKG
12.2.2
-
PACKAGE BODY: APPS.AP_INVOICES_PKG
12.1.1
-
PACKAGE BODY: APPS.AP_INVOICES_PKG
12.2.2
-
APPS.AP_INVOICES_PKG dependencies on AP_INVOICES_UTILITY_PKG
12.1.1
-
APPS.AP_INVOICES_PKG dependencies on AP_INVOICES_UTILITY_PKG
12.2.2
-
APPS.AP_INVOICES_PKG dependencies on AP_INVOICES
12.1.1
-
APPS.AP_INVOICES_PKG dependencies on AP_INVOICES
12.2.2