SAPBR Technologies home

SAP in Brazil, explained

Tax Number Duplicity Restriction (CNPJ, CPF, State Inscription)

Puzzle pieces

In Brazil, a company must not have two partners with the same CNPJ, CPF or State Inscription (IE). You can stop users from creating two customers or two vendors with the same tax ID through standard SAP configuration. Not long ago this needed custom code or a user exit.

First, the tax IDs:

  • Tax Number 1 (STCD1): CNPJ. Legal entities (companies) only.
  • Tax Number 2 (STCD2): CPF. Natural persons only.
  • Tax Number 3 (STCD3): State Inscription. Legal entities only. If exempt, it must contain the word “ISENTO”.
  • Tax Number 4 (STCD4): Municipal Inscription. Can hold the RG (ID) if the vendor is a natural person. If exempt, it must contain “ISENTO”.
  • Sole Proprietor (STKZN): natural person indicator. Must be active when the vendor is a natural person rather than a legal entity.
Illustration

To activate the duplicate check, go to transaction BUPA_TAXNUMTYPE and turn it on for the tax IDs you want validated:

Illustration

Then go to OBA5 (Change Message Control) and set the message type. You can choose warning or error, but I strongly recommend error, so users get blocked when creating the customer or vendor in XD01 or XK01. You can also set the message behavior per user.

Select area 8B and messages 011, 012, 013 and 014.

Illustration

With a user-specific entry, end users get the standard error while a user in the SAP support group, for example, only gets a warning and can bypass it.

You can also check transaction OBMSG for the same area and messages. Enter the adjustable message types in the “Allowed” column (S = success, I = information, W = warning, E = error, A = termination). An example entry is SIWE.

Illustration

With these settings in place, creating a record for a partner that already exists looks like this. The system shows the existing customer or vendor for that tax ID:

Illustration

It then issues an error or warning, depending on your configuration:

Illustration

Avoiding duplicate customers and vendors is mandatory for SPED reporting. See the taxpayer guides for SPED Fiscal (EFD) and EFD Contribuições.

Comments

Leave a Reply