R31802A
Batch UBEManufacturing Accounting Journal Entries — the batch job that turns unaccounted work-in-process and completion units into G/L journal entries and updates production cost records.
Rows written by R31802A carry …PID = 'R31802A' in their audit columns — a ready-made marker for isolating the records this program produced. See the audit-columns guide
Runs for WIP or completions; purges unaccounted units from the parts list and routing after creating journals.
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>, <DCT>, <DOC>, <KCO>
-- ============================================================
-- Program: R31802A Manufacturing Accounting Journal Entries — the batch job that turns unaccounted work-in-process and completion units into G/L journal entries and updates production cost records.
-- Purpose: Manufacturing Accounting Journal Entries — the batch job that turns unaccounted work-in-process and completion units into G/L journal entries and updates production cost records. — auto-generated boilerplate from program-table-map
-- Grain : One row per F0911
-- Tables : 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.
-- Omitted: F3102, F3111, F3112, F4801 are cataloged for this program, but no verified join condition connects them to F0911, so they are left out of this skeleton. Add the join yourself using the key fields on each table's page.
-- ============================================================
SELECT
h.GLDCT AS "Document type of the journal entry (JE, PV, RI, etc.).",
h.GLDOC AS "Document number of the journal entry.",
h.GLKCO AS "Company that assigned the document number (key company).",
CASE WHEN h.GLDGJ IS NULL OR h.GLDGJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(h.GLDGJ AS INT) DIV 1000, 1, 1), CAST(h.GLDGJ AS INT) % 1000 - 1) END AS "G/L date driving the fiscal period the line posts to.", -- CYYDDD Julian → DATE
h.GLJELN AS "Line number within the journal entry.",
h.GLEXTL AS "Line extension code completing the unique key.",
h.GLLT AS "Ledger type the line belongs to (AA actual, CA foreign currency, etc.)."
FROM <catalog>.<schema_data>.f0911 h
WHERE
h.GLDCT = '<DCT>'
AND h.GLDOC = <DOC>
AND h.GLKCO = '<KCO>'
ORDER BY h.GLDCT;Tables Used by This Program
How these tables connect — join details in the list below.
Loading relationship diagram…
R read · W write · R/W read + write
Primary tables
- F0911General ledger transaction detail: every journal entry line with its account, G/L date, amount, batch, subledger, and source-document references.Write accesstransaction
- F3102One row per cost bucket on a work order — keyed by order, item, cost component, parent/child flag, and work center — holding standard, current, planned, actual, completed, and scrapped units and amounts used for manufacturing variance analysis.Read/write accesstransaction
Secondary tables
- F3111Work order parts list — one row per component required by a work order, with required vs. issued quantities, scrap, commitments, and the operation each part feedsRead/write accesstransaction
- F3112Work order routing — one row per operation on a work order, carrying the work center, standard vs. actual machine/labor/setup hours, and quantities completed or scrapped at each stepRead/write accesstransaction
- F4801Work order header — one row per work order carrying the item being made, branch, quantities ordered/completed/scrapped, status, and the requested/start/completion dates that drive shop floor and maintenance analyticsRead accesstransaction