Search Results open_mod_exists




Overview

PO_CLOSEOUT_PVT is a private PL/SQL package in the APPS schema that encapsulates the core business logic supporting the Oracle Purchasing closeout process. Its primary purpose is to evaluate whether a purchasing document — a standard purchase order, blanket, contract, or global agreement — is eligible to be closed, and to execute the closure once eligibility is confirmed. Closeout is the process by which a buyer or the system formally finalizes a document so that no further receiving, invoicing, or modification activity is permitted against it. The package validates the outstanding quantities across receiving, invoicing, and payment activities, evaluates exceptions, manages the closeout status stored in the PO_CLOSEOUT_DETAILS tables, and supports both single-document and mass closeout scenarios. Because it is classified as a PVT (private) package, it is not intended to be called directly by external integrations; instead it is invoked by the public closeout APIs and concurrent programs that Oracle ships.

Key Procedures and Functions

The package exposes a broad set of internal routines that are organized around validation, eligibility, and status management:

Tables Accessed

The package reads and writes across purchasing, payables, and contracts schemas. PO_HEADERS, PO_DISTRIBUTIONS_ALL, PO_DRAFTS, and PO_ACTION_HISTORY supply the document, distribution, draft, and action history data central to validation. PO_CLOSEOUT_DETAILS and PO_CLOSEOUT_DETAILS_S store the closeout detail rows and their sequence values, recording per-document closeout state. AP_INVOICES_ALL and AP_INVOICE_DISTRIBUTIONS_ALL provide the invoice and invoice distribution data needed to determine whether invoicing and payment are complete. OKC_DELIVERABLES and OKC_REP_CONTRACT_USAGES support the contracts integration used when closing agreements, while FND_ATTACHED_DOCUMENTS, FND_DOCUMENTS, and FND_LOBS handle attachments associated with closeout records. HR_ALL_ORGANIZATION_UNITS_TL and PO_DOC_STYLE_HEADERS provide organizational and document style context, and FND_PROFILE is queried for profile option values that control behavior.

Usage Notes

PO_CLOSEOUT_PVT is not a public API and should not be called directly by custom code. It is referenced by PO_CLM_DOCUMENT_CONTROL_PVT and PO_CLM_OKC_INTEG_PKG, and it calls itself recursively, indicating that the closeout framework is reused by the contracts management and Oracle Knowledge Center integration layers. In practice, the package is driven through the Purchasing Closeout window, the Manage Closeout flow, and the Mass Closeout concurrent program, all of which rely on its validation and eligibility logic. Developers extending closeout behavior should invoke the public closeout APIs or the documented concurrent programs rather than this private package, since its interface is subject to change between releases such as 12.1.1 and 12.2.2.