Skip to content
M3 Reference

PPS200MI

API

Purchase order API — creates, reads, and maintains purchase orders programmatically

Tables vs APIs

This MI API 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

Notes

Get/List transactions are confirmed to exist, but no Infor-published document naming this API's individual transactions has been located — treat the transaction list as unverified and check against your own MI metadata.

Boilerplate SQL

Databricks SQL

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

Query parameters

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

-- ============================================================
-- Program: PPS200MI — Purchase order API — creates, reads, and maintains purchase orders programmatically
-- Purpose: Read the tables behind API program PPS200MI — auto-generated from program-table-map
-- Grain  : MPHEAD × MPLINE — 1:N joins yield one row per line
-- Tables : MPHEAD, MPLINE
-- 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; 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",
  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
  pl.IBPNLI AS "Purchase order line number",
  pl.IBPNLS AS "Line subnumber — subdivides a line across deliveries",
  CASE pl.IBPUSL WHEN '12' THEN 'Awaiting authorization' WHEN '15' THEN 'Entered — ready for printout' WHEN '20' THEN 'Document printed' WHEN '50' THEN 'Goods received' WHEN '60' THEN 'Quality inspection partially performed' WHEN '64' THEN 'Rejected at inspection — handling not yet decided' WHEN '65' THEN 'Quality inspection completed' WHEN '69' THEN 'Rejected at inspection — handled through the claim routine' WHEN '70' THEN 'Put-away partially completed' WHEN '75' THEN 'Put-away complete' ELSE pl.IBPUSL END AS "Lowest line status — the least-processed point any part of the line's quantity still sits at; the line is fully received only when this end reaches the receipt rungs",  -- status: PUST_LINE (all 10 curated values)
  CASE pl.IBPUST WHEN '12' THEN 'Awaiting authorization' WHEN '15' THEN 'Entered — ready for printout' WHEN '20' THEN 'Document printed' WHEN '50' THEN 'Goods received' WHEN '60' THEN 'Quality inspection partially performed' WHEN '64' THEN 'Rejected at inspection — handling not yet decided' WHEN '65' THEN 'Quality inspection completed' WHEN '69' THEN 'Rejected at inspection — handled through the claim routine' WHEN '70' THEN 'Put-away partially completed' WHEN '75' THEN 'Put-away complete' ELSE pl.IBPUST END AS "Highest line status — the furthest point any part of the line's quantity has reached; on a partially received line this reads ahead of the quantity still outstanding"  -- status: PUST_LINE (all 10 curated values)
FROM <catalog>.<schema>.MPHEAD ph
LEFT JOIN <catalog>.<schema>.MPLINE pl
  ON pl.IBPUNO = ph.IAPUNO
 AND pl.IBCONO = ph.IACONO
WHERE
  ph.IACONO = <company>
ORDER BY ph.IAPUNO;

Backing Tables

How these tables connect — join details in the list below.

Join details

  • MPHEADMPLINEheader line · 1:N
    -- 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

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

Part of the Summit Analytics reference library.

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.