March 7, 1997
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Contents
1. Description of the taxes...............................................................6
1.6 IRRF (Imposto de Renda retido na Fonte) for natural persons (CPF)............9
2.1.5 Calculation formula for IRRF withholding tax (for natural persons).........13
Page 2
SAP R/3
GUIA DE IMPLEMENTAÇÃO
3.1 Discounts.....................................................................................................40
3.2 Freight.........................................................................................................44
3.2.1.3 Intrastate and Interstate Freight - base value reduction for carrier (80%)....................46
Page 3
SAP R/3
GUIA DE IMPLEMENTAÇÃO
4.1.4.5 Tax codes for incoming movements - Future delivery purchasing / Consignment........73
4.1.4.6 Tax codes for incoming movements - Services - ISS and INSS......................................73
Page 4
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Page 5
SAP R/3
GUIA DE IMPLEMENTAÇÃO
The IPI is a federal tax which is charged when selling, transferring, etc. goods. The
percentage rate and the value-base of IPI depends on several factors which are:
• Type of operation
- The type of operation (CFOP) determines if IPI is charged or not. Type of
operation is defined per line item. Types of operation are e.g. export, sending
goods from one stock to another.
- CFOP is currently implemented in the Nota Fiscal but not in the standard system
and will therefore not be used to determine which tax types have to be
calculated in a special business case.
• Product/NBM-code
- IPI is charged per product, and calculated from the goods value incl. ICMS. The
due percentage rate depends on a product classification which is called NBM-
code.
In the current solution the NBM-code is implemented as a material master
extension.
It is important to make a difference whether a product group (NBM-code) is
taxed with the rate 0% or not taxed at all (exempted). This has to be determined
by the NBM-code to create a correct Nota Fiscal.
- For some products (identified by the NBM-code) IPI is calculated on a reduced
base. That means e.g. 80% of the goods value is taxed and 20% is not taxed.
The reduction of the base can be valid permanently or only for a certain time
range.
- Origin of product (imported/domestic/...) is only important for sales to Zona
Franca (see chapter Zona Franca).
• Customer
- Some companies do not have to pay IPI tax (e.g. some government companies).
This is only relevant if something is sold to such a company (A/R / customers).
Page 6
SAP R/3
GUIA DE IMPLEMENTAÇÃO
The ICMS is a state tax which is charged when selling, transferring, etc. goods. The
percentage rate and the value-base of ICMS depends on several factors which are:
• Type of operation
- The type of operation (CFOP) determines if ICMS is charged or not. Type of
operation is defined per line item. Types of operation are e.g. export, sending
goods from one stock to another.
- CFOP is currently implemented in the Nota Fiscal but not in the standard system
and will therefore not be used to determine which tax types have to be
calculated in a special business case.
• Product/NBM-codes
- Exemptions of ICMS for particular products are possible. Exemptions can be
permanent or only valid until a certain date. It is possible that an exemption is
only valid inside a state or an exemption is valid for all states.
- Different/reduced rates of ICMS for particular products. It is important to make a
difference whether a product is taxed with the rate 0% or not taxed at all. This
has to be determined to create a correct Nota Fiscal.
Reduced rates are only used within a state. Therefore they do not depend on
state of origin and state of destination.
- For some products ICMS is calculated on a reduced base. That means e.g. 80%
of the goods value is taxed and 20% is not taxed. The reduction of the base can
be valid permanently or only for a certain time range.
- Origin of product (imported/domestic/...) is only important for sales to Zona
Franca (see chapter Zona Franca).
• Customer
- Some companies do not have to pay ICMS tax (e.g. some government
companies) This is only relevant if something is sold to such a company (A/R /
customers).
Page 7
SAP R/3
GUIA DE IMPLEMENTAÇÃO
- The base value for the calculation of ICMS depends on the usage of the goods.
If a customer buys goods for reselling or production, ICMS is calculated on the
goods value without IPI. If the goods are used in a different way (e.g.
consumption), ICMS is calculated on the goods value plus IPI.
Additionally the usage determines how the amounts are posted in purchasing. If
a material is used for production the tax amounts are posted to separate line
items. If a material is used for consumption the tax increases the value of the
material and can not be recovered.
- Concerning the tax calculation in MM/FI the usage has to be implemented as
different tax codes because the tax code determines the account assignment
(distribute tax to separate line items, add tax to expense) in the tax procedure.
In SD the usage has to be entered manually on line-item level in the sales order.
A special case of ICMS is the complement of ICMS. This tax is calculated and posted
under the following conditions:
The complement of ICMS is calculated as the difference between the ICMS rate
charged by the vendor and the ICMS rate which is valid when buying in the same
state. Comp. ICMS has to be posted as a tax liability but is not added to the product
price.
It is important to consider that the complement of ICMS just affects the FI-posting. The
amount is not part of the Nota Fiscal and therefore not stored in the Nota Fiscal
database.
Page 8
SAP R/3
GUIA DE IMPLEMENTAÇÃO
ISS is a tax on services. It is a municipal tax. The tax rate is determined by the city of
the supplier and by the type of service. There is only one exception for construction
companies which use the ISS rate of the city where they are building/working. The
exception for construction companies is currently not in scope for the localization. The
ISS tax amount is normally included in the service price.
The ‘type of service’ is not implemented in the system and most companies deliver
only one type of service. This means that the ISS-rate depends on the vendor
(supplier) on the incoming side and on the selling company (code) on the outgoing
side.
The calculation of ISS is only relevant on the outgoing side (SD) because the ISS
amount has to be stored in the Nota Fiscal database for reporting purposes. On the
incoming side (MM) the ISS amount is not posted as an ISS credit but is included in
the service price. Therefore in MM no ISS calculation is necessary. ISS is not stored in
the Nota Fiscal database on the incoming side. On the incoming side there is also not
reporting related to ISS necessary.
ISS can be used together with IRRF (income tax). There might be ISS without IRRF.
If the vendor of a service is a company (CGC), for some services (e.g. consulting) IRRF
has to be calculated and posted as a withholding tax. The IRRF rate depends on the
type of service. This rate cannot be determined but has to be entered manually. IRRF
for companies can occur together with ISS tax but with no other tax.
IRRF is not charged for all services. The decision if IRRF is calculated has to be
triggered manually. At year end a report about the withholded IRRF amounts per
vendor has to be generated.
If the vendor of a service is a natural person (CPF), for some services IRRF has to be
calculated and posted as a withholding tax. Together with IRRF there are two other
taxes which might be calculated:
Page 9
SAP R/3
GUIA DE IMPLEMENTAÇÃO
IRRF for natural person is only possible in MM. The calculation has to be done during
invoice verification. The decision if IRRF is calculated has to be triggered manually. At
year end a report about the withholded IRRF amounts per vendor has to be
generated.
The calculation is done based on table table defined periodically by the government.
This table defines which rate has to be used for which service amount. The tax
amount and the tax base amount has to be accumulated per vendor and month and
is then calculated according to the intervals given in the calculation table.
A special deduction of the base amount for the calculation is also possible. For each
member of the family of the natural person (wife and children) a fix amount (e.g. R$
90) has to be deducted from the base amount.
In this chapter some examples for the calculation of ICMS, IPI, Complement of ICMS,
ISS and IRRF are given:
Page 10
SAP R/3
GUIA DE IMPLEMENTAÇÃO
The calculation of ICMS is not done as a surcharge to the price (excluding tax) but
the calculation assumes the price including ICMS tax (and sometimes also IPI tax) as
the calculation basis. Depending on the use of the product different formulas are
used.
In case of discounts IPI is charged over the full amount; ICMS is charged on the
discounted amount including IPI.
ICMSrate
EPRICE − DisAmt = IPRICE − IPRICE *
100
or
EPRICE − DisAmt
IPRICE =
ICMSrate
1−
100
IPRICE = price including ICMS
EPRICE = price excluding ICMS
DisAmt = discount amount (N.F. relevant)
or
EPRICE − DisAmt
IPRICE =
IPIrate
ICMSrate * 1 +
100
1−
100
IPRICE = price including ICMS calculated over IPI
Page 11
SAP R/3
GUIA DE IMPLEMENTAÇÃO
The calculation of IPI is done as a ‘surcharge’ to the price (including ICMS). The
formula is therefore:
IPIrate
IPRICE = EPRICE + EPRICE *
100
The calculation of ISS is not done as a surcharge to the price (excluding tax) but the
calculation assumes the price including ISS tax as the calculation basis. The formula
behind this rule is:
ISSrate
EPRICE = IPRICE − IPRICE *
100
or
EPRICE
IPRICE =
ISSrate
1−
100
IPRICE = price including ISS
EPRICE = price excluding ISS
The calculation of IRRF for companies is not done as a surcharge to the price
(excluding IRRF but including ISS tax) but the calculation assumes the price including
IRRF and ISS tax as the calculation basis. The formula behind this rule is:
Page 12
SAP R/3
GUIA DE IMPLEMENTAÇÃO
IRRFrate
EPRICE = IPRICE − IPRICE *
100
or
EPRICE
IPRICE =
IRRFrate
1−
100
IPRICE = price including IRRF
EPRICE = price excluding IRRF
The calculation of IRRF for natural persons is done using the price (excluding)
INSS as a base amount for the calculation. The calculation itself is done using a rate
table which contains the information for which base amount which WT tax rates has
to be used. For each vendor the base amounts and taxes are to be cumulated per
month so that finally the tax is calculated over the total amount of services the
vendor has provided.
When selling or purchasing a product within or without a federal state the same rate
of IPI but different rates of ICMS are used. The additional tax calculation rules apply in
both cases. Therefore all examples are given with only one ICMS rate. As calculation
base the amount incl. ICMS is displayed if the full rate is used. Otherwise the reduced
amount incl. ICMS is printed.
If a special rate for ICMS has to be used the whole calculation is done according to the
normal calculation rules but with this special rate.
Page 13
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Base
Page 14
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Base
Base
Calculation of ICMS is done based on the amount incl. IPI. According to the calculation
formula the ICMSrate is calculated over IPI as follows:
IPIrate
ICMSnew = ICMSrate * 1 +
100
in the example:
10
ICMSnew: 12 * 1 + = 13 ,2
100
Page 15
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Only a part of the product price is taxed with ICMS. The reduced base affects the tax
calculation and the data transfer to the Nota Fiscal.
Page 16
SAP R/3
GUIA DE IMPLEMENTAÇÃO
90
CalcBase = * 91 .928,25 = 82. 735 ,43
100
Base
Page 17
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Base
Base
Only a part of the product price is taxed with ICMS. The reduced base affects the tax
calculation and the data transfer to the Nota Fiscal. Calculation of ICMS is done based
on the amount incl. IPI.
Page 18
SAP R/3
GUIA DE IMPLEMENTAÇÃO
In some cases of the tax calculation only one of the taxes (ICMS/IPI) has to be
calculated while the other tax is not applicable. To make sure that the information
about both ICMS and IPI calculation is available in all cases even data about the non
applicable tax has to be stored (e.g. for the legal books).
The general rule to handle such cases is to calculate the base amount also for the tax
which is not applicable and to keep this base amount in the field ‘Others’ of the
respective Nota Fiscal record. The tax amount for this tax then is zero.
Page 19
SAP R/3
GUIA DE IMPLEMENTAÇÃO
From 3.0F on it is also possible to store the base amount for ICMS and IPI as ‘Exempt’
instead of ‘Others’. This function is activated by two special indicators on tax code
level.
To simplify the documentation just one case is given as an example. All other case
work similar.
Base
Page 20
SAP R/3
GUIA DE IMPLEMENTAÇÃO
In addition to the standard case in sales and purchasing there are some special cases.
If the vendor is non IPI paying wholesaler 50% of the calculated IPI value can be
recovered. Since the wholesaler does not charge any IPI at all this IPI credit is
deducted from the inventory value. The IPI is not stored and printed in the Nota Fiscal.
Page 21
SAP R/3
GUIA DE IMPLEMENTAÇÃO
If a company buys a product in another state and the product is used for
consumption, then the complement of ICMS has to be calculated and posted. This
special ICMS is the difference between the ICMS rate charged by the vendor and the
ICMS rate which is valid when buying in the same state.
Based on the invoice value (including ICMS and IPI) the complement of ICMS is
calculated:
CompIcmsRate
CompIcms = Amount (incl .IPI ,incl .ICMS )*
100
6
CompIcms =103 .917 ,06 * = 6235 ,02
100
Page 22
SAP R/3
GUIA DE IMPLEMENTAÇÃO
For services a municipal tax (ISS) is charged. The rate is determined by the city of the
vendor.
9. 000,00 9. 000,00
= = 10 .000,00
10 0,90
1−
100
Page 23
SAP R/3
GUIA DE IMPLEMENTAÇÃO
For some services IRRF (income tax) is charged. An automatic determination if IRRF
has to be calculated or not is not possible and foreseen. The applicable percentage
rates has to be set manually per business transaction (by using a certain
withholding tax code).
IRRF rate : 2 %
These postings mean that the tax is withholded by the receiver of the goods.
The vendor just gets the invoice value reduced by the IRRF amount. The clearing on
the outgoing side is done at the end of the year according to the tax information
delivered by the company which withholded the IRRF tax.
Base
IRRF can also be charged in combination with ISS. The same rules as for ISS and IRRF
only apply.
Page 24
SAP R/3
GUIA DE IMPLEMENTAÇÃO
IRRF rate : 2 %
ISS calculation:
9000,00 9000,00
= = 10 .000,00
10 0,90
1−
100
See also example for IRRF only (see chapter Outgoing/incoming NF with IRRF for
companies (only) )
Page 25
SAP R/3
GUIA DE IMPLEMENTAÇÃO
INSS is a social security tax which the company has to pay when receiving the
service. INSS is no withholding tax. The calculation of INSS is like ISS.
For IRRF the tax amount and the base amount is cumulated per month and in each
posting of a month the already posted invoices of the vendor are taken into account
to calculate the IRRF which has to be withholded in the current posting.
As the base amount for IRRF the gross amount minus the INSS amount is used.
A special rules applies if the vendor is married. Then for each dependent member of
his family a fix amount is deducted from the tax base amount. This amount is
currently R$ 90,--.
INSS rate: 15 %
ISS(F) rate: 5%
To show the impact of the cumulation of the IRRF amount and the base amount the
example consists of three posting done in the same month and a fourth posting in the
next month.
Page 26
SAP R/3
GUIA DE IMPLEMENTAÇÃO
INSS - 180,00
Base amount for IRRF 1.020,00
2. posting (25/01/96):
Page 27
SAP R/3
GUIA DE IMPLEMENTAÇÃO
3. posting (27/01/96):
Page 28
SAP R/3
GUIA DE IMPLEMENTAÇÃO
4. posting (03/02/96):
To show the impact of the cumulation of the IRRF amount and the base amount the
example consists of three posting done in the same month and a fourth posting in the
next month.
Page 29
SAP R/3
GUIA DE IMPLEMENTAÇÃO
2. posting (15/01/96):
Page 30
SAP R/3
GUIA DE IMPLEMENTAÇÃO
3. posting (28/01/96):
Page 31
SAP R/3
GUIA DE IMPLEMENTAÇÃO
4. posting (06/02/96):
To show the impact of the cumulation of the IRRF amount and the base amount the
example consists of three posting done in the same month and a fourth posting in the
next month.
Page 32
SAP R/3
GUIA DE IMPLEMENTAÇÃO
2. posting (25/01/96):
Page 33
SAP R/3
GUIA DE IMPLEMENTAÇÃO
3. posting (27/01/96):
Page 34
SAP R/3
GUIA DE IMPLEMENTAÇÃO
4. posting (03/02/96):
To show the impact of the cumulation of the IRRF amount and the base amount the
example consists of three posting done in the same month and a fourth posting in the
next month.
Page 35
SAP R/3
GUIA DE IMPLEMENTAÇÃO
2. posting (15/01/96):
Page 36
SAP R/3
GUIA DE IMPLEMENTAÇÃO
3. posting (28/01/96):
Page 37
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Page 38
SAP R/3
GUIA DE IMPLEMENTAÇÃO
4. posting (06/02/96):
Page 39
SAP R/3
GUIA DE IMPLEMENTAÇÃO
3.1 Discounts
• Cash Discount
In SD (pricing) discounts can be given before calculating the tax base amount. These
discounts are not included in the Nota Fiscal.
There is no effect on the tax base amount. These kind of discounts are just part of the
company internal pricing strategy and do not appear on any documents.
The discounts can be given before calculating the tax base amount and included in
the Nota Fiscal. The legal requirement how these discounts affect the tax calculation
are:
• For ICMS the discount is not included in the base amount. ICMS is
calculated on the discounted amount.
• For IPI the discount is included in the base amount. IPI is calculated on
the not discounted (full) amount.
Cash Discount
Cash discounts are handled in the A/P and A/R modules. When giving cash discounts
the taxes are always calculated over the full value because the cash discount is not
known in the MM (invoice verification) or the SD (billing). A correction of the taxes
based on the price after the cash discount in A/P or A/R is not foreseen.
That means that the Brazilian company codes have to be set up with:
Page 40
SAP R/3
GUIA DE IMPLEMENTAÇÃO
The discount has no effect on the tax base amounts and the FI document. For the
accounting the gross sales amount is the discounted amount.
All further processing is done exactly in the same way as if there is no discount. The
price for the following processing the ‘Price in the Nota Fiscal’ = ‘Sales price’. The
normal processing is documented in chapter 2.2.1 (Industrialization) and 2.2.2
(Consumption) of this document.
Page 41
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Base
Page 42
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Calculation of price:
The discount has no effect on the tax base amounts and the FI document related to
the Nota Fiscal.
All further processing is done exactly in the same way as if there is no cash discount.
The price for the following processing the ‘Price in the Nota Fiscal’ = ‘Sales price’. The
normal processing is documented in chapter 2.2.1 (Industrialization) and 2.2.2
(Consumption) of this document.
Page 43
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Bank 98.400,00 C
3.2 Freight
Expenses on purchasing and selling like freight are handled in two different ways in
Brazil:
Having a ‘conhecimento’ is the most common way to handle freight in Brazil. In the
‘conhecimento’ only ICMS or ISS but no IPI is calculated.
If the transportation is done within the same municipal area, the only applicable tax is
the ISS.
Example :
9. 000,00 9. 000,00
= = 10 .000,00
10 0,90
1−
100
If the freight is used for material which is used for industrialization, the freight amount
has to be posted to an inventory account. If the freight is charged for a delivery of
sales products to a customer an account for ‘freight on sales’ must be used for debit.
Page 44
SAP R/3
GUIA DE IMPLEMENTAÇÃO
If the transportation is done within the same state or between states, the only
applicable tax is ICMS. Therefore the calculation in case of industrialization and
consumption is the same. The only difference between these case is how the ICMS is
posted in FI and the conhecimento.
Example :
Note that the inventory posting must be distributed between all the received
materials, according to manual, volume or value criteria.
Page 45
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Note that in the case of buying freight for the delivery of goods to customers, an
account for ‘freight on sales’ should be used for debiting the freight.
3.2.1.3 Intrastate and Interstate Freight - base value reduction for carrier (80%)
The carrier has the option of choosing reduction of the base amount. In that case, the
ICMS to be paid by the carrier may be calculated over 80% of the freight price. The
consequence of this choice is that the carrier will not be able to recover ICMS in the
purchase of goods that are used in the transportation (e.g. gasoline, tires etc.).
This special rule leads to the fact that a vendor dependent base reduction for the
ICMS calculation is required. The calculation itself work similar to ‘normal’ base
reductions for ICMS.
Example :
Page 46
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Base
Base
The calculation and posting of freight in the Nota Fiscal is not in scope of the
localization.
If the freight is included in the price and has not to be mentioned somewhere in the
Nota Fiscal, the standard processing in SD and MM fulfills the requirements. All other
ways of freight in the N.F. are not supported in the integrated solution.
For domestic products which are sold to Zona Franca for industrialization/resale
special processing of ICMS and IPI takes place. On the Nota Fiscal the amount
including ICMS is printed and a special discount equal to the ICMS amount has to be
given. IPI is not calculated at all. If products are sold for consumption taxes are
charged in the normal way.
Imported products are processed in the normal way. The decision if a product is
imported has to be done by the vendor because this rule is also valid via several sales
steps.
When buying from a company located in Zona Franca the normal processing of taxes,
... takes place.
Page 47
SAP R/3
GUIA DE IMPLEMENTAÇÃO
An internal Nota Fiscal with taxes has to be issued. The price of the material does not
change. The taxes are calculated considering either
- MAP moving average price or
- price of last purchase.
Page 48
SAP R/3
GUIA DE IMPLEMENTAÇÃO
S.T. is the ICMS amount due on a surcharge to the original price including ICMS and
IPI or on a fixed price per unit.
In SD S.T. depends on the customer. Not for every customer S.T. has to be calculated.
In MM S.T. depends on the plant. Not every company/plant has to pay S.T.
This data determines if S.T. is charged or not and if yes, how S.T. is calculated.
Additional rules:
The percentage rate to calculate the ICMS amount on the surcharged value is
taken from the state of destination. If the processed material has a special ICMS
rate in the state of destination this rate has to be used to calculated the ICMS on
the surcharged value.
The calculation base for S.T. is the material value. The calculated normal
ICMS value must be discounted when selling to Zona Franca. Therefore this
ICMS value is not deducted from the ICMS value calculated on the surcharged
value.
Page 49
SAP R/3
GUIA DE IMPLEMENTAÇÃO
For S.T. also the reduction of the calculation base is possible. This reduction
affects the amount on which the ICMS for S.T. is calculated. The amounts which
are reduced are:
depending on the way S.T is calculated. The reduction rate is taken from the
material dependent ICMS table from which also the S.T. rate is determined.
If S.T. is calculated for a Nota Fiscal line S.T. is also calculated for the freight
value included in the line item.
In Case 1 to Case 6 listed below some of the possible S.T. scenarios are given
Page 50
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Surcharge rate : 20 %
ICMS % rate for S.T. : 18 %
Page 51
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Page 52
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Page 53
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Number of units : 10
Fixed price per unit : 11.000,00
ICMS % rate for S.T. : 18 %
Page 54
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Surcharge rate : 20 %
ICMS % rate for S.T. : 17 %
Page 55
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Sales 88.172,04 C
ICMS tax to be paid 6.172,04 C
ICMS - tax expense 6.172,04 D
ICMS - discount Z.F. 6.172,04 D
SubTrib ICMS tax to be paid 16.728,00 C
Surcharge rate : 20 %
ICMS % rate for S.T. : 18 %
Page 56
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Base
Base
Surcharge rate : 20 %
ICMS % rate for S.T. : 18 %
Page 57
SAP R/3
GUIA DE IMPLEMENTAÇÃO
ICMS Sub. Trib. 12.844,25
Page 58
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Page 59
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Surcharge rate : 20 %
ICMS % rate for S.T. : 18 %
S.T. base : 80 %
Page 60
SAP R/3
GUIA DE IMPLEMENTAÇÃO
The basic idea for the tax calculation in Brazil is the usage of an external calculation
routine which determines the amounts for the several tax types
• IPI
• ICMS
• CompICMS (Complement of ICMS
• SubTribICMS (Substituicao Tributaria)
• ISS
The calculation of IRRF will be covered by the new solution for withholding taxes.
Page 61
SAP R/3
GUIA DE IMPLEMENTAÇÃO
• Calculation of the tax amounts, tax rates and tax base values per line item
according to the rules given in chapters 1. to 3. of this document.
• Transfer of calculated tax amounts per line item to Nota Fiscal and in MM return
of manually changed tax items back to R/3 standard.
For the external tax calculation the new ‘External tax interface’ is used as a common
business API. Basis for the tax calculation in the interface is the tax jurisdiction code
to determine the ship-to and also the ship-from location of a tax relevant business
transaction. The structure of the tax jurisdiction (levels of tax calculation and size of
the level-codes) is be defined in the customizing.
The ‘External tax interface’ consists of two main functions which are:
Contents of this chapter is the description how the external tax calculation procedure
is connected to the standard procedures in MM/FI and SD, which kind of system setup,
and which kind of customizing is necessary.
The basic idea of the external interface is the usage of calculation exits for conditions
in a tax procedure instead of calculating everything within the procedure. In these
calculation-exits the external processing is called and condition amount and
percentage rate for the different tax types are calculated and returned to the
standard processing. All tax values are calculated at the same time within one
function-call and then stored in global variables for later assignment to the single
conditions by other calculation-exits.
Page 62
SAP R/3
GUIA DE IMPLEMENTAÇÃO
In table T005 the tax calculation procedure for MM/FI is assigned to the country code
which is then assigned to a company, a plant, a customer, a vendor.
In table TTXD the activation of the external tax calculation with tax jurisdiction if
done. If an entry for a procedure in TTXD exists and the ‘EX’ indicator is set, the
calculation is active. This means that the check logic goes via several tables. E.g. for a
company code the check is done in the order T001-LAND1 -> reads T005 -> T005-
KALSM -> TTXD.
Additionally the TTXD controls if the calculation of taxes is done per line item (as
required in Brazil) or per tax code. In Brazil the flag for the calculation per line item
has to be set to ‘X’.
The tax jurisdiction code for Brazil is build as a one-level jurisdiction which just
consists of a 3 character tax region code. For further information see chapter .
If the external calculation is active, the system uses a function-call to determine the
jurisdiction code of plant, customer, vendor and cost center. The function-call is
processed, if in the master file maintenance of these objects the appropriate country
is used. Also for the calculation of the taxes a function-call is used.
The names of these function-calls are stored in table TTXC for each external system
indicator from table TTXD. The different event for the function calls are:
Page 63
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Because of this different posting logic depending on the usage it is not possible to use
the same tax code for both industrialization and consumption in MM.
In the tax calculation procedure for each way to post the tax (to special tax account or
distributed to the line items) a condition has to be defined. Each of these conditions
has a formula to determine the condition value, and percentage rate. The calculation
function calculates the amounts for all active conditions and returns them to the
calculation procedure.
The types of taxes which are calculated on the incoming side (MM) are
determined by the tax codes. Every tax code represents a certain combination of
taxes to be calculated.
The usage of the material on the incoming side (MM) is determined by the tax
code. For each tax code the usage has to be defined which means that a tax code can
either be used to trigger the tax calculation for industrialization or for consumption.
The layout of the tax calculation procedure for Brazil is fix and must not be changed.
If different requirements have to be implemented a copy of the standard calculation
procedure has to be used.
Page 64
SAP R/3
GUIA DE IMPLEMENTAÇÃO
The condition types determine which types of taxes can be calculated at all. The
definition of the condition types follows the standard definition of condition types for
the external US tax calculation. All conditions are defined in the same way. Fields in
the condition definition not mentioned in the following table are initial / not marked.
The cond. formulas are used to determine the condition value - tax value. Every
formula represents a certain type of tax. If a type of tax (like IPI) can occur twice in a
posting two different formulas are necessary. Otherwise the same formula can be
used for all conditions related to this tax type. The formulas used in the brazilian
calculation procedure are defined as follows:
Frm Description
.
300 Call to the external tax calculation
301 IPI for the industrialization case (301 + 302 may occur together)
302 IPI for the consumption case (301 + 302 may occur together)
Page 65
SAP R/3
GUIA DE IMPLEMENTAÇÃO
The base formulas are used to determine the base value for a condition. Every base
formula belongs to a condition value formula. Therefore the base formula has to be
used always in combination with the corresponding condition value formula. The
formulas used in the brazilian calculation procedure are defined as follows:
Frm Description
.
301 IPI for the industrialization case (301 + 302 may occur together)
302 IPI for the consumption case (301 + 302 may occur together)
303 IMCS for all cases
304 Substituicao Tributaria
305 ICMS complement (in MM) and ICMS Zona Franca discount (in SD)
306 ISS (only calculated in SD)
307 ICMS Sub.Trib. on freight offset
308 not used
309 Zero base
The account keys are used to determine how the tax amounts are posted in FI.
The account keys VSx are marked as ‘non-deductible’ in the standard. This setting is
only relevant for some standard tax reporting and does not affect any processing.
Therefore it is not necessary to change this for Brazil or to create new account keys
for input tax.
Page 66
SAP R/3
GUIA DE IMPLEMENTAÇÃO
The account keys are used to determine how the tax amounts are posted in FI.
To simplify the documentation only the active lines per tax codes are listed. The tax
codes are defined as follows.
Note: Any other setup of tax codes can lead to wrong calculation of taxes. The only
valid and properly tested setup of tax codes is given in this chapter. Any
other combination can lead to unexpected results.
For non taxable transactions special tax codes have to be defined on company code
level. In the properties of these tax code the field ‘Relevant to tax’ must be set to ‘2’:
Tax code IE
Input: Tax exempt transactions
Tax code SE
Page 67
SAP R/3
GUIA DE IMPLEMENTAÇÃO
For each of the industrialization tax codes the field ‘Usage’ of the brazilian tax code
enhancements to be set to ‘Industrialization’.
Tax code I0
Input: Industrialization: No tax
Tax code I1
Input: Industrialization: ICMS only
Tax code I2
Input: Industr.: ICMS + Sub.Trib.
Tax code I3
Input: Industrialization: ICMS +
IPI
Tax type Acc. Rate Condition type
key
Base amount BASB
Level 200
IPI Industr. VS1 100,000 IPI1
ICMS Industr. VS2 100,000 ICM1
Level 300
IPI Consumption NVV 100,000 IPI2
Page 68
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Tax code I4
Input: Industr.: ICMS + Sub.Trib.
+ IPI
Tax type Acc. Rate Condition type
key
Base amount BASB
Level 200
IPI Industr. VS1 100,000 IPI1
ICMS Industr. VS2 100,000 ICM1
Sub.Tributaria VS3 100,000 ICS1
Level 300
IPI Consumption NVV 100,000 IPI2
Tax code I5
Input: Industrialization: IPI only
Page 69
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Tax code I6
Input: Ind.: ICMS+IPI: Reselling
Tax code I7
Input: Ind.: ICMS+Sub.Trib.+IPI :
Reselling
Tax type Acc. Rate Condition type
key
Base amount BASB
Level 200
ICMS Industr. VS2 100,000 ICM1
Sub.Tributaria VS3 100,000 ICS1
Level 300
IPI Consumption NVV 100,000 IPI2
For each of the industrialization tax codes the field ‘Usage’ of the brazilian tax code
enhancements to be set to ‘Consumption’.
Tax code C0
Input: Consumption: No tax
Tax code C1
Input: Consumption: ICMS + ICMS
comp.
Tax type Acc. Rate Condition type
key
Base amount BASB
Level 300
ICMS Consumption NVV 100,000 ICM2
ICMS complementar ICP 100,000 ICOP
ICMS complementar 100- ICX 100,000- ICOX
Tax code C2
Page 70
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Tax code C3
Input: Cons.: ICMS + ICMS comp.
+ IPI
Tax type Acc. Rate Condition type
key
Base amount BASB
Level 300
IPI Consumption NVV 100,000 IPI2
ICMS Consumption NVV 100,000 ICM2
ICMS complementar ICP 100,000 ICOP
ICMS complementar 100- ICX 100,000- ICOX
Tax code C4
Input: Cons.: ICMS+ICMS comp.
+IPI+S.T.
Tax type Acc. Rate Condition type
key
Base amount BASB
Level 300
IPI Consumption NVV 100,000 IPI2
ICMS Consumption NVV 100,000 ICM2
S.T. Consumption NVV 100,000 ICS2
ICMS complementar ICP 100,000 ICOP
ICMS complementar 100- ICX 100,000- ICOX
Tax code C5
Input: Consumption: IPI only
For the processing of ICMS Sub.Trib. on freight special tax codes are necessary to
support the required posting logic. Depending on the material usage of the respective
material a different tax code must be used (industrialization / consumption). The
calculation and posting of the tax is the same for both tax codes:
Page 71
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Tax code IF
Input: Ind.: ICMS (S.T. on freight)
Tax code CF
Input: Consump.: ICMS (S.T. on
freight)
Tax type Acc. Rate Condition type
key
Base amount BASB
Level 200
ICMS Industr. VS2 100,000 ICM1
ICMS S.T. freight offset IC1 100,000 ICMF
Page 72
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Tax code K0
Future Delivery purchasing G/R
Tax code K1
Future Delivery purchasing I/R
Tax code K5
Consignment - Shipment G/R
Tax code K6
Consignment - Invoice I/R
4.1.4.6 Tax codes for incoming movements - Services - ISS and INSS
For the incoming services tax code the field ‘Service’ of the brazilian tax code
enhancements has to be marked.
Page 73
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Tax code I9
Input: ISS
For INSS the tax code must contain the proper tax rate (here: 15% INSS)
Tax code IN
INSS 15%
For each of these tax codes the field ‘Usage’ of the brazilian tax code enhancements
to be set to ‘Industrialization’ as a default. In SD the usage of the product by the
customer is always taken from the Brazil specific SD tax code in the sales order item.
Tax code SD
Output-SD tax: IPI/ICMS/Sub.Trib.
Tax code SZ
Output-SD tax: ICMS Zona Franca
Page 74
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Tax code S0
Output-SD tax: No tax
For the outgoing services tax code the field ‘Service’ of the brazilian tax code
enhancements has to be marked.
Tax code SI
Output-SD tax: ISS
For the MM-IM transfer postings the following tax codes can be used for outgoing
movements. For incoming movements the normal codes ‘Ix’ and ‘Cx’ can be used.
Tax code A0
Output: Industrialization: No tax
Tax code A1
Output: Industrialization: ICMS
Page 75
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Tax code A3
Output: Industrialization: ICMS +
IPI
Tax type Acc. Rate Condition type
key
Base amount BASB
Level 500
IPI from SD MW1 100,00 IPI3
ICMS from SD MV2 100,00 ICM3
Tax code B0
Output: Consumption: No tax
In the external interface the ship-from and ship-to processing is implemented using
tax jurisdiction codes according to the structure defined in table ‘TTXD’. Tax
jurisdictions are available in the following master files
• vendor
• customer
• plant
• cost center
The maintenance of the tax jurisdictions is done by automatic determination from the
respective address in the master file. The trigger to start the automatic determination
is the country which is entered in the address (using tables TTXD and TTXC).
The tax jurisdiction for Brazil is a one level jurisdiction which consists of a 3 digit ‘Tax
region’. ‘Tax region’ is the entity used for the maintenance of ship-from / ship-to
dependent tax rate tables.
The determination of ‘Tax region’ is done by the standard ‘Region’ maintained in the
address of the master files. Each ‘Region’ can have one or more ‘Tax regions’. If a
‘Region’ has just one ‘Tax region’ the system automatically assigns a ‘Tax region’. If a
‘Region’ has more than one ‘Tax region’ the user has to choose one from a list.
Page 76
SAP R/3
GUIA DE IMPLEMENTAÇÃO
If a the system cannot find a ‘Tax region’ for a ‘Region’, the jurisdiction code cannot
be determined and the system issues a message during the master file maintenance.
The be sure that a jurisdiction code exists in all cases the ‘Tax region’ table has to be
maintained correctly.
In the screen layout for the master file maintenance the field ‘Region’ should be a
mandatory field.
Page 77
SAP R/3
GUIA DE IMPLEMENTAÇÃO
In Brazilian tax calculation, tax rates are partly dependent on the ship-from and ship-
to region of goods (e.g. ICMS rates). Within Brazil, the ship-from and ship-to region is
implemented as a tax jurisdiction code in the customer, vendor, and plant master
data.
The jurisdiction code/tax region is automatically derived from the geographical region
when creating new master data for Brazilian customers/vendors/plants.
If master data for foreign customers/vendors is created, the jurisdiction code is not
automatically determined via Brazilian functions. Furthermore, there might be even a
different use of this code by other countries.
According to the requirements it is possible to define and assign special tax regions
for any country which is not Brazil. With this functionality it is also possible to group
countries together so that they use the same special tax region.
On the company code level for Brazilian company code the flags
For each plant in country ‘BR’ the tax jurisdiction has to be assigned properly. The
assignment is done in the material management customizing ‘Define tax jurisdiction’;
transaction ‘OMGJ’; table T001W maintained with view ‘V_001W_JD’.
Page 78
SAP R/3
GUIA DE IMPLEMENTAÇÃO
In the SD the external tax calculation is done within the ‘normal’ pricing procedure. To
get the connection to FI the tax-conditions must have the same name as the
according conditions in FI. Additionally there is a kind of ‘lead’-condition necessary to
call the external tax calculation.
For more details check the example pricing procedures RVXBRn (n= 1,2,A,E,F,K,L)
The condition types used in SD have to be defined in the same way as in FI but
without access sequence. The only exception is the ‘lead’ condition which triggers the
external calculation function. There is no equivalent condition in the FI procedure.
Fields in the condition definition not mentioned in the following table are initial / not
marked.
Page 79
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Additional condition which are defined for the Brazil pricing procedure are:
The access sequence defines how the tax codes are determined for the FI posting.
The access sequence ‘IBRX’ is defined as follows:
For the special ICMS treatment the access sequence is used to create the additional FI
postings .The access sequence ‘IBBR’ is defined as follows:
The account keys are used to determine how the tax amounts are posted in FI.
Page 80
SAP R/3
GUIA DE IMPLEMENTAÇÃO
After creating the conditions and the access sequence, the tax category by country
has to be maintained. IMG: Define tax determination rules -> Control: tax types per
country; Transaction ‘OVK1’, table ’TSTL’ maintained with view ‘V_TSTL’.
The allocations of delivering plants should not be done in SD. The maintenance of the
plant table ‘T001W’ should only be done from the MM-side because only there the
necessary determination of the tax jurisdiction is implemented in a proper way.
Maintaining the region code for a plant using the SD customizing transaction ‘OVK6’
(view ‘V_T001W_RE’ can lead to unexpected wrong results in the tax calculation.
To determine a tax code (for the transfer to FI), tax classifications assigned to the
customer and the material are used.
Note: In the customer and material master data the tax classifications have to be
maintained. Otherwise the system cannot determine a proper tax code in the
pricing procedure.
Page 81
SAP R/3
GUIA DE IMPLEMENTAÇÃO
According to the access sequence brazilian taxes in SD, tax rates and tax codes have
to be maintained.
Additionally there is the need to decide per sales order line item which taxes
(IPI/ICMS/Sub.Trib./ISS) are calculated for this item and which not.
In MM these informations are delivered by the tax code which is entered per line item.
In SD the tax code is determined automatically depending on the customer and the
material. A manual choice like in MM is not possible.
To fulfill the brazilian requirements a new input field for an so called ‘SD tax code’ is
added to the sales order line item. This SD tax code defines two things:
The definition of the SD tax code is done independent of the standard tax codes.
Page 82
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Contents of this chapter is the description how the external calculation is done and
how the processing can be implemented in SAP R/3.
For IPI:
For ICMS:
Page 83
SAP R/3
GUIA DE IMPLEMENTAÇÃO
in MM
State of destination (tax Tax jurisdiction code (tax region) Determines ‘ship-to region’ for the region
region) of receiving plant in MM or the dependent ICMS rate definitions
customer in SD
Customer due to pay Customer master extension (table Determines in SD (outgoing side) if ICMS
ICMS ‘KNA1’) is calculated at all.
Usage of the goods In MM: different tax codes in In MM: Determines how the tax is
purchase order or invoice calculated and how the FI posting is done
verification (separate line items for tax or tax value
In SD: different SD-tax codes in added to material value)
sales order In SD: Determines how the tax is
calculated
For ISS:
Page 84
SAP R/3
GUIA DE IMPLEMENTAÇÃO
ISS calculation In MM: tax code enhancement Determination if ISS is processed instead
In SD: special SD tax code and of ICMS and IPI
material
Material - in SD Line Item Determination if ISS is charged and if yes
determination of the ISS rate
The standard interface structure for the external tax interface is a DDIC structure
named ‘COM_TAX’ which contains the following fields:
CLIENT char03 X SAP Client (note: this field might be used for
separation of audit file records, if a company uses
more than one SAP client with the external tax
interface
COMP_CODE char04 X Company code (note: this field will be filled always by
the SAP company code)
DIVISION char04 X Division Code (note: this field will be filled with the
actual SAP business area when available)
COUNTRY char03 X country key (ISO code to be expected)
DOC_NUMBER char10 X Document number of the financial or sales document
(No. of financial doc document = No. of SD billing
document), used for updating the audit file/sales tax
register
POS_NO char06 X Item number of the financial or sales document (No. of
financial doc document = No. of SD billing document),
used for updating the audit file/sales tax register
ACCNT_NO char16 X Customer (A/R) or vendor (A/P) account number
ACCNT_CLS char10 X Customer (A/R) or vendor (A/P) account class (note:
this field is currently not supported by SAP, it can be
filled in an SAP User-Exit by the customer)
TAX_DATE char08 X Date for tax calculation
TXJCD_ST char15 X Tax Jurisdiction Code of the ship-to
TXJCD_SF char15 X Tax Jurisdiction Code of the ship-from
TXJCD_POA char15 X Tax Jurisdiction Code of the point of order acceptance
(note: this field is currently not supported by SAP, it
can be filled in an SAP User-Exit by the customer)
TXJCD_POO char15 X Tax Jurisdiction Code of the point of order origin (note:
this field is currently not supported by SAP, it can be
filled in an SAP User-Exit by the customer)
TXJCD_IND char01 X X Indicates which tax jurisdiction code is used(note:
values: '1' = ST, '2' = SF, '3' = POA, '4' = POO; this
field is currently not supported by SAP, it can be filled
in an SAP User-Exit by the customer)
PTP_IND char01 X Indicates which Jurisdiction is the Point of Title
Passage(note: values: '0' = ST, '1' = SF; this field is
currently not supported by SAP, it can be filled in an
User-Exit by the customer)
APAR_IND char01 X Indicates, whether the actual transaction is an
accounts payable or an accounts receivable
transaction. The value is filled from SAP T007A;
Page 85
SAP R/3
GUIA DE IMPLEMENTAÇÃO
Page 86
SAP R/3
GUIA DE IMPLEMENTAÇÃO
TAXAMT0 char15 X X Federal tax amount (note: currently not used by SAP)
TAXAMT1 char15 X X State tax amount
TAXAMT2 char15 X X County tax amount
TAXAMT3 char15 X X City/local tax amount
TAXAMT4 char15 X X District/secondary county tax amount
TAXAMT5 char15 X X Secondary city tax amount
TAXAMT6 char15 X X Other tax amount
TAXAMT7 char15 X X Other tax amount
TAXAMT8 char15 X X Other tax amount
TAXAMT9 char15 X X Other tax amount
TAXBAS0 char15 X X Federal tax base amount (note: Within SAP only used
for display purposes; currently not used by SAP; only
to be filled if different from AMOUNT field)
TAXBAS1 char15 X X State tax base amount (note: Within SAP only used for
display purposes; only to be filled if different from
AMOUNT field)
TAXBAS2 char15 X X County tax base amount (note: Within SAP only used
for display purposes; only to be filled if different from
AMOUNT field)
TAXBAS3 char15 X X City/local tax base amount (note: Within SAP only used
for display purposes; only to be filled if different from
AMOUNT field)
TAXBAS4 char15 X X District/secondary county base amount (note: Within
SAP only used for display purposes; only to be filled if
different from AMOUNT field)
TAXBAS5 char15 X X Secondary city tax base amount (note: Within SAP
only used for display ; only to be filled if different from
AMOUNT field)
TAXBAS6 char15 X X Other tax base amount (note: Within SAP only used for
display purposes; only to be filled if different from
AMOUNT field)
TAXBAS7 char15 X X Other tax base amount (note: Within SAP only used for
display purposes; currently not used by SAP; only to be
filled if different from AMOUNT field)
TAXBAS8 char15 X X Other tax base amount (note: Within SAP only used for
display purposes; currently not used by SAP; only to be
filled if different from AMOUNT field)
TAXBAS9 char15 X X Other tax base amount (note: Within SAP only used for
display purposes; currently not used by SAP; only to be
filled if different from AMOUNT field)
EXMATFLG char02 X Product exemption flag (note: only output parameter,
indicates material exemption reason, currently not used
by SAP)
Page 87
SAP R/3
GUIA DE IMPLEMENTAÇÃO
For the calculation the following input parameters of COM_TAX are used:
Page 88
SAP R/3
GUIA DE IMPLEMENTAÇÃO
The transfer of other input parameter for the tax calculation is done by a modification
which transfers all information from ‘FV64A300’ to the external tax calculation for
Brazil. The transfered data is:
Information from these structure is partly used because not all information is
available in COM_TAX. Used information is:
Additionally the XKOMV table is used to determine the active tax conditions in the
pricing/tax procedure.
Page 89