Skip to main content

Database Tables

NomaUBL persists every artefact of the e-invoicing pipeline — the original ERP source, the generated UBL document, the per-line and per-VAT-rate breakdown, the lifecycle events, the validation errors, the runtime processing log, the e-reporting submissions and the user / role / session triplet.

The schema is identical on Oracle and PostgreSQL — the DDL is dialect-aware (BLOBBYTEA, NUMBERINTEGER, VARCHAR2VARCHAR) but the column names, primary keys and semantics are the same. Every table name is configurable in the db-nomaubl system template and created by the Initialize Database action of the Settings → Database Connectors screen.

The schema applies regardless of source system — JD Edwards, SAP, NetSuite or a custom ERP. Tables follow the JDE F564XXX naming convention because the platform was built around JDE first; the conventions are functional, not source-specific.


Naming conventions

ConventionDetail
Table identifierF564XXX — JDE-style file prefix. Configurable per environment.
Column prefixTwo-letter prefix tied to the table (FE for archive, UH for UBL header, UL for lines, UV for VAT / validation, US for status / users, RG/RH/RI for e-reporting…).
DatesJDE Julian — integer in CYYDDD format where C = 1 for 2000–2099, YY is the last two digits of the year, DDD is the day of the year. Example: 125108 → 2025-04-18. Converted on the fly for the UI.
TimesInteger in HHMMSS format. Example: 143052 → 14:30:52.
Scaled numericsSome amounts and rates are stored as integers scaled by a fixed factor — divide on read: ATXA × 100 (2 decimals), QNTY × 10000 (4 decimals), UPRC × 10000 (4 decimals), TXR1 × 1000 (3 decimals).
XML payloadsStored as BLOB (Oracle) / BYTEA (Postgres) for JDE source XML and generated UBL; as CLOB (Oracle) / TEXT (Postgres) for e-reporting XML. UTF-8 bytes throughout.
Auto-incremented sequencesSEQN columns use COALESCE(MAX(SEQN), 0) + 1 on insert — no Oracle sequence or Postgres serial required.

Schema overview

📋 INVOICE DOMAINF564230Source archiveF564237Processing logFEWDS1F564231UBL header (BT-*)DOC/DCT/KCOF564233LinesF564234VAT summaryF564235LifecycleF564236Validation errors+ LNID / SEQN📊 E-REPORTING DOMAINF564240Report logF564241Report lifecycleF564242Invoice mapping⇢ F564231 (cross-domain FK)RGUKID🔐 AUTHENTICATION DOMAINF564250UsersF564251RolesF564252SessionsUSROLESSUSER
solid arrow — hard FK relationshipdashed arrow — soft / cross-domain linkhighlighted card — domain anchor

Invoice domain

The seven tables that carry an invoice through its complete life — from the raw ERP payload to its definitive lifecycle status.

F564230 — Source archive & PA submission log

Stores the original ERP XML alongside the routing flags and the PA transaction UUID returned after submission. One row per source document.

  • Primary key: FEDOC + FEDCT + FEKCO
  • Notable: FETXFT carries the source XML payload (UTF-8 bytes); FEUKIDSZ holds the UUID returned by the Plateforme Agréée after successful import; FEEV10 is the send to PA flag (1 = yes, 2 = no).
FieldTypeDescription
FEDOCIntegerDocument number (PK).
FEDCTText(2)Document type (PK).
FEKCOText(5)Company code (PK).
FEAA10Text(10)Activity / routing code.
FEAA20Text(25)Document sub-type.
FEALKYText(25)Customer alpha key.
FEAEXPDecimal × 100Document amount (scaled).
FEIVDDate (Julian)Invoice date.
FEARDUDate (Julian)Due date.
FEUPMJDate (Julian)Last update date.
FEPIDText(10)Program ID.
FEVERSText(5)Version.
FEUSERText(10)User who created the row.
FEJOBNText(10)Job name.
FEUPMTTime (HHMMSS)Last update time.
FEWDS1Text(80)Source file name.
FEEV01Text(25)Routing code.
FEAC04Text(5)Business unit / office.
FEEV10IntegerSend to PA flag — 1 = yes, 2 = no.
FETXFTBLOBOriginal ERP XML (UTF-8 bytes).
FEUKIDSZText(100)PA platform transaction UUID returned on import.

F564231 — UBL invoice header

The EN 16931 view of the invoice plus the generated UBL 2.1 document. One row per invoice; same primary key as F564230.

  • Primary key: UHDOC + UHDCT + UHKCO
  • Notable: UHTXFT stores the generated UBL document (UTF-8 bytes); UHK74RSCD is the current lifecycle status code from the statuses reference list; UHY56BAR is the BAR routing code (B2B / B2G / B2C / B2BINT / OUTOFSCOPE / …).
FieldTypeDescription
UHDOCIntegerDocument number (PK · FK → F564230).
UHDCTText(2)Document type (PK).
UHKCOText(5)Company code (PK).
UHODOC / UHODCT / UHOKCOInteger / Text(2) / Text(5)Original (referenced) document — non-empty for credit notes pointing at a prior invoice.
UHK74FLENText(25)UBL invoice number — BT-1.
UHK74XMLVText(50)Profile ID — BT-23.
UHK74LDDJDate (Julian)Issue date — BT-2.
UHDDJDate (Julian)Due date — BT-9.
UHK74LEDTText(3)Invoice type code — BT-3.
UHATXADecimal × 100Tax-exclusive amount — BT-109.
UHSTAMDecimal × 100Tax amount — BT-110.
UHAGDecimal × 100Tax-inclusive amount — BT-112.
UHAAPDecimal × 100Amount due — BT-115.
UHCRCDText(3)Currency code — BT-5.
UH55RSFText(40)Order reference — BT-13.
UHY74CTIDIntegerContract reference — BT-12.
UHAN8IntegerCustomer AN8 (JDE address book).
UHALKYText(25)Customer alpha key.
UHALPHText(40)Customer name — BT-44.
UHTXFTBLOBGenerated UBL 2.1 XML (UTF-8 bytes).
UHK74RSCDText(4)Current lifecycle status code (see Status Reference).
UHK74MSG1Text(500)Status message.
UHY56EPID / UHY56EPSCText(100) / Text(25)Customer endpoint ID + scheme — BT-49 / BT-49-1.
UHY56PYINText(3)Payment means code — BT-81.
UHY56BARText(10)BAR routing code (B2B, B2G, B2C, B2BINT, OUTOFSCOPE, …).
UHY56RSRC / UHY56RSRCLText(50) / Text(250)Rejection reason code + label.
UHY56ACTN / UHY56ACTNLText(10) / Text(250)Expected action code + label.
UHY56ACTNDText(1000)Status note (raw JSON returned by the PA).
UHUSER / UHPID / UHJOBN / UHUPMJ / UHTDAYAudit columns — created by, program, job, last-update date and time.

F564233 — UBL invoice lines

One row per UBL line. Stored values for quantity, price and tax rate are scaled — divide on read.

  • Primary key: ULDOC + ULDCT + ULKCO + ULLNID
  • Notable: ULLNID is the JDE line ID × 1000 (BT-126). ULY56QNTY ÷ 10000, ULUPRC ÷ 10000, ULATXA ÷ 100, ULTXR1 ÷ 1000.
FieldTypeDescription
ULDOC / ULDCT / ULKCODocument number / type / company (PK · FK → F564231).
ULLNIDInteger × 1000Line ID — BT-126.
ULDSC1Text(40)Item description — BT-153.
ULLITMText(35)Seller item ID — BT-155.
ULY56QNTYDecimal × 10000Invoiced quantity — BT-129.
ULY56UMText(3)Unit of measure code — BT-130.
ULUPRCDecimal × 10000Unit price — BT-146.
ULATXADecimal × 100Line extension amount — BT-131.
ULREBLDecimal × 10000Allowance / charge — BT-136.
ULCRCDText(3)Currency code.
ULK74TVCCText(2)Tax category code — BT-151.
ULTXR1Decimal × 1000Tax rate — BT-152.
ULK74EXRCText(100)Tax exemption reason — BT-121.
ULUSER / ULPID / ULJOBN / ULUPMJ / ULTDAYAudit columns.

F564234 — UBL VAT summary

One row per (tax category, tax rate, currency) breakdown carried by the invoice — the EN 16931 BG-23 group.

  • Primary key: UVDOC + UVDCT + UVKCO + UVSEQN
  • Notable: UVSEQN is auto-incremented via COALESCE(MAX(UVSEQN), 0) + 1 on insert.
FieldTypeDescription
UVDOC / UVDCT / UVKCODocument number / type / company (PK · FK → F564231).
UVSEQNIntegerSequence number (PK).
UVK74TVCCText(2)Tax category code — BT-118.
UVTXR1Decimal × 1000Tax rate — BT-119.
UVATXADecimal × 100Taxable amount — BT-116.
UVSTAMDecimal × 100Tax amount — BT-117.
UVCRCDText(3)Currency code.
UVK74EXRCText(500)Tax exemption reason — BT-120.
UVUSER / UVPID / UVJOBN / UVUPMJ / UVTDAYAudit columns.

F564235 — Lifecycle events

The append-only history of every status the invoice has been in. One row per event, in submission order. This is the source of the History tab in the invoice detail modal.

  • Primary key: USDOC + USDCT + USKCO + USSEQN
  • Notable: USSEQN is auto-incremented; events are written by StatusTransition.apply() together with the corresponding update of F564231.UHK74RSCD.
FieldTypeDescription
USDOC / USDCT / USKCODocument number / type / company (PK · FK → F564231).
USSEQNIntegerEvent sequence (PK).
USK74RSCDText(4)Status code at this event.
USK74MSG1Text(500)Status message.
USTRDJDate (Julian)Event date.
USY56RSRC / USY56RSRCLText(50) / Text(250)Rejection reason code + label.
USY56ACTN / USY56ACTNLText(10) / Text(250)Expected action code + label.
USY56ACTNDText(1000)Status note (raw JSON from the PA).
USUSER / USPID / USJOBN / USUPMJ / USTDAYAudit columns.

F564236 — UBL validation errors

XSD and Schematron errors recorded for an invoice. One row per error / warning — feeds the History → Validation errors group of the invoice detail modal and the Integration Errors page when no matching F564231 row is found.

  • Primary key: UVDOC + UVDCT + UVKCO + UVSEQN
  • Notable: UVY56LEVEL is ERROR / WARNING / INFO. UVSRCL flags the validator: XSD, SCH (Schematron) or DB.
FieldTypeDescription
UVDOC / UVDCT / UVKCODocument number / type / company (PK; can be orphan when no F564231 row).
UVSEQNIntegerError sequence (PK).
UVY56LEVELText(10)Severity — ERROR, WARNING, INFO.
UVSRCLText(25)Source — XSD / SCH / DB.
UVY56RULEText(50)Rule ID (e.g. BR-01, PEPPOL-EN16931-R001).
UVK74MSG1Text(2000)Error / warning message.
UVUSER / UVPID / UVJOBN / UVUPMJ / UVTDAYAudit columns.

F564237 — Runtime processing log

Every event written by RuntimeLogHandler during XML / UBL / BIP / FTP processing — START, END and any intermediate method. Backs the Processing Log page (Management menu).

  • Primary key: none — multiple events per file are expected.
  • Notable: FEMODE is the processing type (SINGLE, BURST, UBL, BOTH, UBL_VALIDATE, PROCESS); FETMPL is the template name (empty for UBL processing); FEMETHOD is START / END or the failing method name on errors.
FieldTypeDescription
FEWDS1Text(80)Source file name — links to F564230.FEWDS1.
FEUPMJDate (Julian)Event date.
FEUPMTTime (HHMMSS)Event time.
FEMODEText(20)Processing type.
FETMPLText(50)Template name.
FEMETHODText(100)Operation — START / END / failing method name.
FEMESSAGEText(500)Status message or error detail.

E-Reporting domain

Three tables that record the (period, flux, company) declarations submitted to the Plateforme Agréée — flux 10.1 (B2C invoice detail) and 10.3 (B2BINT aggregated).

F564240 — Report log

One row per generated report. Stores the <ReportDocument> XML and the latest known status.

  • Primary key: RGUKID (globally unique sequence — no flux / company component).
  • Notable: RGY56BAR is 10.1 or 10.3; RGDCT is the document type (IN initial, RE replacement, CO cancellation, MO modification); RGTXFT carries the generated XML.
FieldTypeDescription
RGUKIDIntegerReport sequence id (PK).
RGY56BARText(10)Flux code — 10.1 / 10.3.
RGKCOText(5)Issuing company code.
RGDCTText(2)Document type — IN / RE / CO / MO.
RGEFTJDate (Julian)Period start.
RGEFDJDate (Julian)Period end.
RGY56EPIDText(60)Issuer SIREN (scheme 0002).
RGK74RSCDText(4)Current lifecycle status code.
RGK74MSG1Text(2000)Last status message.
RGNINVIntegerNumber of invoices included.
RGTXFTCLOB / TEXTGenerated <ReportDocument> XML.
RGUSER / RGPID / RGJOBN / RGUPMJ / RGTDAYAudit columns.

F564241 — Report lifecycle events

The append-only history of statuses for a given report — same shape as F564235 for invoices.

  • Primary key: RGUKID + RHSEQN
  • Notable: RHSEQN is auto-incremented. The RG-prefixed RGUKID is the FK to the parent log (kept as-is, not renamed to an RH alias).
FieldTypeDescription
RGUKIDIntegerReport sequence id (PK · FK → F564240).
RHY56BARText(10)Flux code (denormalised for query convenience).
RHSEQNIntegerEvent sequence (PK).
RHK74RSCDText(4)Status code at this event.
RHK74MSG1Text(500)Status message.
RHUSER / RHPID / RHJOBN / RHUPMJ / RHTDAYAudit columns.

F564242 — Report / invoice mapping

Tracks which invoices were included in which report — composite PK avoids re-including invoices that were already declared on a prior run.

  • Primary key: RGUKID + RIDOC + RIDCT + RIKCO
  • Notable: A secondary index on (RIDOC, RIDCT, RIKCO, RIY56BAR) answers "in which report was this invoice declared?" efficiently.
FieldTypeDescription
RGUKIDIntegerReport sequence id (PK · FK → F564240).
RIY56BARText(10)Flux code.
RIDOC / RIDCT / RIKCOInvoice triplet (PK · FK → F564231).

Authentication domain

Three tables for built-in user / role / session management — used when authEnabled = Y in the global template.

F564250 — Users

One row per user. Passwords are stored as PBKDF2-HMAC-SHA256 hashes — never in clear text.

  • Primary key: USUSER
  • Notable: USPASSWD format is iterations:base64(salt):base64(hash). USFORCEPASSWD = 'Y' forces a password change on the next login (default for new accounts).
FieldTypeDescription
USUSERText(50)Username (PK).
USPASSWDText(200)PBKDF2-HMAC-SHA256 hash — iterations:salt:hash.
USROLEText(50)Role name (FK → F564251.RLNAME).
USFULLNAMEText(100)Display name.
USEMAILText(200)Email address.
USACTIVEText(1)Y = active, N = disabled.
USFORCEPASSWDText(1)Y = must change password on next login.
USCREATEDTimestampAccount creation timestamp.

F564251 — Roles

One row per role. Defines page allow-list, company filter and the read-only / settings flags.

  • Primary key: RLNAME
  • Notable: RLPAGES and RLCOMPANIES are comma-separated lists; an empty value means unrestricted (all pages / all companies). RLSETTINGS = 'Y' grants access to the Settings configuration manager.
FieldTypeDescription
RLNAMEText(50)Role identifier (PK).
RLDESCText(200)Human-readable description.
RLPAGESText(2000)Allowed page IDs — comma-separated (empty = all).
RLCOMPANIESText(500)Allowed company codes — comma-separated (empty = all).
RLSETTINGSText(1)Y = role grants access to the configuration manager.
RLREADONLYText(1)Y = view only, no edit / delete / resend.

F564252 — Sessions

One row per active session. Sessions are validated on every API request; expired rows are pruned by the auth handler.

  • Primary key: SSTOKEN (UUID)
  • Notable: The token is sent as Authorization: Bearer <SSTOKEN> on every API call. Two indexes on SSUSER and SSEXPIRES keep lookups and cleanup efficient.
FieldTypeDescription
SSTOKENText(100)Session token / UUID (PK).
SSUSERText(50)Username (FK → F564250.USUSER).
SSCREATEDTimestampSession creation timestamp.
SSEXPIRESTimestampSession expiry timestamp.

The DDL bundles a small set of indexes that every production deployment should keep — they back the most common queries from the UI:

IndexTableColumnsUsed by
F564231_STATUS_IXF564231UHK74RSCDDashboard counters and E-Invoicing status filters.
F564231_DATE_IXF564231UHK74LDDJDate-range queries on the invoice list.
F564231_CUST_IXF564231UHAN8Customer-scoped views.
F564230_UUID_IXF564230FEUKIDSZPA UUID look-up after import.
F564240_PERIOD_IXF564240RGKCO, RGY56BAR, RGEFDJE-Reporting list filters.
F564242_INV_IXF564242RIDOC, RIDCT, RIKCO, RIY56BAR"In which report is this invoice?" lookup.
F564250_ROLE_IXF564250USROLEUser → role join.
F564252_USER_IXF564252SSUSERSign-out / list-sessions per user.
F564252_EXP_IXF564252SSEXPIRESExpired-session pruning.

The full DDL — including dialect-aware variants for Oracle and PostgreSQL — ships in the JAR under sql/oracle/ddl.sql and sql/postgres/ddl.sql, and is materialised on disk by Initialize Database.