Skip to content
JDE Reference

R3482

Batch UBE

MRP/MPS Requirements Planning — the batch job that runs single-facility MRP/MPS, netting forecasts, sales orders, and on-hand supply into time-phased plans and action messages.

Lineage hook

Rows written by R3482 carry …PID = 'R3482' in their audit columns — a ready-made marker for isolating the records this program produced. See the audit-columns guide →

Notes

Single-plant generation; planning BOMs are only supported here, not in R3483.

Boilerplate SQL

Databricks SQL

Starting point for querying the tables behind this program. Set your Unity Catalog location and filter values below — they’re substituted into the SQL and the copy button.

Query parameters
-- ============================================================
-- Program: R3482 MRP/MPS Requirements Planning — the batch job that runs single-facility MRP/MPS, netting forecasts, sales orders, and on-hand supply into time-phased plans and action messages.
-- Purpose: MRP/MPS Requirements Planning — the batch job that runs single-facility MRP/MPS, netting forecasts, sales orders, and on-hand supply into time-phased plans and action messages. — auto-generated boilerplate from program-table-map
-- Grain  : F3411 × F3413, F3412, F3460, F4102, F4801 — 1:N joins yield one row per detail line
-- Tables : F3411, F3413, F3412, F3460, F4102, F4801
-- Notes  : Auto-generated skeleton. Julian dates are converted to DATE and implied-decimal amounts are scaled (verify decimals in F9210). Audit columns (…USER/…PID/…UPMJ) are omitted — see the quirks guide. Set catalog/schema to your Unity Catalog location; fill remaining placeholders (<...>) for your tenant.
-- ============================================================
SELECT
  h.MMUKID AS "Internal unique key — single-column primary key with no business meaning",
  h.MMDSC1 AS "Message text shown to the planner",
  f.MRITM AS "Short item number — part of the primary key",
  TRIM(f.MRMCU) AS "Branch/plant — part of the primary key; right-justified 12-character",
  f.MRQT AS "Quantity type — the row dimension of the time series (forecast, gross requirements, planned orders, projected available, ATP, ...); part of the primary key",
  CASE WHEN f.MRSTRT IS NULL OR f.MRSTRT = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(f.MRSTRT AS INT) DIV 1000, 1, 1), CAST(f.MRSTRT AS INT) % 1000 - 1) END AS "Bucket start date (Julian CYYDDD) — part of the primary key",  -- CYYDDD Julian → DATE
  f34.MFITM AS "Short item number the forecast is for.",
  TRIM(f34.MFMCU) AS "Branch/plant the forecast applies to.",
  CASE WHEN f34.MFDRQJ IS NULL OR f34.MFDRQJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(f34.MFDRQJ AS INT) DIV 1000, 1, 1), CAST(f34.MFDRQJ AS INT) % 1000 - 1) END AS "Forecast (requested) date bucket, stored as Julian CYYDDD.",  -- CYYDDD Julian → DATE
  f34.MFAN8 AS "Customer address number for customer-level forecasts; zero on item/branch-level rows.",
  f34.MFTYPF AS "Forecast type distinguishing generated statistical forecasts (e.g. BF) from manual/adjusted ones (e.g. AA).",
  f34.MFYR AS "Two-digit calendar year of the forecast bucket; part of the unique key.",
  ib.IBITM AS "Short item number - the internal numeric item key",
  TRIM(ib.IBMCU) AS "Business unit / branch plant (right-justified, space-padded to 12)"
FROM <catalog>.<schema_data>.f3411 h
LEFT JOIN <catalog>.<schema_data>.f3413 f
  ON 1 = 1  -- TODO: define join condition (no shared aliases detected)
LEFT JOIN <catalog>.<schema_data>.f3412 f3
  ON f3.MWUKID = h.MMUKID
LEFT JOIN <catalog>.<schema_data>.f3460 f34
  ON 1 = 1  -- TODO: define join condition (no shared aliases detected)
LEFT JOIN <catalog>.<schema_data>.f4102 ib
  ON 1 = 1  -- TODO: define join condition (no shared aliases detected)
LEFT JOIN <catalog>.<schema_data>.f4801 f4
  ON f4.WADOCO = h.MMDOCO
ORDER BY h.MMUKID;

2 parameters not filled: <catalog>, <schema_data>

Tables Used by This Program

How these tables connect. Nodes are clickable.

Join details

  • F3411F4801foreign key · N:1
    ON f3411.MMDOCO = f4801.WADOCO