Results for “po_lines_draft_all”

50+ results




AI-generated from documented ETRM metadata — verify critical details on the linked pages.

Overview

PO.PO_LINES_DRAFT_ALL is the draft (staging) table for purchase document lines in Oracle Purchasing. It stores line-level information for purchase orders, purchase agreements, quotations, and RFQs that is being entered, negotiated, or modified but has not yet been committed to the operational line tables. Each row is scoped to a DRAFT_ID, which identifies the draft document version to which the line belongs. The _ALL suffix indicates that the table is partitioned by operating unit through the ORG_ID column and is filtered by Multi-Org views in a 12.1.1 or 12.2.2 environment.

From a Data Vault modeling perspective, the documented foreign key structure suggests this object behaves primarily as a link: it associates a draft header context with reference entities such as item categories, line types, UN numbers, and hazard classes, and it also references its committed counterparts PO_HEADERS_ALL and PO_LINES_ALL through the FROM_HEADER_ID and FROM_LINE_ID columns. This classification is a heuristic mined from the FK topology and should be treated as a modeling suggestion rather than a declared design.

Key Information Stored

The table contains 198 columns. The most operationally significant are:

A second unique index, PO_LINES_DRAFT_U1, mirrors the primary key on (PO_LINE_ID, DRAFT_ID) and serves as an additional business-key candidate.

Common Use Cases and Queries

The principal use case is querying in-progress or pending-approval documents that have not yet been committed to PO_LINES_ALL. Typical patterns include:

  • Retrieving all lines for a given draft: SELECT * FROM po_lines_draft_all WHERE draft_id = :draft_id.
  • Joining to the committed line to compare draft versus committed values: SELECT d.line_num, d.quantity draft_qty, l.quantity committed_qty FROM po_lines_draft_all d JOIN po_lines_all l ON d.from_line_id = l.po_line_id WHERE d.draft_id = :draft_id.
  • Reporting on lines added or deleted in a draft via DELETE_FLAG and CHANGE_STATUS.
  • Validating category or line-type assignment against MTL_CATEGORIES_B and PO_LINE_TYPES_B.
  • Extracting auction-sourced draft lines by joining on AUCTION_HEADER_ID to PON_AUCTION_HEADERS_ALL.

Related Objects

  • PO_HEADERS_ALL — parent committed header; joined via FROM_HEADER_ID.
  • PO_LINES_ALL — committed line; joined via FROM_LINE_ID.
  • MTL_CATEGORIES_B — category definition; joined via CATEGORY_ID.
  • PO_LINE_TYPES_B — line type lookup; joined via LINE_TYPE_ID.
  • PO_UN_NUMBERS_B — UN number reference; joined via UN_NUMBER_ID.
  • PO_HAZARD_CLASSES_B — hazard class reference; joined via HAZARD_CLASS_ID.
  • PON_AUCTION_HEADERS_ALL — sourcing auction header; joined via AUCTION_HEADER_ID.

Draft rows are surfaced through the corresponding draft header (PO_HEADERS_DRAFT_ALL) and are consumed by the purchasing draft-submission APIs that promote accepted lines into PO_LINES_ALL and PO_LINE_LOCATIONS_ALL.