Skip to content
JDE Reference

R03B50

Batch UBE

Apply 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 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: 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.

Join details

  • F03B13F03B14header detail · 1:N
    ON f03b13.RYPYID = f03b14.RZPYID
  • F03B14F03B11foreign key · N:1
    ON f03b14.RZDOC = f03b11.RPDOC