Search Results po_lines_change_print




Overview

PO_LINES_CHANGE_PRINT is a reporting view owned by the APPS schema within the Oracle E-Business Suite Purchasing (PO) module. It is designated in ETRM as a "Retrofitted" object, indicating that it was carried forward from an earlier release and re-pointed to the 12.1.1 / 12.2.2 data model rather than being a newly introduced construct. The view consolidates purchase order line change information for print and notification purposes, resolving header, line, line-type, hazard, UN number, and unit-of-measure attributes into a single denormalized row set.

The view shares its name with the PO_LINES_CHANGE_PRINT concurrent program and its XML publisher template, both of which use it as the data source for the "PO Line Change" or "Change Order" style output. Its status is VALID, so it can be queried directly by reporting tools, BI Publisher data definitions, and custom integrations without recompilation. The distinguishing characteristic of the view is that line data is read from PO_LINES_ARCHIVE, which stores the pre-change image of a purchase order line retained during the change-order process, rather than from the live PO_LINES_ALL table.

Underlying Base Objects

The view text joins seven base synonyms and, in the documented 12.2.2 metadata, also references PO_LINE_LOCATIONS_ALL, PO_RELEASES_ALL, and the PO_COMMUNICATION_PVT package. The documented relations are:

  • PO_LINES_ARCHIVE (POL) — the archived copy of the purchase order line, providing revision number, item revision, line number, cancellation attributes, and archival quantities and prices.
  • PO_LINE_TYPES (PLT) — joined on LINE_TYPE_ID to obtain ORDER_TYPE_LOOKUP_CODE, which drives the conditional pricing logic.
  • PO_HEADERS_ALL (PH1) — the operating header, supplying TYPE_LOOKUP_CODE used to distinguish STANDARD, PLANNED, and other document types.
  • PO_HEADERS_ALL (PH2) — a second header alias used to expose the document number (SEGMENT1) and the vendor quote number.
  • PO_LINES_ALL (PL2) — linked to supply the current line number, typically for cross-reference between the archived and live line.
  • PO_UN_NUMBERS (PUN) — provides the UN number and description for hazardous materials.
  • PO_HAZARD_CLASSES (PHC) — provides the hazard class designation.
  • MTL_UNITS_OF_MEASURE (MUM) — supplies the translated unit-of-measure name, used to override the stored lookup code via NVL.

Key Columns

The projected columns fall into several functional groups. Identification columns include REVISION_NUM, ITEM_REVISION, LINE_NUM, PO_HEADER_ID, PO_LINE_ID, ITEM_ID, ORG_ID, and CONTRACT_NUM. Descriptive columns include ITEM_DESCRIPTION, VENDOR_PRODUCT_NUM, NOTE_TO_VENDOR, and the header SEGMENT1 and QUOTE_VENDOR_QUOTE_NUMBER. Cancellation columns include a DECODE expression that maps CANCEL_FLAG values Y, I, and N to a printable indicator, together with CANCEL_DATE and CANCEL_REASON.

Pricing and quantity columns are computed. For AMOUNT lines, UNIT_PRICE and the extended amount are suppressed; for QUANTITY lines, QUANTITY is populated only when the header type is STANDARD or PLANNED. The extended line amount is derived as UNIT_PRICE * QUANTITY for QUANTITY and AMOUNT line types and as AMOUNT for RATE and FIXED PRICE types. Additional columns include UNIT_MEAS_LOOKUP_CODE, the concatenated UN number and description, HAZARD_CLASS, ORDER_TYPE_LOOKUP_CODE, QUANTITY_COMMITTED, and the fifteen descriptive flexfield columns ATTRIBUTE_CATEGORY and ATTRIBUTE1 through ATTRIBUTE15.

Common Use Cases and Queries

The principal use case is the change-order print program, where the view supplies the before-and-after line image required on the notification sent to the supplier. Reporting teams also query it to reconstruct line-level history for audit and spend analysis.

  • Retrieve all lines for a header revision: SELECT line_num, item_description, unit_price, quantity FROM po_lines_change_print WHERE po_header_id = :p_header_id AND revision_num = :p_rev;
  • List hazardous lines with UN data: SELECT line_num, un_number, hazard_class FROM po_lines_change_print WHERE hazard_class IS NOT NULL;
  • Extract DFF attributes for interfaces: SELECT po_line_id, attribute_category, attribute1, attribute2 FROM po_lines_change_print WHERE org_id = :p_org;
  • Identify cancelled quantities: SELECT line_num, cancel_reason, cancel_date FROM po_lines_change_print WHERE cancel_flag = 'Y';

Because the view is not partitioned and reads from an archive table that can grow substantially, queries should always be constrained by PO_HEADER_ID, ORG_ID, or a date predicate to avoid full scans.