Statutory Audit File is where ERP discipline either begins or breaks.
SAF-T File Generation and Submission (Portugal / Poland / Norway) looks operational from far away. In a real finance team, it is a chain of assertions: the right actor started the work, the required records existed, the control policy was applied, the state change was preserved, and the outcome can be explained later without rebuilding the transaction from emails and spreadsheets.
The expected business outcome is specific: SAF-T submitted on time with zero XSD validation errors, covering 100% of period transactions.
The control flow a finance team actually needs.
Step 1
SAF-T Schema Version Configurable Per...
Step 2
All Master Data And Transaction Data...
Step 3
XSD Validation Run Before Submission...
Step 4
File Size Limit Handling Via Split-File...
Step 5
Submission Receipt Linked To The Period...
The ERP surface involved.
Module
Statutory Audit File
Actors
Tax Manager, Local Tax Authority (AT Portugal, KAS Poland, Skatteetaten Norway)
Tier
Tier 2
Finance area
Tax & Regulatory Compliance
Region lens
US and UK finance teams
Publication date
April 17, 2026
SAF-T schema version configurable per country; all master data and transaction data included without gaps for the period; XSD validation run before submission and errors surfaced as blocking exceptions; file size limit handling via split-file mechanism where mandated; submission receipt linked to the period close record; regeneration on amended data; retention of submitted files.
US and UK teams have different compliance hooks, but the same control problem.
US teams usually care about clean evidence for audit support, vendor records, payment controls, tax reporting, and management review. UK teams usually care about VAT-ready records, approval evidence, digital-record discipline, and traceable postings. The country-specific details differ, but the operating pattern is the same: the ERP needs controlled records, explicit ownership, defensible state changes, and evidence that survives beyond the person who completed the task.
The control matrix.
| Control area | Requirement | Acceptance proof |
|---|---|---|
| Control 1 | SAF-T schema version configurable per country | Given all GL entries, chart of accounts, customer/supplier master, invoices, and payments for a reporting period |
| Control 2 | all master data and transaction data included without gaps for the period | when the Tax Manager triggers SAF-T generation for the jurisdiction |
| Control 3 | XSD validation run before submission and errors surfaced as blocking exceptions | then the ERP extracts all required data, runs XSD validation, and produces a file with zero validation errors before submission |
| Control 4 | file size limit handling via split-file mechanism where mandated | negative) when the XSD validation finds errors then the submission is blocked and each error is surfaced as a line-item exception with the offending field and value. |
| Control 5 | submission receipt linked to the period close record | SAF-T submitted on time with zero XSD validation errors, covering 100% of period transactions. |
| Control 6 | regeneration on amended data | SAF-T submitted on time with zero XSD validation errors, covering 100% of period transactions. |
Audit evidence is a chain, not a folder.
| Evidence layer | What should be preserved |
|---|---|
| Business event | At the required reporting interval (monthly for Portugal and Poland, on-demand for audit in Norway), the Tax Manager triggers SAF-T generation for the selected period. The ERP extracts general ledger entries, chart of accounts, customer and supplier master data, sales and purchase invoices, and payments in the authority-defined XML schema (PT 1.04, PL JPK_VAT/JPK_FA, NO SAF-T Financial). The file is validated against the published XSD, signed if required, and submitted to the authority portal or transmitted via the mandated API. Submission receipt and validation results are stored. |
| Control rules | SAF-T schema version configurable per country; all master data and transaction data included without gaps for the period; XSD validation run before submission and errors surfaced as blocking exceptions; file size limit handling via split-file mechanism where mandated; submission receipt linked to the period close record; regeneration on amended data; retention of submitted files. |
| Acceptance proof | Given all GL entries, chart of accounts, customer/supplier master, invoices, and payments for a reporting period; when the Tax Manager triggers SAF-T generation for the jurisdiction; then the ERP extracts all required data, runs XSD validation, and produces a file with zero validation errors before submission; (negative) when the XSD validation finds errors then the submission is blocked and each error is surfaced as a line-item exception with the offending field and value. |
| Data record | |
| System event | |
| Lifecycle state | |
The useful version of this workflow is not only fast. It is inspectable. A controller, auditor, or operator should be able to move from source event to system record to state transition to final business outcome without guessing.
Implementation contracts.
Reference data model
`saft_file` { id: string, entity_id: string, country: enum(PT,PL,NO), schema_version: string, period_start: date, period_end: date, file_path: string, xsd_validated: bool, xsd_errors: jsonb, submission_receipt: string, status: enum(GENERATING,VALIDATION_FAILED,READY,SUBMITTED), external_id: string }; (reference, product may differ).API and events
`POST /v1/saft-files/generate` { entity_id, country, period_start, period_end } -> 202 { job_id }; `GET /v1/saft-files/{id}` -> 200 { status, xsd_errors[], submission_receipt }; `POST /v1/saft-files/{id}/submit` -> 200 { receipt }; emits `saft.generated`, `saft.validation_failed`, `saft.submitted` events; idempotent via `external_id`.State transitions
`GENERATING -> VALIDATION_FAILED | READY -> SUBMITTED`; guard: XSD errors block transition from GENERATING to READY; split-file mechanism triggers when file exceeds authority size limit.Common implementation traps.
Treating the workflow as data entry
If the ERP only stores the final record, the team loses the decision trail that explains how the record became valid.
Hiding exception logic
Exceptions need owners, reason codes, and time stamps. A vague pending state is not a control.
Posting without recovery design
Retries, duplicate submissions, and partial failures must be explicit so the system does not create inconsistent records.
Skipping evidence design
A workflow that cannot produce evidence on demand will eventually push finance teams back into manual screenshots and spreadsheets.
Where Rivane fits.
Rivane is built for finance workflows where automation must stay tied to source documents, approvals, state transitions, ledger impact, reporting, and audit evidence. Use this guide as a checklist for evaluating whether an ERP workflow is merely digitized or actually controlled.
References and source basis.
These sources provide the standards, regulatory, or government context around the flow. They are included so the guide is useful to finance operators, auditors, and implementation teams, not only buyers reading software copy.