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:
- PO_LINE_ID — surrogate line identifier; part of the composite primary key
PO_LINES_DRAFT_PKtogether withDRAFT_ID. - DRAFT_ID — identifies the draft document version; together with
PO_HEADER_IDandLINE_NUMit forms the unique business keyPO_LINES_DRAFT_UK1. - PO_HEADER_ID — the draft header to which the line belongs; a business-key candidate alongside
LINE_NUMandDRAFT_ID. - LINE_NUM — user-visible line number; the second business-key candidate attribute.
- LINE_TYPE_ID — foreign key to
PO_LINE_TYPES_B, defining whether the line is Goods, Services, etc. - ITEM_ID, ITEM_DESCRIPTION, ITEM_REVISION, CATEGORY_ID — item identity and category (FK to
MTL_CATEGORIES_B). - QUANTITY, UNIT_PRICE, AMOUNT, BASE_UNIT_PRICE, LIST_PRICE_PER_UNIT — commercial terms being negotiated.
- FROM_HEADER_ID, FROM_LINE_ID — link back to the committed
PO_HEADERS_ALLandPO_LINES_ALLrows. - DRAFT_LINE_STATUS, CHANGE_STATUS, CHANGE_ACCEPTED_FLAG, DELETE_FLAG — draft-mode lifecycle and change-tracking flags.
- ORG_ID — operating unit partitioning column.
- AUCTION_HEADER_ID — foreign key to
PON_AUCTION_HEADERS_ALLfor sourcing-originated lines.
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_FLAGandCHANGE_STATUS. - Validating category or line-type assignment against
MTL_CATEGORIES_BandPO_LINE_TYPES_B. - Extracting auction-sourced draft lines by joining on
AUCTION_HEADER_IDtoPON_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.
-
Draft table for purchase document lines (for purchase orders, purchase agreements, quotations, RFQs)
-
TABLE: PO.PO_LINES_DRAFT_ALL 12.2.2
-
TABLE: PO.PO_LINES_DRAFT_ALL 12.1.1