Skip to content
JDE Reference

R47021

Batch UBE

EDI Inbound PO Acknowledgment — the batch processor that receives supplier acknowledgments (X12 855) of your purchase orders, advances PO status, and prints a discrepancy report where the acknowledgment does not match the order

Lineage hook

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

Notes

Unacknowledged POs (no 855 row, or EDSP='N') by supplier is a core supplier-responsiveness metric.

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: R47021 EDI Inbound PO Acknowledgment — the batch processor that receives supplier acknowledgments (X12 855) of your purchase orders, advances PO status, and prints a discrepancy report where the acknowledgment does not match the order
-- Purpose: EDI Inbound PO Acknowledgment — the batch processor that receives supplier acknowledgments (X12 855) of your purchase orders, advances PO status, and prints a discrepancy report where the acknowledgment does not match the order — auto-generated boilerplate from program-table-map
-- Grain  : F47021 × F47022, F4301, F4311 — 1:N joins yield one row per detail line
-- Tables : F47021, F47022, F4301, F4311
-- 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.SYEKCO AS "Key company that scopes the EDI document number; part of the staging primary key.",
  h.SYEDOC AS "EDI document number assigned when the transaction is staged; the primary handle for one staged EDI document.",
  h.SYEDCT AS "EDI document type qualifier; pairs with document number and key company to complete the staging key.",
  f.SZEDLN / POWER(10, 3) AS "EDI line number within the document; three implied decimals, so line 1.000 is stored as 1000.",  -- implied decimals: 3 (verify in F9210)
  f4.PHKCOO AS "Company that owns the order-number sequence; part of the composite order key",
  f4.PHDOCO AS "Order number",
  f4.PHDCTO AS "Order document type (e.g. OP purchase order, SO sales order)",
  f4.PHSFXO AS "Order suffix distinguishing multiple documents under one order number",
  d.PDKCOO AS "Company that owns the order-number sequence; part of the composite order key",
  d.PDDOCO AS "Order number",
  d.PDDCTO AS "Order document type (e.g. OP purchase order, SO sales order)",
  d.PDSFXO AS "Order suffix distinguishing multiple documents under one order number",
  d.PDLNID / POWER(10, 3) AS "Order line number (3 implied decimals, e.g. 1.000)"  -- implied decimals: 3 (verify in F9210)
FROM <catalog>.<schema_data>.f47021 h
LEFT JOIN <catalog>.<schema_data>.f47022 f
  ON f.SZEDOC = h.SYEDOC
 AND f.SZEKCO = h.SYEKCO
 AND f.SZEDCT = h.SYEDCT
LEFT JOIN <catalog>.<schema_data>.f4301 f4
  ON 1 = 1  -- TODO: define join condition (no shared aliases detected)
LEFT JOIN <catalog>.<schema_data>.f4311 d
  ON 1 = 1  -- TODO: define join condition (no shared aliases detected)
ORDER BY h.SYEKCO;

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

Tables Used by This Program

How these tables connect. Nodes are clickable.

Join details

  • F4301F4311header detail · 1:N
    ON f4301.PHDOCO = f4311.PDDOCO
  • F47021F47022header detail · 1:N
    ON f47021.SYEDOC = f47022.SZEDOC
  • F47022F4311foreign key · N:1
    ON f47022.SZDOCO = f4311.PDDOCO