Skip to Content

SAF-T Portugal: Format file error

Hi everyone,

I am getting an error from the Portugal tax authorities When I upload a file with the last file format StandardAuditFile-Tax:PT_1.04_0. See attached.

The error says is expecting a credit line instead of a debit line, but I have checked the document number and everything looks OK.

All SAP notes are implemented, except OSS note 2499284.


saft-t-error.png (45.9 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jan 25, 2018 at 10:15 AM

    I got it,!

    Review note 1885115 - Portugal legal tax reports (SAFT, etc.) For Monthly SAFT file (e-fatura), the Tax Accounting Basis = F - Billing.

    Important note to correct issues with the validation tool 2499284.

    It is important configure correctly the Tax Code table with all the exempt or non subject to VAT 0% tax codes. Remember to clasiffy them correctly. I found the right codes here:


    Add comment
    10|10000 characters needed characters exceeded

  • Jan 22, 2018 at 08:33 PM


    Hi again,

    I have found the cause of the issue but still not the solution.

    In the file structure, for Movimentos contabilísticos (GeneralLedgerEntries) part, Índice do campo "lines", the legal requirement is:

    "Estrutura agregadora das linhas de movimentos, que tem que incluir,pelo menos, uma linha de débito euma linha de crédito, sem imposição em termos de ordenação".

    The issue is output by the validation tool When finds two debit o credit movements within this epigraph "lines". See attached. The error log refers to the Record ID 3, because is another debit line. I have checked this with other files.

    I could not find any information related to this topic in SAP note 2499284 or other sap notes. So, is this a sap error in XML output structure?

    Add comment
    10|10000 characters needed characters exceeded