Search Results po_standard




Overview

APPS.PO_DOCUMENT_VERSIONS_V is a union view in Oracle E-Business Suite that presents a consolidated, unified listing of purchasing document versions drawn from both the live purchasing tables and the archival purchasing tables. Its principal function is to expose a single row for every revision of a purchasing document, allowing reporting and integration components to enumerate historical revisions without first determining whether a given revision resides in the active data set or has been archived. Each row is identified by document identifier, a normalized document type, a version (revision) number, an authorization status, and an archived indicator.

In Oracle EBS 12.1.1 and 12.2.2, the view supports Purchasing and Procurement reporting, revision history display, and downstream integrations that need to correlate purchase orders, blanket agreements, and contracts with their revision history. Because the object is owned by APPS and is defined entirely on purchasing header tables, it inherits the standard MOAC and security considerations applicable to those base tables.

Underlying Base Objects

The documented base objects are PO_HEADERS_ALL and PO_HEADERS_ARCHIVE_ALL, both referenced through synonyms. The view is a UNION of two query branches:

  • The first branch selects from PO_HEADERS_ARCHIVE_ALL, emitting archived rows with ARCHIVED_YN set to 'Y'.
  • The second branch selects from PO_HEADERS_ALL, outer-joined to PO_HEADERS_ARCHIVE_ALL, returning current rows with ARCHIVED_YN set to 'N'. The join predicate uses PO_HEADER_ID with the outer (+) operator on the archive table, and filters by NVL(POHA.LATEST_EXTERNAL_FLAG,'Y') = 'Y' and POH.REVISION_NUM > NVL(POHA.REVISION_NUM,-1). This logic ensures that only revisions newer than the latest archived revision are returned from the active table, preventing duplicate versions across the two sources.

Consequently, a document that has been archived appears from PO_HEADERS_ARCHIVE_ALL, while its currently active revisions appear from PO_HEADERS_ALL, giving a merged chronological picture.

Key Columns

  • DOCUMENT_ID — Derived from PO_HEADER_ID; uniquely identifies the purchasing document header.
  • DOCUMENT_TYPE — A DECODE of TYPE_LOOKUP_CODE: 'STANDARD' maps to 'PO_STANDARD', 'BLANKET' maps to 'PA_BLANKET', and 'CONTRACT' maps to 'PA_CONTRACT'. This is the column relevant to the search term "pa_contract", which corresponds to a Contract-type purchasing document.
  • DOCUMENT_VERSION — Derived from REVISION_NUM; the revision number of the document version.
  • STATUS — Derived from AUTHORIZATION_STATUS; reflects the document's approval or authorization state.
  • ARCHIVED_YN — 'Y' when the row originates from PO_HEADERS_ARCHIVE_ALL, and 'N' when it originates from PO_HEADERS_ALL; identifies whether the version is archived or active.

Note that only these five columns are projected, so the view is narrow and purpose-built for version enumeration rather than full document detail.

Common Use Cases and Queries

A frequent requirement is to list all versions of every contract (PA_CONTRACT) purchasing document, which is exactly what the "pa_contract" search implies. The following query returns all contract versions with their version number, status, and archived flag:

  • SELECT document_id, document_type, document_version, status, archived_yn FROM apps.po_document_versions_v WHERE document_type = 'PA_CONTRACT' ORDER BY document_id, document_version;

Another scenario is to inspect the complete revision chain of a single document by filtering on DOCUMENT_ID. Reporting tools can use the view to display revision history with the archived indicator driving whether a version is shown as historic. Integrations that reconcile active against archived purchasing data use ARCHIVED_YN to separate current revisions from archived ones, and STATUS to filter to approved or open documents. Finally, the view can be joined back to PO_HEADERS_ALL on DOCUMENT_ID to enrich the version listing with header attributes such as vendor, currency, and dates.