Enterprise Resource Planning Blogs by SAP
Get insights and updates about cloud ERP and RISE with SAP, SAP S/4HANA and SAP S/4HANA Cloud, and more enterprise management capabilities with SAP blog posts.
Showing results for 
Search instead for 
Did you mean: 
Note: This blog post, originally published in 2019, contains information related to an older version of this product. For information about the integration with external tax calculation engines, please see Integration with External Tax Calculation Engines – New Integration for SAP S/4HANA Cloud and SAP S/....

The tax service integration uses standard data to calculate taxes in a business transaction. However, there are cases when you need more specific information to calculate your taxes. To enable the system to identify this data, you can extend the tax service integration by executing the following steps:

Finding the Extendable Interfaces

Find the interfaces where you can extend the tax service integration.

These interfaces implement the IF_TXS_CLASS_ENHANCEMENT interface. To see all the Comprehensive Interfaces available for enhancement, follow the steps below:


  1. Access transaction SE80

  2. Select Repository Browser.

  3. Select Class/Interface in the object category field.

  4. Enter IF_TXS_CLASS_ENHANCEMENT in the Object Name field.

  5. Expand the Comprehensive Interface interfaces.

  6. Read the interface documentation and determine the interface in which you need to extend the tax service integration.

Aligning with your SAP Partner for Tax Calculation


Align with your SAP Partner for tax service about this new information since it affects the tax calculation.

Note: When you create a new key/value pair, use a namespace where the key name starts with "cust_".  For example, cust_ownProduction. 

Creating Your New Class

Create a new class and inherit the methods from the standard class you previously determined.

To execute this step, follow the instructions below:


  1. Access transaction SE24.

  2. Enter the name of your new class.

  3. Choose Create and Save.

  4. Go to the Properties tab.

  5. Choose the Superclass pushbutton.

  6. Enter the localization class that implements your determined interface.

  7. Choose Save.

  8. Implement a business logic according to your needs.

  9. Choose Activate.

Setting Your Class


  1. Go to Customizing for Integration with Other SAP Components, choose SAP Localization Hub, tax service   Enhance Localization Interfaces for Tax Service.

  2. Set your own class to be executed in place of the tax service standard localization classes for a determined interface.


See an example of how to extend the integration of SAP S/4HANA with tax service:

Assume that John is the tax specialist of the company and needs the system to calculate taxes for the company's purchases.

The company has some suppliers that resell or produce the goods interchangeably and this fact impacts the tax calculation for this purchase operation.

The tax service integration does not identify if the supplier produces these goods or resells them. To enable the system to identify this data, John asks the IT specialist, Donna, to take action.

Donna and John decide that they need to add a new field to the payload that identifies if the supplier resells or produces the goods. Based on this decision, Donna determines that she needs to extend the integration in the IF_TXS_ADDITIONAL_ITEM_INFO interface.

Donna contacts the company's SAP Partner for tax service and aligns with them about this new information in the payload. Donna then creates the ZCL_TXS_ADDITIONAL_ITEM_INFO new class, inherits methods from the standard class CL_TXS_ADDITIONAL_ITEM_INFO, and reimplements the APPEND_ADDITIONAL_ITEM_INFO method.

In this method, Donna first calls the super method to keep SAP standard additional item information and then, implements her own logic by adding a key/value pair with information required for tax calculation.

Important: In every key/value pair that you add under your own logic, the key name must start with the cust_ string, for example, cust_ownProduction. 

She names the key cust_OwnProduction to represent the information that they need to correctly calculate taxes.

The logic for the value information depends on the business of the company and must be extracted according to its data model.

Donna creates the ZCL_TXS_ADDITIONAL_ITEM_INFO class and it is now available in the Enhance Localization Interfaces for Tax Service customizing activity. She adds this class in the Class field and the IF_TXS_ADDITIONAL_ITEM_INFO in the Interface field. since this logic is valid for Brazil, Donna adds BR in the Country field.

With this implementation complete, John can calculate taxes considering if the supplier resells or produces the goods involved in this business transaction.


If you would like to see more blog posts about the tax service, follow the tags SAP Localization Hub and SAP tax service in the SAP Community.