Integration with External Tax Calculation Engines – How to Determine the Tax Code Automatically in Purchase Orders
Note: This blog post, originally published in 2020, contains information related to an older version of this product. For information about the latest version, please see Integration with External Tax Calculation Engines – New Integration for SAP S/4HANA Cloud and SAP S/4HANA
Note: Automatic Tax Code Selection, as described in this blog post, is not available for Brazilian scenarios.
Note: Automatic Tax Code Selection, as described in this blog post, is no longer supported for the Canadian scenarios, in spite of being used in the examples.
If I use integration with external tax calculation engines in SAP S/4HANA (cloud or on-premise), I can automatically determine the tax code in purchase orders. This is possible because the external tax calculation engine can automatically select the corresponding tax codes based on the information maintained in the purchase order, for example, using the shipping locations.
Assuming I want to use this feature in Canada. It works like this:
- I create a purchase order using the Create Purchase Order – Advanced application (transaction ME21N in S/4HANA on-premise).
- I provide the technical tax code TS in the purchase order item in SAP S/4HANA. This indicates to the system that I want an automatic tax code selection. See an example in the screenshot below:
- The information about the purchase order item is sent to the external tax calculation engine, in a JSON payload called “standard payload” (contains logistics information). Check below an example of payload containing shipping information:
- The correct tax code and tax amounts are determined by the external tax calculation engine based on the payload information and returned to the SAP S/4HANA system.
- The SAP S/4HANA system replaces the TS technical tax code in the purchase order item by the one tax code determined by the external tax calculation engine. This way I save the purchase order with the correct tax code, not impacting further processes:
I still have the option to inform a specific tax code in the purchase order item, as before this feature was available. In this case, the external tax calculation engine calculates taxes according to the tax code I have specified. In this scenario, the SAP S/4HANA system sends to the external tax calculation engine the information about the purchase order and the tax code that I have chosen. The system sends this information to the external tax calculation engine in a JSON payload called “direct payload” (this payload does not contain logistic information, instead it contains the information about the tax code I have provided).
Tax Code TS in SAP S/4HANA (On-premise)
In case I want to check (or create) the tax code TS in the S/4HANA system, follow the steps below:
- Login to the SAP GUI.
- Access the FTXP transaction and choose the country.
Example: for this scenario, I chose Canada.
- In the Display Tax Code: Initial Screen, I enter TS as Tax Code. The integration with external tax calculation engines uses this specific code to identify that the user wants the external tax calculation engine to automatically determine the tax code in purchase orders.
Note: since Canada uses Tax Jurisdiction, TS tax code has to be created for every tax jurisdiction.
- In the Display Tax Code screen: Tax Rates, I have to activate the tax conditions. I do this by providing any value as Tax Percent for each tax condition.
Example: for Canada I choose to provide a tax percentage rate as follows.
Tax Type Acct Key Tax Percent. Rate Cond. Type A/P GST Recoverable VST 0.000 JC1E A/P PST distributed NVP 0.000 JC1I A/P QST VSC 0.000 JC2S A/P HST VSH 0.000 JC5S
Note: the external tax calculation engine determines the correct tax rate, here I am just activating the tax conditions so that the SAP S/4HANA system can assign tax details like rate and amount to those tax conditions.
- From the Display Tax Code screen: Tax Rates, I choose Properties and provide the following:
Tax Code: Automatic Tax Code Selection
Tax Type: V (Input Tax)
- I save information.
Note: For Canada, TS tax code has been delivered in the standard content for S/4HANA Cloud. It is available for SAP S/4HANA as Best Practices content.
More information about TS in Canada can be found in the SAP Help documentation.
Tax Code TS in SAP S/4HANA Cloud
The TS tax code is already available for Canada. Please check the scope item 43D for the updated list of supported countries.