Symptom
SAF-T PT Accounting file generated with errors:
- Error: Query BPFORHEADER returns more than one record. Use query row key in data mapping - CustomerID
- Error: Value is not of the min. required length 1 - CustomerID
Environment
SAP S/4HANA Cloud Public Edition.
Reproducing the Issue
- Run statutory reports app.
- Search for the report Name: Portugal SAF-T - Accounting
- Select the Portugal SAF-T - Accounting activity.
- Select the Run Number X
- Notice that the run was generated with error.
- Error: Query BPFORHEADER returns more than one record. Use query row key in data mapping - CustomerID
Error: Value is not of the min. required length 1 - CustomerID
Cause
Journal entry created with multiple customers, which is non-compliant with the SAF-T structure.
It is not possible by PT_SAFT_ACCOUNTING to select which customer to display in the document header level.
Resolution
The steps below outline how to identify the journal entry created for multiple customers.
- Download and open the XML file report with a XML Editor.
- Search for <CustomerID/>
- It searches for transactions which the CustomerID field is empty.
- Transactions with multiple customers is not supported by the SAF-T structure.
- Once the transactions with multiple customers are identified, contact your local business user / auditor / legal advisor to explain the validation error to the Tax Authority.
Keywords
saf-t, pt accounting, customerid error, query bpforheader, portugal saf-t, accounting file error, statutory reports , KBA , FI-LOC-SAF-PT , Portugal , Problem
Product
SAP S/4HANA Cloud Public Edition all versions
SAP Knowledge Base Article - Public