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.
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member467500
Participant
Tax Decision Tree is a feature which helps in creating custom rules for the automatic determination of the tax code. It uses a tree-like model of decisions and their possible consequences to determine the tax code. This blog explains how to create a tax decision tree using SAP Cloud Applications Studio.

Prerequisites



  • You have installed the latest SAP Cloud Applications Studio release for creating the tax decision tree.

  • The country/region you want to configure is available in the tax country table already delivered by SAP.


 

Steps to create a tax decision tree


Following are the steps to create a tax decision tree:

a. Open SAP Cloud Applications Studio, go to Project/ Solution Explorer and right click on the solution in which you want to add the decision tree. A menu will appear, click the Add option, and then open New Item.

 


 

b. A new window will open where you have to select the tax decision tree option and give a name for the tax decision tree,

  1. Go to Business Configuration option.

  2. Select Tax Decision Tree option.

  3. Enter a name for your tax decision tree. (Do not change the .bcctax part)

  4. Click the Add button.


 


 

After clicking the Add button, the decision tree create wizard will open.

c. On the first screen, under basic information,

  1. Select the Withholding Tax checkbox if the decision tree is to be created for the withholding tax scenario.

  2. Enter a Name for the decision tree.

  3. Enter a Description for the decision tree.

  4. Select the Country/Region for which the decision tree is applicable.

  5. Choose a Valid From date.

  6. Click Next.


 


 

d. A new window opens where you can define the decision tree structure.

  1. Click Add Question.

  2. Click on the First Question button. A question form will open, here we can configure the question.

  3. In the question form select the Select Type of the question. Depending on the select type, options will be shown in the form. For this illustration, we will select the Select Type as 'Question'.

  4. Enter a text for the Question.

  5. Choose the Test Parameter.

  6. Further there are options to configure Context Parameters and Comparison Values (shown in colored box in the image below)

  7. Click Next.


 


 

e. Click Finish.


 

Steps for deploying the tax decision tree



  1. Activate the created tax decision tree from the Solution Explorer.



 

  1. Right click on the solution folder and select the option Deploy Business Configuration.



 

More Information on the test parameters for the selection type ‘Question’


For Product Tax




  1. DirectionIndicator




DirectionIndicator test parameter is used to include a check on the kind of business transaction being processed in the decision tree.

It has two comparison values:

  • 1 - Sale/ Outgoing, for sales scenarios.

  • 2 - Purchasing/ Incoming, for purchase scenarios.


Sample Question: Is the transaction a sale or purchase ?

Depending on the result, further processing of the decision tree continues.

 


 


  1. ProductTaxability




ProductTaxability test parameter is used to include a check on the kind of products being processed in the decision tree.

It does not have context parameters but has five comparison values:

001 – Good / Material

002 – Service

003 – Asset / Individual Material

004 – Warranty

006 – Entitlement Product

Sample Question: Is the transaction a sale of goods or a purchase of services ?

 

 


 


  1. Country




Country test parameter is used to include a check on the location of the business partner or the service provider or the Ship-To / Ship-From party in the decision tree.

It has one context parameter called PartnerRole which can take the following values:

CF – Contract-From party

CT – Contract-To party

SF – Ship-From party

ST – Ship-To party

SL – Service Point Location

Please note: You must use the country ISO as the comparison values.

Sample Question: Is the Ship-To party in DE (Germany) ?

 


 


  1. ServicePointTaxableIndicator




ServicePointTaxableIndicator test parameter is used to include a check to see whether the service is taxable at the point of service or not in the decision tree.

It has three context parameters:

  1. TaxType

  2. TaxableCountry

  3. TaxableRegion (remains empty if the tax is not region specific)


Please note: For these context parameters, a value help is available based on the SAP delivered content and partner created content.

Sample Question: Is the service taxable at the point of service ?

 


 


  1. ProductTaxExemptionReasonCode




ProductTaxExemptionReasonCode test parameter is used to include a check to see whether there is any tax exemption for the product in the decision tree.

It has three context parameters:

  1. TaxType

  2. TaxableCountry

  3. TaxableRegion (remains empty if tax exemption is not region specific)


Please note: For these context parameters, a value help is available based on the SAP delivered content and partner created content.

As comparison values we must use the tax exemption reason codes already defined in the system. There is no value help for this.

Sample Question: Is the service subject to reverse charge ?

 


 


  1. PartnerTaxability




PartnerTaxability test parameter is used to check the business partner taxability.

It has one context parameter called the PartnerRole which can have the following values:

  • CF – Contract-From party

  • CT – Contract-To party

  • SF – Ship-From party

  • ST – Ship-To party

  • SL – Service Point Location


Sample Question: Is the service recipient a company ? (In this case the Partner Role must be either CT or ST and the comparison value must be 100)

 


 


  1. PartnerTaxGroup




PartnerTaxGroup test parameter is used to include a check on the rate type assigned to the business partner in the decision tree.

It has four context parameters:

  1. TaxType

  2. TaxableCountry

  3. TaxableRegion (remains empty if tax exemption is not region specific)

  4. PartnerRole


Please note: For these context parameters, a value help is available based on the SAP delivered content and partner created content.

Use ‘X’ as the comparison value in case the question is answered positive.

PartnerRole can have the following values:

  • CF – Contract-From party

  • CT – Contract-To party

  • SF – Ship-From party

  • ST – Ship-To party

  • SL – Service Point Location


Sample Question: Is the supplier classified for tax rate type code 1 ?

 


 


  1. PartnerTaxNumber




PartnerTaxNumber test parameter is used to include a check on the partner tax number type in the decision tree.

It has three context parameters

  1. CountryRole

  2. PartnerRole

  3. PartnerTaxNumberType


In the comparison value field, enter the tax number type which needs to be checked for the partner.

Please note: PartnerRole and CountryRole can have the following values:

  • CF – Contract-From party

  • CT – Contract-To party

  • SF – Ship-From party

  • ST – Ship-To party

  • SL – Service Point Location


 


 

For Withholding Tax




  1. ProductTaxTypeIndicator




ProductTaxTypeIndicator test parameter is used to include a check on the tax type assigned to the product in the decision tree.

It has three context parameters:

  1. TaxType

  2. TaxableCountry

  3. TaxableRegion (remains empty if the tax is not region specific)


Please note: For these context parameters, a value help is available based on the SAP delivered content and partner created content.

Use ‘X’ as the comparison value in case the question is answered positive.

Sample Question: Is the product classified for tax type 3 ?

 


 


  1. PartnerTaxGroup




PartnerTaxGroup test parameter is used to include a check on the rate type assigned to the business partner in the decision tree.

It has four context parameters:

  1. TaxType

  2. TaxableCountry

  3. TaxableRegion (remains empty if the tax is not region specific)

  4. PartnerRole


Please note: For these context parameters, a value help is available based on the SAP delivered content and partner created content.

Use ‘X’ as the comparison value in case the question is answered positive.

PartnerRole can have the following values:

  • CF – Contract-From party

  • CT – Contract-To party

  • SF – Ship-From party

  • ST – Ship-To party

  • SL – Service Point Location


Sample Question: Is the supplier classified for tax rate type code 1 ?

 


 


  1. IncomeType




IncomeType test parameter is used to include a check on the income type.

It has two context parameters:

  1. TaxableCountry

  2. TaxType (assigned to the product or the business partner)


Comparison values use income types defined already in the system for the corresponding country code and tax type provided in the context parameter.

Sample Question: Is the product classified for income Type A or B or C ?

 


 

More Information on Other Select Types


In addition to the select type Question, we have two more select types: Result and Error.


  1. Result




          Result select type is used to include a result node in the decision tree. It has four parameters :

  1. Result

  2. TaxEvent

  3. TaxFromRole

  4. TaxToRole


Please note:

In the Result parameter we need to provide a text string highlighting a brief about the result represented by the node.

For the TaxEvent parameter, a value help is available based on the SAP delivered content and partner created content.

TaxFromRole and TaxToRole can have the following values:

  • CF – Contract-From party

  • CT – Contract-To party

  • SF – Ship-From party

  • ST – Ship-To party


 


 


  1. Error




Error select type is used to include an error node in the decision tree. It accepts texts as error message to be shown.

 


 

Summary


You can now create a tax decision tree by following the steps in this blog in order to automate the tax code determination. To verify if the new rules are being considered for the determination, we can check the Tax Trace for the business transaction (for example, Supplier Invoice creation).

Below is a sample tax decision tree.