Skip to content
JDE Reference

P0004A

Interactive

User Defined Codes — maintain UDC types and their code values, the lookup lists used throughout the system

Lineage hook

Rows written by P0004A carry …PID = 'P0004A' 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: P0004A User Defined Codes — maintain UDC types and their code values, the lookup lists used throughout the system
-- Purpose: User Defined Codes — maintain UDC types and their code values, the lookup lists used throughout the system — auto-generated boilerplate from program-table-map
-- Grain  : F0004 × F0005 — 1:N joins yield one row per detail line
-- Tables : F0004, F0005
-- 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
  dt.DTSY AS "System code the UDC type belongs to",
  dt.DTRT AS "User defined code type (the two-character table id)",
  dt.DTDL01 AS "Description of the code type",
  TRIM(udc.DRKY) AS "The code value itself; short/numeric codes are stored right-justified with leading blanks - TRIM before joining"
FROM <catalog>.<schema_ctl>.f0004 dt
LEFT JOIN <catalog>.<schema_ctl>.f0005 udc
  ON udc.DRSY = dt.DTSY
 AND udc.DRRT = dt.DTRT
ORDER BY dt.DTSY;

2 parameters not filled: <catalog>, <schema_ctl>

Tables Used by This Program