Skip to Content

SAF-T Portugal: Format file error

Jan 12 at 12:15 PM


avatar image

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Salvador Sánchez Gómez-Guillamon Jan 25 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:


10 |10000 characters needed characters left characters exceeded
Salvador Sánchez Gómez-Guillamon Jan 22 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?

10 |10000 characters needed characters left characters exceeded