R47047
Batch UBEEDI Invoice Update as Sent — the batch job that flags extracted outbound EDI invoice (810) records as sent once the translator has picked them up, setting the processed flag so they are not re-extracted
Rows written by R47047 carry …PID = 'R47047' in their audit columns — a ready-made marker for isolating the records this program produced. See the audit-columns guide
Runs after the flat-file conversion R47042C; rows it flags as sent become eligible for the R47049 purge.
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.
2 parameters not filled: <catalog>, <schema_data>
-- ============================================================
-- Program: R47047 EDI Invoice Update as Sent — the batch job that flags extracted outbound EDI invoice (810) records as sent once the translator has picked them up, setting the processed flag so they are not re-extracted
-- Purpose: EDI Invoice Update as Sent — the batch job that flags extracted outbound EDI invoice (810) records as sent once the translator has picked them up, setting the processed flag so they are not re-extracted — auto-generated boilerplate from program-table-map
-- Grain : F47046 × F47047, F470461 — 1:N joins yield one row per detail line
-- Tables : F47046, F47047, F470461
-- 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)
FROM <catalog>.<schema_data>.f47046 h
LEFT JOIN <catalog>.<schema_data>.f47047 f
ON f.SZEDOC = h.SYEDOC
AND f.SZEKCO = h.SYEKCO
AND f.SZEDCT = h.SYEDCT
LEFT JOIN <catalog>.<schema_data>.f470461 f4
ON f4.S3EDOC = h.SYEDOC
AND f4.S3EKCO = h.SYEKCO
AND f4.S3EDCT = h.SYEDCT
ORDER BY h.SYEKCO;Tables Used by This Program
How these tables connect — join details in the list below.
R read · W write · R/W read + write
Secondary tables
- F470461The additional-header companion to F47046: one row per outbound EDI invoice (810) carrying the invoice-level totals rolled up from the selected detail lines, the tax authorities and rates behind them, and the payment terms — none of which the base header holds.Read/write accesstransaction
- F47047One row per line on an outbound EDI invoice (810); billed quantities and prices by sales order line, staged for transmission.Read/write accesstransaction