Skip to content
M3 Reference

PPS200

Interactive

Purchase order maintenance — creates and maintains purchase orders, writing the MPHEAD/MPLINE pair

Tables vs APIs

This program works over the tables below. For analytics at scale, land the raw tables — the SQL further down reads them directly, joined on their keys and CONO. When to land tables vs call MI APIs →

Boilerplate SQL

Databricks SQL

Starting point for reading the tables behind PPS200 from landed data — the backing tables joined on their keys and CONO. Set your Unity Catalog location, company, and filter values below.

Query parameters
-- ============================================================
-- Program: PPS200 — Purchase order maintenance — creates and maintains purchase orders, writing the MPHEAD/MPLINE pair
-- Purpose: Read the tables behind program PPS200 — auto-generated from program-table-map
-- Grain  : MPHEAD × MPLINE, CIDMAS — 1:N joins yield one row per line
-- Tables : MPHEAD, MPLINE, CIDMAS
-- 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; company-partitioned tables are joined on CONO to prevent cross-company fan-out. 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",
  pl.IBPNLI AS "Purchase order line number",
  pl.IBPNLS AS "Line subnumber — subdivides a line across deliveries",
  pl.IBITNO AS "Item ordered",
  pl.IBORQA AS "Ordered quantity in the purchase unit",
  s.IDSUNM AS "Supplier name"
FROM <catalog>.<schema>.MPHEAD ph
LEFT JOIN <catalog>.<schema>.MPLINE pl
  ON pl.IBPUNO = ph.IAPUNO
 AND pl.IBCONO = ph.IACONO
LEFT JOIN <catalog>.<schema>.CIDMAS s
  ON s.IDSUNO = ph.IASUNO
 AND s.IDCONO = ph.IACONO
WHERE
  ph.IACONO = <company>
ORDER BY ph.IAPUNO;

3 parameters not filled: <catalog>, <schema>, <company>

Backing Tables

How these tables connect. Nodes are clickable.

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

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.