Search Results is_document_cto_order
Overview
PO_DOCUMENT_CANCEL_PVT is a private (PVT) PL/SQL package in the APPS schema that encapsulates the business logic used to cancel purchasing documents within Oracle E-Business Suite Release 12.1.1 and 12.2.2. It is part of the Oracle Purchasing application programming interface layer and operates as a supporting engine behind the public-facing document control APIs rather than as a directly callable interface for external integrations. The package is registered with an API classification of "PVT," confirming that its members are intended for internal consumption by Oracle's own purchasing code and are not guaranteed under Oracle's public API compatibility policy. Its principal responsibility is to validate the conditions under which a purchase order, release, or associated document may be cancelled, and then to perform the cancellation while preserving transactional and audit integrity. Because the package coordinates header, line, shipment, distribution, and requisition-level state, it ensures that dependent records are adjusted or blocked before a document is transitioned to CANCELLED status.
Key Procedures and Functions
The documented package exposes four procedures and functions, each reflecting a distinct stage of the cancellation workflow.
- CANCEL_DOCUMENT — The primary entry point. It performs the end-to-end cancellation of the target purchasing document, applying the validation results gathered by the other members and updating document status and supporting records accordingly.
- VAL_CANCEL_BACKING_REQS — A validation routine that assesses backing requisitions linked to the document being cancelled. It determines whether associated requisition demand can be safely released or must be protected, and prevents cancellation when requisition dependencies would be violated.
- IS_DOCUMENT_CTO_ORDER — A predicate function that identifies whether the document in question is a Configure-to-Order (CTO) order. CTO documents carry configured item structures that impose additional cancellation constraints, so this check governs whether the standard cancellation path is permissible.
- CALCULATE_QTY_CANCEL — Computes the quantities eligible for cancellation, reconciling ordered, received, and already-cancelled quantities so that the cancellation reflects only the valid remaining balance.
Tables Accessed
The package reads and writes a wide set of Purchasing and common application tables through APPS synonyms. Document classification and control data come from PO_DOCUMENT_TYPES and PO_DOCUMENT_TYPES_ALL_B. Core transactional data resides in PO_HEADERS (PO_HEADERS_ALL), PO_LINES, PO_LINE_LOCATIONS, PO_DISTRIBUTIONS (PO_DISTRIBUTIONS_ALL), PO_RELEASES (PO_RELEASES_ALL), and PO_ACTION_HISTORY, which records the cancellation action. Requisition dependencies are resolved through PO_REQUISITION_HEADERS_ALL, PO_REQUISITION_LINES_ALL, and PO_REQUISITION_LINES_S. The package also draws on FINANCIALS_SYSTEM_PARAMETERS for purchasing control settings, FND_USER for the acting user identity, and PO_REQCHANGEREQUESTWF_PVT for requisition change-request workflow integration. These accesses allow cancellation to be validated against system configuration, user context, requisition linkage, and downstream workflow obligations before any state change is committed.
Usage Notes
PO_DOCUMENT_CANCEL_PVT is invoked indirectly. Oracle's Purchasing forms and the higher-level PO_DOCUMENT_CONTROL_PVT package call it when a user cancels a document from the purchasing user interface or when a cancellation is triggered programmatically through the supported document control API. It is referenced by seven other packages, reflecting its role as a shared internal service rather than a standalone entry point. Because the package is classified PVT, custom code should not call its procedures directly; developers requiring cancellation functionality should use the documented public APIs in PO_DOCUMENT_CONTROL_PVT or the corresponding interface tables and concurrent programs, allowing Oracle to manage validation, requisition handling, and CTO restrictions consistently across releases 12.1.1 and 12.2.2.
-
PACKAGE: APPS.PO_DOCUMENT_CANCEL_PVT
12.1.1
-
PACKAGE: APPS.PO_DOCUMENT_CANCEL_PVT
12.2.2
-
PACKAGE BODY: APPS.PO_DOCUMENT_CANCEL_PVT
12.1.1
-
PACKAGE BODY: APPS.PO_DOCUMENT_CANCEL_PVT
12.2.2
-
APPS.PO_DOCUMENT_CANCEL_PVT dependencies on PO_HEADERS_ALL
12.1.1
-
APPS.PO_DOCUMENT_CANCEL_PVT dependencies on PO_DOCUMENT_TYPES_ALL_B
12.1.1
-
APPS.PO_DOCUMENT_CANCEL_PVT dependencies on PO_HEADERS_ALL
12.1.1
-
APPS.PO_DOCUMENT_CANCEL_PVT dependencies on PO_DOCUMENT_TYPES
12.2.2
-
APPS.PO_DOCUMENT_CANCEL_PVT dependencies on PO_DOCUMENT_TYPES_ALL_B
12.2.2
-
APPS.PO_DOCUMENT_CANCEL_PVT dependencies on PO_HEADERS
12.2.2
-
APPS.PO_DOCUMENT_CANCEL_PVT dependencies on PO_DOCUMENT_TYPES_ALL_B
12.1.1
-
APPS.PO_DOCUMENT_CANCEL_PVT dependencies on PO_DOCUMENT_TYPES_ALL_B
12.2.2
-
APPS.PO_DOCUMENT_CANCEL_PVT dependencies on PO_HEADERS
12.1.1
-
APPS.PO_DOCUMENT_CANCEL_PVT dependencies on PO_HEADERS
12.1.1
-
APPS.PO_DOCUMENT_CANCEL_PVT dependencies on PO_DOCUMENT_TYPES
12.2.2
-
APPS.PO_DOCUMENT_CANCEL_PVT dependencies on PO_DOCUMENT_TYPES
12.1.1
-
APPS.PO_DOCUMENT_CANCEL_PVT dependencies on PO_DOCUMENT_TYPES
12.1.1
-
APPS.PO_DOCUMENT_CANCEL_PVT dependencies on PO_HEADERS
12.2.2
-
APPS.PO_DOCUMENT_CANCEL_PVT dependencies on PO_DEBUG
12.2.2
-
APPS.PO_DOCUMENT_CANCEL_PVT dependencies on FND_API
12.2.2