SAP Knowledge Base Article - Public

3802883 - Error when posting via API with pro rata VAT: "Tax does not equal 0 when tax percentage rate is zero" - SAP S/4HANA Cloud Public Edition

Symptom

  • An error occurs when posting documents via API using a tax code with pro rata VAT deduction.
  • Error message: "Tax does not equal 0 when tax percentage rate is zero".
  • When a non 0.00 amount is passed as the amount for the pro rata VAT portion, the document is posted but an error message appears
  • Error message: "Tax does not equal 0 when tax percentage rate is zero" appears

Environment

  • Product: SAP S/4HANA Cloud Public Edition

Reproducing the Issue

  1. Use the Journal Entry – Post API to post accounting documents.
  2. Apply a VAT code with pro rata VAT deduction.
  3. Attempt to post the document with a pro rata VAT portion amount of 0.00 or a non-zero amount (for example, 0.50).

Cause

  • The API validates tax amounts against the configured tax code rates and does not auto-calculate pro rata splits. A non-zero tax amount was provided while the tax code’s non-deductible component (for example, NVV) was configured with a 0% rate.
  • Mismatch and/or imbalance in line item AmountInTransactionCurrency led to balance/small difference errors.

Resolution

  1. Verify the tax code configuration in configuration activity 101016. If the non-deductible component (for example, NVV) is configured as 0%, do not send a non-zero tax amount for that component. If pro rata non-deductible tax is intended, adjust the tax code rates accordingly before posting.
  2. Note that the API does not auto-calculate taxes. Perform the pro rata split outside the system and then provide the exact split in the payload.
  3. Ensure the journal entry balances: align AmountInTransactionCurrency between debtor/creditor and G/L lines so there is no residual difference, avoiding “Balance in Transaction Currency” and “Small difference … cannot be distributed” errors.
  4. As a validation step, first simulate the same posting via the Create Incoming Invoices app with “Calculate Taxes” to confirm expected amounts, then mirror those amounts in the API payload.
  5. For zero-rated tax codes, either set the tax amount to 0.00 or omit the tax line to prevent the “Tax does not equal 0 when tax percentage rate is zero” error.

Some additional points to keep in mind when configuring the payload: 

Populate the payload after the split:

  1. In ProductTaxItem, provide TaxAmount and TaxRate.
  2. Under the Tax node, provide Item: TaxExpenseAmountInTransacCrcy for the non-deductible portion (for example, NVV).

See Also

Keywords

pro rata vat, non-deductible input tax, nvv, journal entry post api, tax does not equal 0, tax percentage rate is zero, tax split, taxexpenseamountintransaccrcy, producttaxitem, sscui 101016, balance in transaction currency, small difference cannot be distributed, tax code configuration, api validation , KBA , FI-GL-GL-F-2CL , Value Added Tax (VAT) (Public Cloud) , Problem

Product

SAP S/4HANA Cloud Public Edition all versions