JDE Reference
P0002
InteractiveNext Numbers — maintain the automatic numbering sequences the system assigns to documents by system and company
Lineage hook
Rows written by P0002 carry …PID = 'P0002' 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: P0002 Next Numbers — maintain the automatic numbering sequences the system assigns to documents by system and company
-- Purpose: Next Numbers — maintain the automatic numbering sequences the system assigns to documents by system and company — auto-generated boilerplate from program-table-map
-- Grain : One row per F0002
-- Tables : F0002
-- 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
nn.NNSY AS "System code the next-number ranges belong to"
FROM <catalog>.<schema_ctl>.f0002 nn
ORDER BY nn.NNSY;2 parameters not filled: <catalog>, <schema_ctl>