MPHEAD
Prefix: IAtransactionThe purchase order header — one row per order, carrying the supplier, order date, currency, receiving warehouse, and the lowest/highest line status pair mirroring the customer-order pattern
What the badges mean
- Prefix: MM
- Prefix: the table’s 2-character physical-column prefix (e.g.
MMonMITMAS) — every field alias on the table carries it. Join by matching aliases across tables, not full column names (see the quirks guide). - master
- Data class: what the table holds — master data, balances, transaction documents, code/reference tables, or history.
- Shared across companies
- The table carries no
CONO— rows aren’t partitioned per company (see the quirks guide). - Division-level
- The table carries
DIVI— rows are scoped below company to a division, one layer more granular thanCONOalone (see the quirks guide).
Header & line
MPHEAD is the header for its lines in MPLINE.
Fields
8 fields · 2 key
8 fields.
| Key | Field | Alias | Description | Type | Length | Flags |
|---|---|---|---|---|---|---|
| Key | IACONO | CONO | Company | numeric | ||
| Key | IAPUNO | PUNO | Purchase order number — the key order lines join on | alphanumeric | ||
| IAPUSL | PUSL | Lowest line status on the order | alphanumeric | |||
| IAPUST | PUST | Highest line status on the order | alphanumeric | |||
| IASUNO | SUNO | Supplier the order is placed with | alphanumeric | |||
| IAPUDT | PUDT | Purchase order date | numeric | |||
| IACUCD | CUCD | Order currency | alphanumeric | |||
| IAWHLO | WHLO | Receiving warehouse for the order | alphanumeric |
Field provenance: hand-curated.
Boilerplate SQL
Starting point for reading MPHEAD on Databricks — numeric YYYYMMDD dates are wrapped to NULL, verified status ladders are decoded, and the CONO anchor is in place. Set your Unity Catalog location, company, and filter values below; they’re substituted into the SQL and the copy button.
6 parameters not filled: <catalog>, <schema>, <company>, <PUNO>, <DATE_FROM>, <DATE_TO>
-- ============================================================
-- Table : MPHEAD — The purchase order header — one row per order, carrying the supplier, order date, currency, receiving warehouse, and the lowest/highest line status pair mirroring the customer-order pattern
-- Purpose: Column-selected read of MPHEAD — auto-generated from field metadata
-- Grain : One row per company (CONO) + IAPUNO
-- Notes : Auto-generated skeleton for a prefixed physical M3 schema or a landing schema normalized to the prefixed names in this catalog. Raw Data Lake property names vary with the published object: map them through Data Catalog before running this SQL. Dates are numeric YYYYMMDD (0 = none, mapped to NULL); all curated status values are decoded inline. Audit columns (RGDT/RGTM/LMDT/CHNO/CHID) omitted — see the quirks guide.
-- ============================================================
SELECT
ph.IACONO AS "Company",
ph.IAPUNO AS "Purchase order number — the key order lines join on",
ph.IAPUSL AS "Lowest line status on the order", -- status: decode ph.IAPUSL against your configuration — see quirks guide #statuses
ph.IAPUST AS "Highest line status on the order", -- status: decode ph.IAPUST against your configuration — see quirks guide #statuses
ph.IASUNO AS "Supplier the order is placed with",
CASE WHEN ph.IAPUDT = 0 THEN NULL ELSE TO_DATE(CAST(CAST(ph.IAPUDT AS BIGINT) AS STRING), 'yyyyMMdd') END AS "Purchase order date", -- YYYYMMDD, 0 → NULL
ph.IACUCD AS "Order currency",
ph.IAWHLO AS "Receiving warehouse for the order"
FROM <catalog>.<schema>.MPHEAD ph
WHERE
ph.IACONO = <company>
-- AND ph.IAPUNO = '<PUNO>'
-- AND ph.IAPUDT >= <DATE_FROM> -- yyyyMMdd numeric
-- AND ph.IAPUDT <= <DATE_TO> -- yyyyMMdd numeric
ORDER BY ph.IAPUNO;Verified September 2026
Relationships
Diagram of 1-hop neighbors — join details below. CSYTAB decode edges are highlighted; they’re the joins newcomers most often get wrong.
Join details
-- Uses this catalog's prefixed M3 column names; map raw Data Lake properties through Data Catalog first. ON MPHEAD.IAPUNO = MPLINE.IBPUNO AND MPHEAD.IACONO = MPLINE.IBCONO-- Uses this catalog's prefixed M3 column names; map raw Data Lake properties through Data Catalog first. ON MPHEAD.IASUNO = CIDMAS.IDSUNO AND MPHEAD.IACONO = CIDMAS.IDCONO
Programs That Use This Table
- PPS200 — Purchase order maintenance — creates and maintains purchase orders, writing the MPHEAD/MPLINE pairPrimary sourceInteractive
- PPS200MI — Purchase order API — creates, reads, and maintains purchase orders programmaticallyPrimary sourceAPI
- PPS220 — Purchase order line display — line-level review and mass change across the MPLINE lines of the MPHEAD ordersInteractive
- PPS300 — Purchase order goods receipt — reports receipts against MPLINE lines, driving the line status to 50 — or straight to 75 when direct put-away is configured — and writing the MITTRA stock transactionsInteractive
More Purchasing tables
- MPLINEThe purchase order line — one row per ordered item with quantity, price, planned delivery date, and the lowest/highest line-status pair; the core buy-side transaction, joined to its header by PUNO
- CIDMASThe supplier master — one row per supplier per company with identity, status, and name; purchasing and supplier-ledger records join back to it on SUNO
- MPAGRHThe purchase agreement header — one row per supplier purchase agreement (agreement number), the negotiated terms record purchase-order pricing draws from