Skip to content
M3 Reference

MMS850MI

API

Stock movement API — moves stock between locations programmatically, writing the MITLOC balances and their MITTRA transactions

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

The verified transaction is AddMove — moving a lot or balance between locations — named in Infor's published M3 documentation; the API exposes more than this one.

Boilerplate SQL

Databricks SQL

Starting point for reading the tables behind MMS850MI 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: MMS850MI — Stock movement API — moves stock between locations programmatically, writing the MITLOC balances and their MITTRA transactions
-- Purpose: Read the tables behind API program MMS850MI — auto-generated from program-table-map
-- Grain  : MITLOC × MILOMA — 1:N joins yield one row per line
-- Tables : MITLOC, MILOMA
-- 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
  il.MLCONO AS "Company",
  il.MLWHLO AS "Warehouse",
  il.MLITNO AS "Item number",
  il.MLWHSL AS "Stock location within the warehouse",
  il.MLBANO AS "Lot (batch) number — blank for non-lot-controlled items",
  il.MLREPN AS "Receiving number distinguishing receipts of the same item and lot in the same location",
  il.MLSTQT AS "On-hand balance at this location/lot grain, in the basic unit",
  il.MLALQT AS "Allocated quantity at this location/lot grain",
  CASE WHEN m.LMEXPI = 0 THEN NULL ELSE TO_DATE(CAST(CAST(m.LMEXPI AS BIGINT) AS STRING), 'yyyyMMdd') END AS "Expiration date of the lot"  -- YYYYMMDD, 0 → NULL
FROM <catalog>.<schema>.MITLOC il
LEFT JOIN <catalog>.<schema>.MILOMA m
  ON m.LMBANO = il.MLBANO
 AND m.LMITNO = il.MLITNO
 AND m.LMCONO = il.MLCONO
WHERE
  il.MLCONO = <company>
ORDER BY il.MLWHLO;

Backing Tables

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

Join details

  • MITLOCMILOMAforeign key · N:1
    -- Uses this catalog's prefixed M3 column names; map raw Data Lake properties through Data Catalog first. ON MITLOC.MLBANO = MILOMA.LMBANO AND MITLOC.MLITNO = MILOMA.LMITNO AND MITLOC.MLCONO = MILOMA.LMCONO

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.