Documentation Index

Fetch the complete documentation index at: https://payhawk.document360.io/llms.txt

Use this file to discover all available pages before exploring further.

Still waiting weeks after close for invoices? Agent Fetch finds them automatically. | Learn more

The selected tax code is not valid. Please check tax code settings on SAP S/4HANA.

Prev Next

Error message

The selected tax code is not valid. Please check tax code settings on SAP S/4HANA.

Affected ERP integrations

  • SAP S/4HANA®

Cause

When exporting an expense, you may encounter an error indicating that the selected tax code is invalid, or that the tax code does not exist for the specified country or region's tax procedure.

SAP S/4HANA uses a strict framework called a Tax Calculation Procedure to process taxes. This procedure is determined entirely by the country or region of your legal entity.

This error happens when Payhawk tries to export an expense with a tax code that SAP S/4HANA cannot validate. There are a few reasons why this happens:

  • The tax code does not exist at all in your SAP S/4HANA system.

  • The tax code is valid in SAP S/4HANA, but it hasn't been assigned or activated for the specific country or region of the company code absorbing the expense.

  • The country itself is mapped to an incorrect tax calculation procedure in the background.

Solution

Before updating your ERP configuration, check the tax mapping on the expense:

  1. Open the affected expense in Payhawk and review the selected Tax Rate or Tax Code.

  2. Make sure the tax rate matches the physical country where the expense took place and where your entity is registered.

  3. If your integration configuration maps Payhawk tax rates to SAP S/4HANA tax codes automatically, double-check your integration settings to ensure there are no typos or outdated mappings to old SAP S/4HANA tax codes.

If the tax code selected in Payhawk is correct, a financial administrator needs to review and update the tax settings inside SAP.

SAP S/4HANA Public Cloud Edition

To resolve the issue in SAP S/4HANA Public Cloud Edition:

  1. Log into your SAP Fiori launchpad with configuration permissions.

  2. Go to your configuration environment such as Central Business Configuration or Manage Your Solution.

  3. Search for and open the configuration step titled Define Tax Codes for Sales and Purchases.

  4. Enter the Country/Region key of the entity encountering the error.

  5. Check if the specific tax code from your error notes is listed. If it’s missing, you must create it here and define its tax percentage properties.

  6. Verify that the tax code is marked as active and has not been deactivated or locked.

SAP S/4HANA Private Cloud Edition

To resolve the issue in SAP S/4HANA Private Cloud Edition:

  1. Run transaction code FTXP (Maintain Tax Code).

  2. Enter the Country code associated with your company code and press Enter.

  3. Look up the Tax Code from the error message. If it doesn't exist, you need to create it for this specific country, assign it a tax type, such as Input Tax, and define its rate percentages.

  4. Check the country's tax engine assignment by running transaction code OBBG (Assign Country to Calculation Procedure).

  5. Find your country and ensure it is linked to the correct Tax Procedure, for example, TAXDE for Germany and TAXUS for the US. If the procedure is misaligned, SAP S/4HANA will fail to recognize valid tax codes.

  6. Save your changes to a transport request.

Next steps

Once you have corrected or activated the tax code setup in SAP S/4HANA, you need to update Payhawk before re-exporting.

  1. Log in to the Payhawk Web Portal.

  2. Go to Settings > Integrations > SAP S/4HANA.

  3. Sync manually your master data. This pulls the updated tax profiles and procedures from SAP into Payhawk.

  4. Go to the Expenses app.

  5. Locate the pending expense and click Review to successfully re-export the transaction.