Search Results get_po_number_list




Overview

ICX_AP_INVOICES_PKG is an Oracle Application Object Library utility package owned by the APPS schema in Oracle E-Business Suite. It is declared with AUTHID CURRENT_USER, meaning that its SQL statements execute under the privileges of the invoking user rather than the definer, a design pattern typical of helper packages called from Oracle Self-Service Web Applications (ICX) and Oracle iProcurement flows. Its role is to consolidate small, reusable lookups that support the Accounts Payable invoice inquiry and web-based invoice presentation layer. Specifically, the package extracts supplier-side purchasing references and withholding information for a given invoice so that web pages and forms can render them without embedding complex joins in the calling code.

The header comment ($Header: ICXAPINS.pls 115.0 99/08/09) indicates the package originated in the late 1990s and has remained a stable, low-versioned component through the 12.1.1 and 12.2.2 releases. It is a thin read-only API rather than a transactional interface.

Key Procedures and Functions

The package exposes two documented program units:

  • GET_PO_NUMBER_LIST — a function that returns a VARCHAR2 value containing the purchase order number or list of PO numbers associated with a supplied invoice. It is the object most commonly surfaced when users search on "get_po_number_list," reflecting its use in invoice-to-PO drill-down navigation. The RESTRICT_REFERENCES pragma (WNDS, WNPS, RNPS) certifies that the function writes no database state, writes no package state, and reads no package state, confirming its purely query-based behavior.
  • GET_AMOUNT_WITHHELD — a function returning a NUMBER that reports the amount withheld against the invoice, typically driven by tax withholding or payment terms. Like its companion, it carries the same RESTRICT_REFERENCES pragma, so it is safe to invoke from SQL and from within PL/SQL expressions without side effects.

Only these two program units are documented; no parameter lists beyond the single invoice identifier are asserted here.

Tables Accessed

The package reads two base tables through APPS synonyms:

  • AP_INVOICE_DISTRIBUTIONS — the invoice distribution lines that carry the PO reference columns linking an invoice to its originating purchase order, and the distribution amounts used in withholding calculations.
  • PO_HEADERS — the purchasing document header, supplying the human-readable PO number returned by GET_PO_NUMBER_LIST.

Both are read-only accesses consistent with the RESTRICT_REFERENCES declarations. No inserts, updates, or deletes are documented.

Usage Notes

ICX_AP_INVOICES_PKG is a helper package, not a public API. It is referenced by five other packages, indicating it is called internally from the Self-Service invoice inquiry stack and related ICX/AP integration code. Typical invocation patterns include:

  • Oracle Forms and OAF-based invoice inquiry pages that need to display the related PO number or withheld amount on an invoice header block.
  • PL/SQL regions embedded in web pages that call the functions directly because of their purity pragmas.
  • Custom extensions and reports that require a lightweight, single-call lookup instead of writing their own join between AP_INVOICE_DISTRIBUTIONS and PO_HEADERS.

Because the functions are deterministic with respect to database state and free of side effects, they may be safely embedded in SQL SELECT lists and WHERE clauses. Developers extending AP functionality should treat this package as a convenience wrapper rather than modifying it, since it is a seeded Oracle object whose signature is expected to remain stable across 12.1.1 and 12.2.2.