Symptom
Errors occur during BG SAF-T Monthly report generation; the XML output is not generated correctly.
- Error: Element nsSAFT:Customer occurs 0 times. Number of occurrences must be >= 1. nsSAFT:Customer
- Error: Element nsSAFT:Supplier occurs 0 times. Number of occurrences must be >= 1. nsSAFT:Supplier
Environment
SAP S/4HANA Cloud Public Edition
Reproducing the Issue
- Go to the Statutory Reports app.
- Run the BG SAF-T monthly report (Report ID: BG_SAFT_MONTH).
- Observe that the report is generated with errors:
Element nsSAFT:Customer occurs 0 times. Number of occurrences must be >= 1. nsSAFT:Customer
Error: Element nsSAFT:Supplier occurs 0 times. Number of occurrences must be >= 1. nsSAFT:Supplier
Cause
Missing configuration of SAF-T-specific tax number categories in Business Partner master data, leading to empty CustomerID/SupplierID in the SAF-T XML.
Resolution
Using the tax categories in the Maintain Business Partner app, you can define, how your business partners' master data appears in the SAF-T report.
- Run the Maintain Business Partner app.
- In the Display in BP Role, select Business Partner (Gen.)
- Define the tax categories for suppliers (BG8) and customers (BG9).
On the Identification tab, in the Tax Number table, maintain the Tax Number Long field accordingly for each category:
-
Enter customer/supplier ID, for it to be included in the master file and in the transactional data (General Ledger Entries and Source Documents).
-
Enter EXCLUDE, for the customer/supplier to be excluded from the master file.
In the transactional data, the customer/supplier ID is replaced with the entity ID (VAT Registration Number).
-
Enter 0 for One-Time customer/vendor.
In the master file, the customer/supplier ID is derived from the One-Time customer/vendor data in the BSEC table.
-
See Also
- Refer to: Setting up the SAF-T report
Keywords
BG SAF-T, Bulgaria, statutory reports, nsSAFT:Customer occurs 0 times, nsSAFT:Supplier occurs 0 times, missing CustomerID, missing SupplierID, BG_SAFT_MONTH, Business Partner, tax number categories, BG8, BG9, SAF-T XML, missing nodes , KBA , FI-LOC-SAF-BG , Bulgaria , Problem
SAP Knowledge Base Article - Public