accounted
← Instruktioner

Kunskap

SRU

SRU-koder och filerna som lämnas till Skatteverket.

Från Accounted · MIT

SRU files are what Skatteverket's filöverföringstjänst accepts. The canonical source is Skatteverket's "Teknisk information om filöverföring" page (replaced brochure SKV 269 from Jan 1 2024).

Before writing any SRU generation code, read both reference files. Almost every failure is a wrong field code, a wrong sign, or the wrong text encoding.

How to use this skill

FileWhen to read
references/file-format.mdThe file itself: post-by-post structure of both files, period suffixes, ISO 8859-1 encoding, amount and org number formatting, the sign convention, zero-value handling, a worked example for a calendar-year AB, validation errors, data types, spec links
references/sru-codes.mdDeciding what goes in each #UPPGIFT: the full field code tables for INK2, INK2R and INK2S with their printed signs, and the BAS-to-SRU account mapping for the räkenskapsschema

Architecture: two files, always

Every SRU submission consists of exactly two files:

FileContentMax size
INFO.SRUSubmitter metadata (who is filing)—
BLANKETTER.SRUAll blankett blocks with tax data5 MB

File names are case-insensitive but must not be renamed (browsers appending (1) cause rejection).

An aktiebolag filing INK2 needs three blankett blocks inside BLANKETTER.SRU — INK2, INK2R and INK2S — each with its own #IDENTITET line, all terminated by a single #FIL_SLUT.

Generating a file

  1. Fix the period. The blankett type is <FORM>-<inkomstår><P1–P4>, where the income year is the calendar year the räkenskapsår ends and the suffix encodes the ending month. Calendar-year companies are P4.
  2. Write INFO.SRU with the posts in their prescribed order; mandatory are #PRODUKT, #FILNAMN, #ORGNR, #NAMN, #POSTNR, #POSTORT.
  3. Map the trial balance to INK2R via the BAS-to-SRU tables, then compute INK2S by hand, then carry 4.15/4.16 (7670/7770) to INK2 1.1/1.2 (7104/7114).
  4. Convert every amount to whole kronor, truncating öre, and to the form's printed sign — not the trial balance's sign. Omit any field whose value is zero.
  5. Write both files as ISO 8859-1, never UTF-8, and upload them under their exact names.

Field-by-field detail for each step is in the two reference files.

Never guess these

SituationWhyWhat to do
A field code for a rowCodes are published per period package, and a code invalid for the blankett type rejects the whole blockLook it up in sru-codes.md; never infer one from a neighbouring code
The sign of an amountSIE and most ledgers store credit balances as negative — the opposite of what the form wantsReport the printed sign as positive; see sru-codes.md §8
Any single BAS account in 5000–6999They ALL aggregate into one code, 7513; per-account codes are the most common mapping errorSum the range, write one #UPPGIFT 7513
An INK2S valueINK2S codes are NOT auto-derived from BAS accounts — they are tax adjustments requiring manual calculationTake them from the tax computation, not the ledger
The text encodingUTF-8 silently corrupts å, ä, ö and is the commonest cause of validation failureWrite ISO 8859-1 explicitly; see file-format.md §3
Whether a zero belongs in the fileA #UPPGIFT for a zero value causes warnings and sometimes errorsOmit the line entirely

Related skills

QuestionSkill
Getting the trial balance out of the accounting systemswedish-sie-import-export
INK2 form logic, skattemässiga justeringar, N9swedish-financial-reporting
Bokslut, closing entries and the result that feeds 4.1swedish-year-end-closing
Periodiseringsfond, koncernbidrag, schablonintäktswedish-tax-planning
Överavskrivningar and värdeminskningsavdrag behind 4.9swedish-asset-accounting