SAPBR Technologies home

SAP in Brazil, explained

Creating Tax Groups for Taxes Exception

SAP puzzle illustration

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.

Illustration

Select country BR:

Illustration

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

Illustration

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

Illustration

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 groupUsage
1MM: ICMS base reduction carrier. SD: ICMS base reduction customer. ISS rates (material-dependent).
5ICMS, IPI, S.T. material-dependent exceptions. MM: ISS exceptions (dependent on ship-from, ship-to, material).
97SD: IPI tax laws (based on NCM code).
98IPI 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).
99Default 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”:

SAP screen: Blue box: taxes checkboxes

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:

SAP screen: Map tax rate tables to condition 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 screen: Map tax rate tables to condition tables

* 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.

SAP screen: Map tax rate tables to condition tables

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:

SAP screen: Map tax rate tables to condition tables

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:

  1. Update access sequences: update existing steps.
  2. Insert into the access sequences: add new steps after creating a tax group.
  3. 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.

SAP screen: Migrate tax groups into access sequences

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:

SAP screen: Migrate tax groups into access sequences

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

SAP screen: Migrate tax groups into access sequences

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.

SAP screen: Migrate tax tables to conditions

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).

SAP screen: Migrate tax tables to conditions

The result looks similar to this:

SAP screen: Migrate tax tables to conditions

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

Comments

8 responses to “Creating Tax Groups for Taxes Exception”

  1. Using a Tax Group for Tax Dynamic Exception | SAP BRAZIL Avatar

    […] ← Creating Tax Groups for Taxes Exception […]

    Like

  2. Configuring Tax Substitution (ICMS ST) | SAP BRAZIL Avatar

    […] Creating Tax Groups for Taxes Exception […]

    Like

  3. Naval Bhatt Avatar

    Hi Leandro,
    Thanks for the great blog .
    Do we have to follow the same procedure in case of REPNBL based on which the customer gets the exemption on IPI , PIS and COFINS.

    Is there anything that we have to do other than what is mentioned in your blog.

    Kind Regards,
    Naval Bhatt.

    Liked by 1 person

    1. leandropia Avatar

      Naval, I didn’t have chance to go through all the details on the REPNBL, but if you need to do the IPI, PIS and COFINS exemption to the customer, you should be able to do that using the concept of Tax Groups (J_1BTXTAXGRUOP) and Tax Dynamic Exceptions (J(J_1BTXIP1, J_1BTXCOFV and J_1BTXPISV). If you don’t want enter those exceptions customer by customer, you might be able to do that using other fields on TAXGRUOP if your customers are sorted for example based on industry type…

      Like

  4. Arun Avatar
    Arun

    Hi Leandro,

    Thanks for the detailed blog for Tax group based exceptions.
    I understand after a tax group is created we need to assign it the condition tables, I assume that all condition tables (322, 346, 347, 348, 382) should be mapped with tax group and J_1BTXCOF.

    Example if I have created a 2 new tax groups 50 and 60 and have selected COFINS for both then the entries should be as below
    J_1BTXCOF – 50 – 322
    J_1BTXCOF – 60 – 322
    J_1BTXCOF – 50 – 346
    J_1BTXCOF – 60 – 346
    J_1BTXCOF – 50 – 347
    J_1BTXCOF – 60 – 347
    J_1BTXCOF – 50 – 348
    J_1BTXCOF – 60 – 348
    J_1BTXCOF – 50 – 382
    J_1BTXCOF – 60 – 382

    Since I don’t want to miss any condition records being created, I am adding all 5 condition tables with Tax group. Please correct me if my approach is correct.

    Thanks,
    Arun.S

    Like

    1. leandropia Avatar

      Arun, the only entries you need are: J_1BTXCOF – 50 – 346
      J_1BTXCOF – 60 – 346

      For each Tax Group code you create and flag/tick the COFINS checkbox you will add an entry to table 346.

      Like

  5. Using a Tax Group for Tax Dynamic Exception – SAP Blog, SAP BRAZIL, ECC, S/4HANA and more… Avatar

    […] You maintain tax dynamic exceptions through transaction J1BTAX*. I won’t go through every entry, but I’ve highlighted the ones that accept dynamic exceptions using the tax groups created in my last post. […]

    Like

Leave a Reply