Search Results compare_distributions




Overview

APPS.PO_COMPARE_REVISIONS is a PL/SQL package in Oracle E-Business Suite (available in both 12.1.1 and 12.2.2) that supports the Purchasing application's revision comparison feature. Its primary business function is to detect, record, and report the differences between successive revisions of purchasing documents — purchase orders, releases, lines, line locations, and distributions — by comparing archived snapshot rows held in the PO_*_ARCHIVE tables.

The package is declared with AUTHID CURRENT_USER, meaning its database objects are resolved under the privileges of the invoking session rather than the package owner. This design allows the package to be called from various application contexts, including Oracle Forms, concurrent programs, and custom extensions, while honoring the calling user's security profile. The package header carries the revision identifier POXPOCMS.pls 115.4, indicating it is part of the Purchasing module's core revision-management infrastructure.

The user search term "compare_lines" maps directly to the COMPARE_LINES procedure, which is the line-level workhorse of the revision comparison mechanism.

Key Procedures and Functions

The package exposes 19 documented procedures and functions, which fall into three functional groups.

Tables Accessed

The package operates primarily against the archival snapshot tables PO_HEADERS_ARCHIVE, PO_RELEASES_ARCHIVE, PO_LINES_ARCHIVE, PO_LINE_LOCATIONS_ARCHIVE, and PO_DISTRIBUTIONS_ARCHIVE, which hold the historical copies of purchasing documents against which current revisions are compared. It also references the live transaction tables PO_HEADERS, PO_LINES, PO_LINES_ALL, and PO_LINE_LOCATIONS_ALL to resolve current values.

Supporting lookups draw on AP_TERMS (payment terms), MTL_SYSTEM_ITEMS (item descriptions), PO_HAZARD_CLASSES and PO_UN_NUMBERS (hazardous material data), and FINANCIALS_SYSTEM_PARAMETERS (financials configuration). ICX_PO_REVISIONS_TEMP serves as a temporary staging area for revision comparison output. All tables are accessed through APPS synonyms, and the package is referenced by five other packages within the Purchasing schema.

Usage Notes

PO_COMPARE_REVISIONS is most commonly invoked from the Oracle Purchasing forms when a user requests a revision comparison for a purchase order, at which point the comparison procedures are driven against the archive tables and the translation functions render the output. The PURGE procedure is typically scheduled as a concurrent program to remove aged revision data and control table growth.

Because the package uses AUTHID CURRENT_USER and exposes a documented public interface, it can also be called from custom PL/SQL to build revision-difference reports or to integrate revision history into external systems. Developers should note that the comparison procedures expect archive row types and that direct calls should honor the same sequence-numbering conventions used internally, as documented in the ETRM 12.2.2 object catalog.