
Tax groups are very useful for handling Brazilian tax calculation across ICMS, IPI, PIS, COFINS, ISS, tax substitution, withholding taxes and more. Rates, bases and other tax rules change constantly in Brazil, so you will certainly need tax groups in your SAP system.
Start by creating the tax groups. Go to transaction J1BTAX, or SPRO > Financial Accounting (New) > Financial Accounting Global Settings (New) > Tax on Sales/Purchases > Calculation > Settings for Tax Calculation in Brazil > Tax Rates > Define Tax Groups for Dynamic Exceptions.

Select country BR:

In J1BTAX, choose Tax Calculation > Maintain Tax Group from the menu:

Before you click “New entries”, here is what the fields in J_1BTXGROUP mean:

Red box: tax group
You can define groups from 10 to 89. Groups 0 to 9 and 90 to 99 are reserved for SAP and should not be deleted. SAP delivers groups 1, 5 and 97 to 99.
When looking for a dynamic exception, SAP searches from the lowest group to the highest and stops at the first match. Keep that in mind and build your groups from the most specific (lowest numbers) to the least specific (highest numbers).
The SAP-delivered groups are used as follows:
| Tax group | Usage |
|---|---|
| 1 | MM: ICMS base reduction carrier. SD: ICMS base reduction customer. ISS rates (material-dependent). |
| 5 | ICMS, IPI, S.T. material-dependent exceptions. MM: ISS exceptions (dependent on ship-from, ship-to, material). |
| 97 | SD: IPI tax laws (based on NCM code). |
| 98 | IPI standard taxes (based on NCM code). SD: IPI tax laws (based on country). ICMS standard tax rates (based on ship-from and ship-to). S.T. standard tax rates (based on ship-from, ship-to, S.T. group). |
| 99 | Default taxes (based on country). SD: IPI tax laws (based on tax code). |
Orange box: tax group fields 1, 2 and 3
You can combine up to three key fields (or none) to build the exception. The available fields are:
- ASNUM: Service Number
- MATNR: Material
- NBM: NCM Code
- MATKL: Material Class, Material Group
- MWSKZ: Tax Code
- LIFNR: Vendor
- KUNNR: Customer
- BRSCH: Industry Sector
- CITYC: City Code
- OIHMTXGP: Tax Group (Oil)
- OIHVGROUP: Customer Tax Group (Oil)
- OIHCGROUP: Vendor Tax Group (Oil)
- USAGE: Tax Calculation: Material Usage
- LOC_PR: Location of Service Provider
- LOC_SE: Location of Service Provision
- LOC_SR: Location of Service Customer
- BUKRS: Company Code
- WERKS: Plant
- MTUSE_MARC: Material Usage (Material Master Record)
- MTORG: Origin of Goods
- CNAE: CNAE Code
- CRTN: CRT Number
- ICMSTAXPAY: ICMS Tax Payer
- INDTYP: Industry Main Type
- TDT: Tax Declaration Type
- COMSIZE: Company Size
- DECREGPC: Declaration Regimen for PIS/COFINS
- LEGALNAT: Legal Nature
- EXTWG: External Material Group
- PRDHA: Product Hierarchy
- GPART_KK: Business Partner Number
Green box: calling application
The valid options are:
- SD (Sales and Distribution): the exception applies only to SD documents, such as sales orders and billing documents.
- MM (Materials Management): the exception applies only to MM documents, such as purchase orders and invoice verification.
- General: the exception applies to both MM and SD.
Blue box: taxes checkboxes
Select the taxes for which the group can be used in an exception.
The screen above is only an example. Work out the best key field combinations with your tax department.
To create a group, click “New entries”:

Map tax rate tables to condition tables
Once the groups exist, assign them to condition tables. Go back to the J1BTAX main screen and choose Condition Setup > Condition Mapping > Map tax Rate tables to Cond. Tables:

When you maintain Brazilian tax tables, the system creates or changes condition records automatically. This activity defines which condition table is used for each tax table. For dynamic exceptions, you also specify the condition table per tax group, so the system knows which condition table (which must be in the access sequence) gets the records.
Tax tables are assigned to condition tables by tax group for IPI, ICMS and Sub.Trib. dynamic exceptions, and always for ISS, PIS, COFINS and withholding taxes.

* SAP does not deliver standard Customizing for dynamic tax exceptions. Each new tax group you use needs its own entry. In SAP’s standard concept the condition table is the same for all tax groups, but if you customize access sequences differently you can specify a different condition table per group. SAP recommends staying with the standard concept of one condition table for all groups.
** These entries are on the overview page of the Tax Manager’s Workplace (transaction J1BTAX), where you define rates for several kinds of taxes.
A practical example of filling table J_1BVIEWMAP: I created the tax groups and marked 9 of them as relevant for COFINS dynamic exceptions.

I then created 9 entries mapping the tax rate table to the condition table, one per tax group. Tables without tax groups have a single entry each, and those never change.
Each time you create a tax group with the COFINS checkbox selected, add a new entry like this:

The same applies to these tables:
- J_1BTXCOF: COFINS
- J_1BTXIC3: ICMS
- J_1BTXIP3: IPI
- J_1BTXISS: ISS
- J_1BTXPIS: PIS
- J_1BTXST3: ST
- J_1BTXWITH: WHT
In other words, for every tax above with the checkbox active, create one entry per tax group, assigning the table name to the group and the right condition table (349, 346, 382 and so on).
Migrate tax groups into access sequences
Next, add the new groups to the access sequences. With condition-based tax calculation (CBT), every new tax group must be added to certain access sequences, which J1BTAX does automatically. The same applies when a group is changed or deleted.
From the J1BTAX main screen, choose Condition Setup > Migration > Tax Groups in Access Sequences.
On the selection screen, enter the tax groups to include. Set the Simulate Only indicator to preview the results. This is extremely important, because the program makes cross-client changes.
Also choose the type of conversion:
- Update access sequences: update existing steps.
- Insert into the access sequences: add new steps after creating a tax group.
- Delete from access sequences: remove existing steps.
If you’re creating all groups at once, select the range 10 to 89 and simulate first to make sure there are no errors.

If everything is green, run it again without Simulate Only and the groups are added to the access sequences.
You can use report J_1B_EXT_ACC_SEQ to update access sequences automatically after creating or changing tax groups for dynamic exceptions. You need cross-client Customizing authorization to change access sequences. Make sure tax groups are customized the same way in every client, because each conversion overwrites the previous access sequence settings.
The log should look something like this:

All access sequences are updated automatically. Here is one with the different tax groups added:

Migrate tax tables to conditions
Finally, migrate the tax tables to conditions to create the condition records. From the J1BTAX main screen, choose Condition Setup > Migration > Tax Tables to Conditions. This runs program J_1B_MIGRATE_TAX_RATES.

First select the application:
- TX (Materials Management)
- V (Sales and Distribution)
Then select the conversion option:
- Overwrite existing condition records
- Ask in case of existing condition records
- Never overwrite existing condition records
Then run the migration table by table.
Groups set as MM can only be run for application TX, and groups set as SD only for application V. General groups, and tables with no tax group, are run for both (with some exceptions).

The result looks similar to this:

In the next post, I explain how to create tax exceptions with the groups you created.


Leave a Reply