Skip to content
M3 Reference

MPHEAD

Prefix: IAtransaction

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

Module: PurchasingCompany-partitioned (CONO)

Header & line

MPHEAD is the header for its lines in MPLINE.

Fields

8 fields · 2 key

KeyFieldAliasDescriptionTypeLengthFlags
KeyIACONOCONOCompanynumeric
KeyIAPUNOPUNOPurchase order number — the key order lines join onalphanumeric
IAPUSLPUSLLowest line status on the orderalphanumeric
IAPUSTPUSTHighest line status on the orderalphanumeric
IASUNOSUNOSupplier the order is placed withalphanumeric
IAPUDTPUDTPurchase order datenumeric
IACUCDCUCDOrder currencyalphanumeric
IAWHLOWHLOReceiving warehouse for the orderalphanumeric

Field provenance: hand-curated.

Boilerplate SQL

Starting point for reading MPHEADon 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.

Query parameters
-- ============================================================
-- 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 Infor Data Lake-landed M3 data. Dates are numeric YYYYMMDD (0 = none, mapped to NULL); status ladders decoded inline where verified. 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;

6 parameters not filled: <catalog>, <schema>, <company>, <PUNO>, <DATE_FROM>, <DATE_TO>

Relationships

1-hop neighbors — click a table to navigate there. CSYTAB decode edges are highlighted; they’re the joins newcomers most often get wrong.

Join details

  • MPHEADMPLINEheader line · 1:N
    ON MPHEAD.IAPUNO = MPLINE.IBPUNO AND MPHEAD.IACONO = MPLINE.IBCONO
  • MPHEADCIDMASforeign key · N:1
    ON MPHEAD.IASUNO = CIDMAS.IDSUNO AND MPHEAD.IACONO = CIDMAS.IDCONO

Programs That Use This Table

Maintained by Summit Analytics, a supply chain analytics practice. The tools and references are free — the consulting is selective.

Work with the practice →

Not affiliated with or endorsed by Infor. Infor, Infor M3, and Infor CloudSuite are trademarks of Infor and/or its affiliates.