JDE Reference
P4114
InteractiveInventory Adjustments — correct on-hand quantity discrepancies (cycle count variances, damage, initial loads)
Lineage hook
Rows written by P4114 carry …PID = 'P4114' 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: P4114 Inventory Adjustments — correct on-hand quantity discrepancies (cycle count variances, damage, initial loads)
-- Purpose: Inventory Adjustments — correct on-hand quantity discrepancies (cycle count variances, damage, initial loads) — auto-generated boilerplate from program-table-map
-- Grain : F4111 × F41021, F0911, F4102, F4105 — 1:N joins yield one row per detail line
-- Tables : F4111, F41021, F0911, F4102, F4105
-- 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
il.ILUKID AS "Unique key ID - the system-assigned surrogate key",
loc.LIITM AS "Short item number - the internal numeric item key",
TRIM(loc.LIMCU) AS "Business unit / branch plant (right-justified, space-padded to 12)",
loc.LILOCN AS "Storage location within the branch plant",
loc.LILOTN AS "Lot or serial number",
f.GLDCT AS "Document type of the journal entry (JE, PV, RI, etc.).",
f.GLDOC AS "Document number of the journal entry.",
f.GLKCO AS "Company that assigned the document number (key company).",
CASE WHEN f.GLDGJ IS NULL OR f.GLDGJ = 0 THEN NULL ELSE DATE_ADD(MAKE_DATE(1900 + CAST(f.GLDGJ AS INT) DIV 1000, 1, 1), CAST(f.GLDGJ AS INT) % 1000 - 1) END AS "G/L date driving the fiscal period the line posts to.", -- CYYDDD Julian → DATE
f.GLJELN AS "Line number within the journal entry.",
f.GLEXTL AS "Line extension code completing the unique key.",
f.GLLT AS "Ledger type the line belongs to (AA actual, CA foreign currency, etc.).",
ib.IBITM AS "Short item number - the internal numeric item key",
TRIM(ib.IBMCU) AS "Business unit / branch plant (right-justified, space-padded to 12)",
f4.COITM AS "Short internal item number (8-digit numeric key).",
TRIM(f4.COMCU) AS "Branch/plant (business unit); stored right-justified with leading blanks.",
f4.COLOCN AS "Storage location within the branch, formatted per the branch location structure.",
f4.COLOTN AS "Lot or serial number identifying the specific lot of stock.",
f4.COLEDG AS "Cost method code (e.g. 01 last-in, 02 weighted average, 07 standard) selecting which cost applies."
FROM <catalog>.<schema_data>.f4111 il
LEFT JOIN <catalog>.<schema_data>.f41021 loc
ON 1 = 1 -- TODO: define join condition (no shared aliases detected)
LEFT JOIN <catalog>.<schema_data>.f0911 f
ON 1 = 1 -- TODO: define join condition (no shared aliases detected)
LEFT JOIN <catalog>.<schema_data>.f4102 ib
ON 1 = 1 -- TODO: define join condition (no shared aliases detected)
LEFT JOIN <catalog>.<schema_data>.f4105 f4
ON 1 = 1 -- TODO: define join condition (no shared aliases detected)
ORDER BY il.ILUKID;2 parameters not filled: <catalog>, <schema_data>
Tables Used by This Program
How these tables connect. Nodes are clickable.
Primary tables
Secondary tables
- F0911General ledger transaction detail: every journal entry line with its account, G/L date, amount, batch, subledger, and source-document references.Write accesstransaction
- F4102Item branch — branch/plant-level item attributes, planning parameters, and sourcing responsibilityRead accessmaster
- F4105Item cost table: one row per item, branch, location, lot, and cost method carrying the unit cost used to value inventory and purchasing transactions.Read accessmaster