Last week one comment in this blog motivated me to write this posting…
The question was around the Jurisdiction Code, aka Tax Jurisdiction, and to be more specific, the combination of Postal Codes and Jurisdiction Codes, that are MANDATORY for all Customers and Vendors (Branches as well) where a Nota Fiscal will be issued/received in Brazil. This code is used for calculating taxes which are defined by the federal level (Brazilian taxes).
The Jurisdiction Code is in the Address data of the Partners. In Brazil, they represent each City/Municipal entity existing (over 5000 cities…)
The steps to have this field correctly (and automatic) assigned to the partner master records are the following:
1 – Maintain Regions – The regions supposed to be standard delivered when the Country Version BR is activated, if not, maintain the Regions using the following customizing path:
SAP Customizing Implementation Guide > SAP NetWeaver > General Settings > Set Countries > Insert Regions (table/view V_T005S)
Currently there are only 27 regions, as below:
2 – Define Brazilian Tax Regions – Here you will maintain tax regions for Brazil assigning a geographical region to each tax region and this is what the system will use to determine the tax regions automatically when maintaining master records for customers, vendors, plants and etc. You can assign a geographical region to more than one tax region (very useful for Free Trade Zone). Use the following customizing path to maintain the entries:
SAP Customizing Implementation Guide > Financial Accounting (New) > Financial Accounting Global Settings (New) > Tax on Sales/Purchases > Basic Settings > Brazil > Define Brazilian Tax Regions and Assign to Geograph. Regions (table/view J_1BTREGV)
3 – Maintain the Structure for Tax Jurisdiction Code – Here you determine the structure of the tax jurisdiction code.
The Jurisdiction Code has 2 levels:
Level 1 with 3 characters: store the Legal Region
Level 3 with 7 characters: store a code which identify the municipality inside the Legal Region
The correct length is 3 and 7 because the SPED FISCAL will capture 10 digits with the following structure:
SP 3550308 – São Paulo
“SP” = Region / State (Attention: it is SP and space)
35 = SP State code according to IBGE
50308 = São Paulo City (Município de São Paulo).
You maintain this structure at the following customizing path:
SAP Customizing Implementation Guide > Financial Accounting (New) > Financial Accounting Global Settings (New) > Tax on Sales/Purchases > Basic Settings > Specify Structure for Tax Jurisdiction Code (table/view V_TTXD)
Add the following entry: Scheme: TAXBRA Length 1: 3 Length 2: 7 Length 3: Leave it empty Length 4: Leave it empty Taxes line by line: X
4 – Activate External Tax Calculation – Here you will activate the access to the external tax system depending on the tax calculation procedure. You link the used procedure to the external events. Additionally you may choose whether you want the system to automatically re-determine wrong jurisdiction codes or if an error message should be output when the chosen jurisdiction code doesn’t match the address data. For the first behavior, turn on the flag TC. Otherwise, set it off.
Use the following Path to this maintenance:
SAP Customizing Implementation Guide > Financial Accounting (New) > Financial Accounting Global Settings (New) > Tax on Sales/Purchases > Basic Settings > External Tax Calculation > Activate External Tax Calculation (table/view V_TXD_E)
You’ll need to create the following entry:
Scheme: TAXBRA External system: C All other fields: Leave it empty
5 – Define Logical Destination – The logical destination is used for Jurisdiction Code auto-determination and for classic tax calculation (TAXBRJ). So, if you are using TAXBRA, only the entry for event “JUR” is needed. The defined functions are called automatically according to the event. E.g. when creating a vendor master record, after filling in the region and postal code, J_1BTAXJUR_DETERMINE_NEW will be called to automatically determine the right Jurisdiction Code.
You do the maintenance using the following path:
SAP Customizing Implementation Guide > Financial Accounting (New) > Financial Accounting Global Settings (New) > Tax on Sales/Purchases > Basic Settings > External Tax Calculation > Define Logical Destination (table/view TTXC)
You will need to create the following entries for the external system C:
Event: JUR
Function module: J_1BTAXJUR_DETERMINE_NEW
RFC destination: Leave it empty
6 – Define Tax Jurisdiction Codes – The tax jurisdiction code in Brazil consists of two parts: the state code and the city code (municipal). It is a code used for determining tax rates in Brazil; it controls which tax authorities must be paid for a given transaction. The system additionally requires the second part of the tax jurisdiction code, the municipal code, to calculate ISS and for SPED reporting. For ICMS and SubTrib calculation, the tax region is enough.
You maintain the registers using the following customizing path:
SAP Customizing Implementation Guide > Financial Accounting (New) > Financial Accounting Global Settings (New) > Tax on Sales/Purchases > Basic Settings > Brazil > Define Tax Jurisdiction Codes (table/view J_1BTXJURV)
Currently, there are more than 5000 entries where each entry represents one city/municipal, and if the business can’t provide you a list, you may want email-me on my gmail accountƒ and I will provide you this list.
You can also get it from IBGE and CORREIOS websites, but if you want it free, the information is not that easy, you will have to work on the registers individually. They also sell those registers in one file/database, but to be honest, you don’t need to pay for that…
Enter all required tax jurisdiction codes in this table according to the example below:
7 – Assign Jurisdiction Codes to Ranges of Postal Codes – Each geographical region can include a number of tax jurisdictions, which, in turn, are defined by its postal codes. Here you will assign a range of postal codes to each tax jurisdiction code. For each tax jurisdiction codes, assign the geographical region and the beginning and ending postal codes. When you maintain Brazilian address data (in master records or transaction data) and enter the postal code and geographical region, the system automatically assigns the correct tax jurisdiction code
Assign the formerly created tax jurisdiction codes to the ranges on postal codes using the following Path:
SAP Customizing Implementation Guide > Financial Accounting (New) > Financial Accounting Global Settings (New) > Tax on Sales/Purchases > Basic Settings > Brazil > Assign Postal Codes to Tax Jurisdiction Codes (table/view J_1BTREG_CITYV)
If the business person can’t provide you a list with a fairly updated assignment combination, email me at my gmail or leave a comment in here and I can provide you a list that you can use to mass upload those entries.
One other information that you need to know about that is that the combination changes, but not very often… Sometimes there are new streets or new neighborhoods been opened/created and that requires expanding the range of Postal Codes to a given City (Municipal), and all that you have to do it is update the existing entry.
I would not be worried about track those changes, you will know when something is wrong when someone try to create a register and the jurisdiction code fails been assigned. That will mean the Postal Code Range assigned to the Jurisdiction code is not updated. Then, all that you have to do, is request to the business, to go to “CORREIOS”* website and review the correct postal code range to that city.
*CORREIOS is the postal code institution ruled by Brazilian Government (Similar to USPS in USA).
If you still want to buy it the “official” source for that is in shopping.correios.com.br
There you can look for “Base de CEP” but try to download a sample before buying it to see if the format and content meets your needs.
If not clear, please, contact me, but, no more headaches on this subject, right?
Copyright Notice: © Leandro da Pia Nascimento and SAPBR.COM (SAP BRAZIL) WordPress Blog, 2013 to 2015. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Leandro da Pia Nascimento and SAPBR.COM with appropriate and specific direction to the original content.
Hi Leandropia, Your article is quite useful. Thanks for sharing this information.
I also need to update the Table T7BRCITY in SAP, Can you plz provide me the complete list of all the Muncipalities with their Jurs codes and postal code ranges so that I can use the same for my uploads?
Looking for your support!
Thanks,
Sonia
LikeLike
Oi Leandro Boa tarde
Muito bom seu blog obrigado pelas dicas.
Tem sido muito util a leitura dos topicos muito bem organizados.
Vc poderia me fornecer o arquivo de relacionamento zipcodes x tax jurisdiction codes
A versão que o cliente forneceu esta inconsistente.
Grato Daniel
LikeLike
Oi Daniel! Obrigado por vir visitar o blog 🙂 Eu mandei os arquivos no seu gmail. Abs
LikeLike
Sir , Your Blog on SAP customizing on Brazil is really great and am almost visiting every day. Can i request you to send me the Postal codes and tax jurisdiction that you had mentioned on the blog above. I would like to get the Brazilian postal codes and tax jurisdiction codes
LikeLiked by 1 person
Oi Leandro,
I need also a list for current tax jurisdictions linked to postal codes in BR. Can you pls. send it to wotan77 at gmail?
LikeLike
Hi Leandro,
Please, could you send me the file with the Brazilian postal code?
Thak you in advance.
Best regards.
Augusto
LikeLike
Hi Leandro,
Thanks for this really useful information.
Can you please provide me the complete list of all the Municipalities with their Jurisdiction codes and postal code ranges?
Thanks,
Jonny
LikeLike
Sure Jonny! Reach me out on my gmail (leandropia) and I will send you the files!
LikeLike
can you send the list as well? jgracesoriano@gmail.com
LikeLike
Dear Leandropia,
can you also provide the complete list of all the Municipalities with their Jurisdiction codes and postal code ranges for Brasil ? Not found any OSS Note so far for this.
Thx a lot
Guido
LikeLike
I sent them to you via email. Good Luck!
LikeLike
Dear Leandropia,
Can you also provide the complete list of all the Municipalities with their Jurisdiction codes and postal code ranges for Brazil ?
Unfortunately not found any OSS Note as others have mentioned
Thx a lot
Guido
LikeLike
pls, email me so I can send the files to you.
LikeLike
Hi Leandro,
Can you please provide me the complete list of all the Municipalities with their Jurisdiction codes and postal code ranges? I have sent you an email.
Thanks
Kali
LikeLike
we also need it. caue.dias@digicon.com.br
LikeLike
Sorry, I missed that. Do you still need it?
LikeLike
Hi Leandropia,
Just sent you the email requesting for the list of Brazil – Tax Jurisdiction Codes and the corresponding postal codes.
Thanks very much in advance.
Maini Febriyanti
LikeLike
Sorry, I missed that, do you still need it? if so, email me or provide an email address please.
LikeLike
Hello Leandropia,
Thank you very much for your explanation of the subject.
Could you please provide me the complete list of all the municipalities with their Jurisdiction code and postal code range ? Here is my email Lanaprincesse@hotmail.fr
I have a question : For some BPs I had the postal code range and region information but the tax jurisdiction is not provided automatically (i checked in the table if the postal code range existed and if a jurisdiction code was linked to. It was the case). When I change the BP manually, it seems that the change/update the BPs retrigger something so the Jurisdiction code is provided it. I don’t know what happens exactly on the system. Do you encounter this kind of issue ?
Thank you vey much for your help ! It will help me a lot 🙂
Lana
LikeLike
Lana, I sent you the files via email. The beahvior you described is odd. The 3 things I can think of are the settings in the views V_TTXD, V_TXD_E and TTXC. If you want to do a screen sharing and show me that, maybe we can troubleshoot it together.
LikeLike
Lana, I got an ündelivered mail” message to the files I sent you 😦
LikeLike
Bonjour Leandropia,
Thank you for this article, it’s very helpful.
Could you please provide the complete list of all the Municipalities with their Jurisdiction codes and postal code ranges for Brazil ?
Here is my adress email cecile-pham@outlook.com
Thank you,
LikeLike
I emailed them to you 😉
LikeLike
Thank you very much.
Additional question : do you know if a rule for a derivation of region exists ? I heard that some region could be derived from the Postal Code. Is it correct ?
LikeLike
There is if you are using EIM (DQM), but I haven’t seen on ECC. I will investigate and let you know. But for now, the Postal Code AND the Region are the 2 required information to drive the Jurisdiction Code lookup (and auto-populate it in the master records).
LikeLike
Hi leandropi, it was great blog. Currently we are facing issue while creating customer in brazil. No tax jurisdiction code are maintained, TXJCD field is picked according to the Tax region this was working but now suddenly TXJCD field is not updated and we are facing error No unique jurisdiction code could be determined. can you please help me
LikeLike
Hello Leondropia, it is a great blog. Now I am facing with customer two errors, one is No unique tax jurisdiction code could not be determined. They have not maintained any jurisdiction code but only one “01” for AM region. This error comes only when region is AM. Second is for other region TXJCD field is not updated in KNA1
LikeLike
Hi Leandro,
Thanks for this really useful information.
Can you please provide me the complete list of all the Municipalities with their Jurisdiction codes and postal code ranges?
Thanks,
Carlotta
LikeLike
Sure I can, but you will have to email me or give me an email address for that 😉
LikeLike
Here is my adress email carlygorrasi@gmail.com
LikeLike
Hello Leandropia!
Could you please share to me the list of Jurisdiction codes and postal code ranges?
Thank you verymuch! mariahjimenez@outlook.com
LikeLike
Hey Leandropia! Thank you very much for your awesome blog. May you please share the list of Jurisdiction codes and postal code ranges with me? Would help me a lot. Thank you very much! rialitaet@gmail.com
LikeLike
Oi Leando
nos nos temos toda essa configuracao no sistema e ate agora nao tivemos problemas em criar clients Brasileiros aqui no UK, mas de repente comecamos a ter este problema: “Error in length of tax jurisdiction SP” .
Sabe se houve alteracao recente na legislacao?
Obrigada
Olga
LikeLike
Dear Leandropia,
can you also provide to me the complete list of all the Municipalities with their Jurisdiction codes and postal code ranges for Brazil?
Thx a lot,
Michele mi.sta328@gmail.com
LikeLike
Hello Leandropia,
can you also provide to me the complete list of all the Municipalities with their Jurisdiction codes and postal code ranges for Brazil?
Thank so much!!!
Javier: jjrrmm1974@gmail.com
LikeLike
Done
LikeLike
Hello Leandropia !!
can you also provide to me the complete list of all the Municipalities with their Jurisdiction codes and postal code ranges for Brazil?
Thanks so much!!!!
Javier: jjrrmm1974@gmail.com
LikeLike
Done.
LikeLike
Thank you very much Leandro !!!
LikeLike
Hello Leandropia !!
can you also provide to me the complete list of all the Municipalities with their Jurisdiction codes and postal code ranges for Brazil?
kovurukarthik@gmail.com
Thanks so much!!!!
LikeLike
Hi Leandropia,
If feasible, could you please send me the complete list of CEP + CEP ranges per city + IBGE codes for cities in Brazil?
LikeLike
You will have to email me 🙂
LikeLike
Hi Leandropia – We currently need to expand a range of postal codes for a particular jurisdiction code. You indicated if that happens, to just change the existing range. That is not possible even while in change mode. Should I copy existing entry, modify the range and delete the old range? Please confirm.
LikeLike
Kim, you will have to delete the existing range, “save”, create the new range, and then transport it.
LikeLike
Hello LEANDROPIA, could you also Email the list with the jurisdiction codes?
LikeLike