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,
- Go to Business Configuration option.
- Select Tax Decision Tree option.
- Enter a name for your tax decision tree. (Do not change the .bcctax part)
- Click the Add button.
After clicking the Add button, the decision tree create wizard will open.
c. On the first screen, under basic information,
- Select the Withholding Tax checkbox if the decision tree is to be created for the withholding tax scenario.
- Enter a Name for the decision tree.
- Enter a Description for the decision tree.
- Select the Country/Region for which the decision tree is applicable.
- Choose a Valid From date.
- Click Next.
d. A new window opens where you can define the decision tree structure.
- Click Add Question.
- Click on the First Question button. A question form will open, here we can configure the question.
- 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'.
- Enter a text for the Question.
- Choose the Test Parameter.
- Further there are options to configure Context Parameters and Comparison Values (shown in colored box in the image below)
- Click Next.
e. Click
Finish.
Steps for deploying the tax decision tree
- Activate the created tax decision tree from the Solution Explorer.
- 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
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.
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 ?
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) ?
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:
- TaxType
- TaxableCountry
- 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 ?
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:
- TaxType
- TaxableCountry
- 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 ?
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)
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:
- TaxType
- TaxableCountry
- TaxableRegion (remains empty if tax exemption is not region specific)
- 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 ?
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
- CountryRole
- PartnerRole
- 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
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:
- TaxType
- TaxableCountry
- 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 ?
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:
- TaxType
- TaxableCountry
- TaxableRegion (remains empty if the tax is not region specific)
- 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 ?
IncomeType
IncomeType test parameter is used to include a check on the income type.
It has two context parameters:
- TaxableCountry
- 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.
Result
Result select type is used to include a result node in the decision tree. It has four parameters :
- Result
- TaxEvent
- TaxFromRole
- 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
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.