R42800
Batch UBESales Update — books shipped orders to the G/L and A/R; processing options control whether eligible detail is copied to F42119 and purged from F4211
Rows written by R42800 carry …PID = 'R42800' in their audit columns — a ready-made marker for isolating the records this program produced. See the audit-columns guide
Rows it writes carry …PID = 'R42800' in the audit columns — a lineage marker for sales-update-generated records. A separate R42996 schedule can purge eligible status-999 detail.
Boilerplate SQL
Databricks SQLStarting 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.
5 parameters not filled: <catalog>, <schema_data>, <KCOO>, <DOCO>, <DCTO>
-- ============================================================
-- Program: R42800 Sales Update — books shipped orders to the G/L and A/R; processing options control whether eligible detail is copied to F42119 and purged from F4211
-- Purpose: Sales Update — books shipped orders to the G/L and A/R; processing options control whether eligible detail is copied to F42119 and purged from F4211 — auto-generated boilerplate from program-table-map
-- Grain : F4211 × F42119, F4111 — 1:N joins yield one row per detail line
-- Tables : F4211, F42119, F4111
-- 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",
il.ILUKID AS "Unique key ID - the system-assigned surrogate key"
FROM <catalog>.<schema_data>.f4211 d
LEFT JOIN <catalog>.<schema_data>.f42119 dh
ON dh.SDDOCO = d.SDDOCO
AND dh.SDKCOO = d.SDKCOO
AND dh.SDDCTO = d.SDDCTO
AND dh.SDLNID = d.SDLNID
LEFT JOIN <catalog>.<schema_data>.f4111 il
ON 1 = 1 -- TODO: define join condition (no shared aliases detected)
WHERE
d.SDKCOO = '<KCOO>'
AND d.SDDOCO = <DOCO>
AND d.SDDCTO = '<DCTO>'
ORDER BY d.SDKCOO;Tables Used by This Program
How these tables connect — join details in the list below.
R read · W write · R/W read + write