How To Fix M8158 - Check the tax code


SAP Error Message - Details

  • Message type: E = Error

  • Message class: M8 - Invoice Verification/Valuation

  • Message number: 158

  • Message text: Check the tax code

  • Show details Hide details
  • What causes this issue?

    You have entered a tax code that is not defined as an input tax.

    System Response

    The system issues an error message and will not allow you to continue with this transaction until the error is resolved.

    How to fix this error?

    Check that the tax code is correct.

    Error message extract from SAP system. Copyright SAP SE.


Smart SAP Assistant

  • What is the cause and solution for SAP error message M8158 - Check the tax code ?

    The SAP error message M8158, which states "Check the tax code," typically occurs during the processing of a transaction that involves tax calculations, such as when creating a purchase order, sales order, or invoice. This error indicates that there is an issue with the tax code being used in the transaction.

    Causes of Error M8158

    1. Invalid Tax Code: The tax code entered may not exist in the system or may have been deactivated.
    2. Configuration Issues: The tax code may not be properly configured in the system, leading to issues in tax determination.
    3. Missing Tax Jurisdiction: The tax jurisdiction associated with the tax code may not be set up correctly.
    4. Incorrect Master Data: The master data for the vendor or customer may not have the correct tax information.
    5. Country-Specific Regulations: The tax code may not be applicable for the specific country or region involved in the transaction.

    Solutions to Error M8158

    1. Verify Tax Code: Check the tax code being used in the transaction. Ensure that it is valid and active in the system.

      • You can do this by navigating to the tax code configuration in the SAP system (Transaction Code: OB40 for tax codes).
    2. Check Configuration: Ensure that the tax code is properly configured in the system.

      • Review the tax determination settings and ensure that the tax code is linked to the correct tax rates and accounts.
    3. Review Master Data: Check the master data for the vendor or customer involved in the transaction.

      • Ensure that the tax classification is correctly set up in the vendor or customer master records.
    4. Consult Tax Jurisdiction: If applicable, verify that the tax jurisdiction is correctly set up and linked to the tax code.

      • This may involve checking the jurisdiction codes and their corresponding tax codes.
    5. Consult Documentation: If the issue persists, refer to SAP documentation or consult with your SAP support team for further assistance.

    6. Testing: After making any changes, perform a test transaction to ensure that the error has been resolved.

    Related Information

    • Transaction Codes: Familiarize yourself with relevant transaction codes such as:

      • OB40: Maintain Tax Codes
      • OBYZ: Maintain Tax Jurisdiction
      • FK01/FK02: Vendor Master Data
      • XD01/XD02: Customer Master Data
    • SAP Notes: Check for any relevant SAP Notes that may address specific issues related to tax codes and error M8158.

    • User Roles: Ensure that you have the necessary authorizations to view and modify tax codes and master data.

    By following these steps, you should be able to identify and resolve the issue causing the M8158 error in SAP. If the problem persists, it may be beneficial to engage with your SAP support team for further investigation.

    • Do you have any question about this error?


      Upgrade now to chat with this error.


Instant HelpGet instant SAP help. Start your 7-day free trial now.


Related SAP Error Messages

Click the links below to see the following related messages:

Click on this link to search all SAP messages.


Rating
ERPlingo's SAP support assistant is amazing. Saves me countless hours trying to solve complex SAP issues myself. It's a real game changer!
Rate 1
Thomas Michael
SAP Consultant, Author & Speaker