Now that you’ve read my previous post, Tax Substitution – ICMS ST, let’s see it working in SAP.
This isn’t the ONLY way to do it. There are others. This is one of them.
Part I: configuration
1) Define customer groups for tax substitution calculation
Not mandatory, but recommended. It groups customers that share the same Substituição Tributária calculation.
SPRO > Financial Accounting > Financial Accounting Global Settings > Tax on Sales/Purchases > Calculation > Settings for Tax Calculation in Brazil > Define Customer Groups for SubTrib Calculation
Add an entry like this:

2) Define item categories
Create an item category to use in the sales order to pull the right tax information. With a new item category, you don’t need a separate sales order type just for tax substitution.
SPRO > Sales and Distribution > Sales > Sales Documents > Sales Document Item > Define Item Categories
Add an entry like this:


3) Define item category usage
SPRO > Sales and Distribution > Sales > Sales Documents > Sales Document Item > Define Item Category Usage
Add an entry like this:

4) Assign item categories
SPRO > Sales and Distribution > Sales > Sales Documents > Sales Document Item > Assign Item Categories
Using your standard sales order type as a reference, add an entry with item category ZST and item usage ZST:

5) Maintain sales document item category
SPRO > Sales and Distribution > Billing > Billing Documents > Country Specific Features > Brazil > Maintain Sales Document Item Category
Using your standard sales order type as a reference, add an entry for item category ZST with the tax information:

This is the famous (or infamous) table J_1BSDICA.
It has 2 key fields, sales order type and item category, which determine the nota fiscal type, the ICMS, IPI, PIS and COFINS tax laws, tax code, CFOP and more.
If you don’t know this table, I may write a post on it. For now, here’s what to enter:
| Field | Value |
|---|---|
| Sales document type | The sales order type used for regular sales |
| Item category | The item category created above (ZST in this example) |
| NF item type | 1 (standard item) |
| NF CFOP special case | 1 (CFOP determination with Substituição Tributária) |
| Main partner ID | The ship-to partner type |
| Tax code | I4 (or whichever code calculates ICMS + ICMS ST + IPI + PIS + COFINS) |
| ICMS law | The ICMS tax law. You may have one standard law for ICMS ST sales. The ST dynamic exception has no tax law field, so for exceptions use the customer master or the regular ICMS dynamic exception table. |
| IPI law | The IPI tax law, for example the same one used for regular sales |
| COFINS law | The COFINS tax law, for example the same one used for regular sales |
| PIS law | The PIS tax law, for example the same one used for regular sales |
6) Maintain SD tax codes
SPRO > Financial Accounting (New) > Financial Accounting Global Settings (New) > Tax on Sales/Purchases > Calculation > Settings for Tax Calculation in Brazil > Define SD Tax Codes
Add a new entry or change your existing tax code like this:

7) Assign schedule line categories
SPRO > Sales and Distribution > Sales > Sales Documents > Sales Document Item > Schedule Lines > Assign Schedule Line Categories
Add an entry like this:

8) Copy control: sales order to delivery
SPRO > Logistics Execution > Shipping > Copying Control > Specify Copy Control for Deliveries
Add an entry like this, using the sales order type and delivery type of your regular sales:

9) Copy control: delivery to billing document
SPRO > Sales and Distribution > Billing > Billing Documents > Maintain Copying Control For Billing Documents > Copying control: Delivery document to billing document
Add an entry like this, using the delivery type and billing type of your regular sales:

10) Maintain billing document item category
SPRO > Sales and Distribution > Billing > Billing Documents > Country-specific Features > Country-specific Features for Brazil > Maintain Billing Document Item Category
Add an entry like this:

Part II: tax exceptions and customer info records
11) Maintain SubTrib dynamic exceptions
Here you maintain the dynamic exception that calculates ICMS ST with the right MVA (surcharge) and calculation method.
This is maintained per client. More on that in my post Change Customizing Tables to Master Data Tables.
Use transaction S_PL0_09000292, or this path:
SPRO > Financial Accounting > Financial Accounting Global Settings > Tax on Sales/Purchases > Calculation > Settings for Tax Calculation in Brazil > Tax Rates > Maintain SubTrib Dynamic Exceptions
Or go to J1BTAX and double-click Maintain SubTrib Dynamic Exceptions (J_1BTXST3) on the main screen.
Example:

Pick whichever tax group fits your needs. I used customer and material (group 50 here). If tax groups are new to you, see:
On this screen, enter:
| Field | What to enter |
|---|---|
| Sender (ship-from) | The state the goods leave from (from the plant master) |
| Receiver (ship-to) | The state the goods are delivered to (from the customer master) |
| SubTrib group | Optional. Required here if you assigned one in the customer master. |
| Valid from | When the exception starts |
| Valid to | When the exception ends |
| Dynamic key 1 | Customer. Keys can be whatever fits your business, as explained in the posts above. |
| Dynamic key 2 | Material, same idea |
| Dynamic key 3 | Not used in group 50 |
| Calculation method | From no ST calculation to several ways of calculating it. Confirm the right method with your tax department. Here, ICMS ST is calculated on the total invoice amount including taxes. |
| General information | The fields available depend on the method. Here, a surcharge rate (MVA) of 59.61%. |
12) Maintain the customer master
Add the SubTrib group to the customer. It’s useful when a group of customers falls under the same ICMS ST rules, because you can create exceptions for the group instead of each customer.
In XD02, maintain it like this:

13) Maintain customer-material info records (CMIR)
For each customer and material combination, create a CMIR in VD51/VD52 that sets the sales order item usage to ZST.
Example:

Part III: test and results
| Item | Value |
|---|---|
| ICMS rate | 4% |
| IPI rate | 15% |
| ICMS amount | 46.11 |
| IPI amount | 172.91 |
| NF total (ICMS + IPI) | 1,325.65 |
| Amount with ICMS only | 1,152.74 |
| Net amount | 1,106.63 |
| Tax substitution | |
| ICMS surcharge rate (MVA) | 59.61% |
| ICMS receiver rate | 18% |
| ICMS ST base | 2,115.87 |
| ICMS ST amount | 334.75 |
| NF total (ICMS + IPI + ICMS ST) | 1,660.40 |
| PIS rate | 1.65% |
| PIS amount | 19.02 |
| COFINS rate | 7.60% |
| COFINS amount | 87.61 |
| Stock value | 1,000.00 |
With this configuration plus the CMIR and the dynamic exception, the sales order pulled item category ZST, the right tax code (I4), CFOP and tax laws, and calculated as follows:


That’s it. I hope you enjoyed reading this as much as I enjoyed writing it.
If it helped, or you have a comment or experience to share, leave a comment.



Leave a Reply