JDE Reference
R03B50
Batch UBEApply Receipts to Invoices — the batch job that matches unapplied receipts to open invoices using execution-list algorithms, completing automatic cash application.
Lineage hook
Rows written by R03B50 carry …PID = 'R03B50' in their audit columns — a ready-made marker for isolating the records this program produced. See the audit-columns guide →
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.
Query parameters
-- ============================================================
-- Program: R03B50 Apply Receipts to Invoices — the batch job that matches unapplied receipts to open invoices using execution-list algorithms, completing automatic cash application.
-- Purpose: Apply Receipts to Invoices — the batch job that matches unapplied receipts to open invoices using execution-list algorithms, completing automatic cash application. — auto-generated boilerplate from program-table-map
-- Grain : F03B14 × F03B13, F03B11, F0911 — 1:N joins yield one row per detail line
-- Tables : F03B14, F03B13, F03B11, F0911
-- 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.RZPYID AS "Payment ID linking back to the F03B13 receipt header",
h.RZRC5 AS "Line number within the receipt — makes each application row unique",
h.RZADSC / POWER(10, 2) AS "Discount that was available on the invoice at application time", -- implied decimals: 2 (verify in F9210)
f0.RPDCT AS "Invoice document type (RI standard invoice, RM credit memo, RU unapplied cash, etc.)",
f0.RPKCO AS "Document company that owns the invoice number sequence",
f0.RPSFX AS "Pay item — one invoice can split into multiple pay items with their own terms",
f09.GLDCT AS "Document type of the journal entry (JE, PV, RI, etc.).",
f09.GLDOC AS "Document number of the journal entry.",
f09.GLKCO AS "Company that assigned the document number (key company).",
CASE WHEN f09.GLDGJ IS NULL OR f09.GLDGJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(f09.GLDGJ AS INT) DIV 1000, 1, 1), CAST(f09.GLDGJ AS INT) % 1000 - 1) END AS "G/L date driving the fiscal period the line posts to.", -- CYYDDD Julian → DATE
f09.GLJELN AS "Line number within the journal entry.",
f09.GLEXTL AS "Line extension code completing the unique key.",
f09.GLLT AS "Ledger type the line belongs to (AA actual, CA foreign currency, etc.)."
FROM <catalog>.<schema_data>.f03b14 h
LEFT JOIN <catalog>.<schema_data>.f03b13 f
ON f.RYPYID = h.RZPYID
LEFT JOIN <catalog>.<schema_data>.f03b11 f0
ON f0.RPDOC = h.RZDOC
LEFT JOIN <catalog>.<schema_data>.f0911 f09
ON 1 = 1 -- TODO: define join condition (no shared aliases detected)
ORDER BY h.RZPYID;2 parameters not filled: <catalog>, <schema_data>
Tables Used by This Program
How these tables connect. Nodes are clickable.
Secondary tables
- F03B11Customer ledger: one row per invoice pay item carrying gross, open, discount, and tax amounts plus the dates and status codes that drive A/R aging and collections.Read/write accesstransaction
- F03B13Receipts header: one row per customer receipt or draft with the check amount, unapplied balance, bank account, and G/L batch identity.Read/write accesstransaction
- F0911General ledger transaction detail: every journal entry line with its account, G/L date, amount, batch, subledger, and source-document references.Write accesstransaction