Showing results for 
Search instead for 
Did you mean: 

Determine European customer by VAT reg. number [EU STCEG]

Former Member
0 Kudos


I work in international company. For one of the countries VAT procedures, in order to know which VAT code to use, I need to know if it is a european customer.

I need to determine to which country the VAT reg. number belongs. For example, I take French VAT reg. number FR12345678, cut 2 first characters, and this way I know that it belongs to FR=FRANCE.

For each country code (FR for example) I can know if it is an european by field T005-XEGLD = X.

But, I can't find the way to determine always the country - because for Greece, for example, it doesn't work this way : Greece country code is GR and it's VAT reg. number is EL12345678

Is there a functiom module or logic to determine one of the following:

1) takes VAT reg. number and determines it's country

2) takes VAT reg. number and determines if it European

Please help,


Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Yes. usually VAT number starts with ISO code. But in Greece, for example the code is EL123456, cause EL is Ellada (Greece in their language)

So I wanted to know if SAP has function that knows to translate EL1234567 as Greece VAT number. Probably there is no such function and we are going to develop one.

Former Member
0 Kudos

As I wrote, I know how to determine if specific country is Eoropean.

I don't know how to determine from VAT reg. number EL1234567 that it is Greece VAT reg. number.

If I find the connection EL---> GREECE, so I know that Greece is European from countries set up.

But how can I know that EL1234567 reg. number belongs to Greece.

Former Member
0 Kudos

Hello Janna,

VAT reg. numbers are always of the format : <ISO code><number>

From the ISO code, you will always get to know as the VAT number belongs to which country.


ES10000000Z -> ISO code ES belongs to Spain

IT09417760155 -> ISO code IT belongs to Italy.

This format is as per the legal requirement that VAT must always start with ISO code.

Hope this answer is helpful,



Former Member
0 Kudos

For determining whether its a European country, there is a customizing provided. In transaction OY07, you can enter a country and on details/overview screen you will get a check box to mark that country as European.

Former Member
0 Kudos

For checking the VAT reg. number, you can use the function module EU_TAX_NUMBER_CHECK. We use this function module to check the format and validation rule of a particular number.

Also along with this, you will have to maintain few customizings in table V_TFKTAXNUMTYPEC and in transaction OY17 for that particular country.

Former Member
0 Kudos

Apparently, as I was told this logic of 2 first characters, works for European countries besides Greece and Makedonia.

In SAP this logic is also hard coded.

Can see EU_TAX_NUMBER_CHECK - when reading this function code, to check VAT code SAP writes specificly for Greece, for example that it is EL!

So, I guess I need to do the same logic in my program.