Skip to Content
avatar image
Former Member

How to enable TAX NUMBER 3 State Inscription to check duplications

Hello everybody,

Please I need assistance with the situation bellow:

In transaction XK01 I must to enable a verification to check the fields

  1. Tax Number 1 (STCD1) – CNPJ
  2. Tax Number 3 (STCD3) – State Inscription

I already know there is way to active using the transactions BUPA_TAXNUMTYPE, OBA5 and OBMSG.

HOWEVER in Brazil we have a special situation, sometime I could have two or more companies that uses the same CNPJ ( Tax Number 1), but the State Inscription

( Tax Number 3) always needs to be different.

Then I must check if CNPJ ( Tax Number 1 ) is duplicate, but when it will happen the SAP just show a warning message, on the other hand when SAP will check the field State Inscription ( Tax Number 3) SAP needs to show an error message avoiding to continue the processes.

I'll really appreciate any answer.

Thanks in advance

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Dec 13, 2016 at 02:20 PM


    You can activate the duplicity check for State Inscription and show it as an error and set the CNPJ to be shown as a warning. See below that the Tax Number 3 is available for check:

    To activate the duplicity check, first go to transaction BUPA_TAXNUMTYPE and turn on the Tax ID’s that you want the validation active:


    Then go to transaction OBA5 (Change Message Control) to turn the error message on (you can choose between Warning or Error, but it is strongly recommended that you select as an Error when user goes to XK01 or XD01 for example, to create the customer or vendor). You can also select the message behavior based on an user.

    You have to select area 8B and message No. 011, 012, 013, 014

    If you enter a specific user, for instance, end users receive the standard error message but a user in the SAP Support group only receives a warning and is able to by pass the error.

    You may also check transaction OBMSG to the same area 8B and messages and do the following:

    Enter the adjustable message types in the “Allowed” column (“S” = success message, “I” = Information message, “W” = warning message, “E” = error message, “A” = termination message; an example entry could be SIWE).


    Once those settings are in place, when someone try to create a record for a partner that already exist, it will look like this:

    When you try to create the register, the system will show that a customer/vendor already exist to a given Tax ID:
    Vendor validation

    And then it will issue a message, error or warning, depending on what was configured:
    Vendor validation 2

    Leandro da Pia Nascimento

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 14, 2016 at 11:55 AM

    Hi Leandro,

    Thanks for your answer, however I already did that configuration my problem is: In Brazil you may have two companies that use the same CNPJ but with state inscription different, then I need find out a way to check the field CNPJ for duplication but only showing an alert message on the other hand the field TAX NUMBER 3 State Inscription must check duplication and show me an error message and this way stopping the process.

    Thanks in advance

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 14, 2016 at 02:08 PM

    If this is legal requirement then try to find OSS note for your case.

    If customer-specific then do some ABAP in BTE 00003050 Country-Specific Tax Number Check

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 15, 2016 at 12:01 PM

    Thanks Anton,

    I'll try does an exit in BTE as you mentioned.

    All my best

    Add comment
    10|10000 characters needed characters exceeded