Skip to content
JDE Reference

R42995

Batch UBE

Repost Active Sales Orders — rebuild inventory commitments and open order totals when sales order and item location files disagree

Lineage hook

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

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: R42995 Repost Active Sales Orders — rebuild inventory commitments and open order totals when sales order and item location files disagree
-- Purpose: Repost Active Sales Orders — rebuild inventory commitments and open order totals when sales order and item location files disagree — auto-generated boilerplate from program-table-map
-- Grain  : F4211 × F41021, F4201 — 1:N joins yield one row per detail line
-- Tables : F4211, F41021, F4201
-- 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
  d.SDKCOO AS "Order key company - disambiguates order numbers across companies",
  d.SDDOCO AS "Order number",
  d.SDDCTO AS "Order type code (SO, ST, CO, ...)",
  d.SDLNID / POWER(10, 3) AS "Order line number, stored x1000 (3 implied decimals)",  -- implied decimals: 3 (verify in F9210)
  d.SDDSC1 AS "Description line 1",
  loc.LIITM AS "Short item number - the internal numeric item key",
  TRIM(loc.LIMCU) AS "Business unit / branch plant (right-justified, space-padded to 12)",
  loc.LILOCN AS "Storage location within the branch plant",
  loc.LILOTN AS "Lot or serial number"
FROM <catalog>.<schema_data>.f4211 d
LEFT JOIN <catalog>.<schema_data>.f41021 loc
  ON 1 = 1  -- TODO: define join condition (no shared aliases detected)
LEFT JOIN <catalog>.<schema_data>.f4201 h
  ON h.SHDOCO = d.SDDOCO
 AND h.SHKCOO = d.SDKCOO
 AND h.SHDCTO = d.SDDCTO
WHERE
  d.SDKCOO = '<KCOO>'
  AND d.SDDOCO = <DOCO>
  AND d.SDDCTO = '<DCTO>'
ORDER BY d.SDKCOO;

5 parameters not filled: <catalog>, <schema_data>, <KCOO>, <DOCO>, <DCTO>

Tables Used by This Program

How these tables connect. Nodes are clickable.

Join details

  • F4201F4211header detail · 1:N
    ON f4201.SHDOCO = f4211.SDDOCO