Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
Showing results for 
Search instead for 
Did you mean: 
Former Member
Introduction: VAT registration as SAP defines it is: "As part of the process of establishing the European Single Market, the tax authorities in each EU member state assign VAT registration numbers to companies. All companies that are entitled to deduct input tax can receive a VAT registration number.

A VAT registration number is alphanumeric and consists of up to 15 characters. The first two letters indicate the respective member state, for example DE for Germany or ES for Spain.

The VAT registration number is designed to specify the tax processing involved in certain transactions and to allow the financial authorities to monitor the application of the new regulation.

For this reason, the VAT registration number of the company code and that of the customer must be specified on invoices for tax-exempt deliveries and other goods and services within the European Union. The VAT registration number is thus part of the control procedure that has replaced the former border controls (EC sales list).

You can define VAT registration numbers in the system for every customer, company code, and vendor."


In SAP  for customer ,vendor, company master data VAT registration number plays a very important role. Hence its accuracy matter for a successful business process. Normally business user or master data team physically validate this VAT registration number from  EU's official VIES  website []



This manual VAT registration number validation process can be automated and reduce the physical involvement of business user to verify the VAT registration number from  EU's official VIES website . Some time its really cumbersome exercise for  them  when they need to validate for high volume of data uploaded from interface.

Technically this validation process can be automated directly with an interface  from SAP to European Commission’s VIES application.


In SAP its possible to build an ABAP application consuming the SOAP services offered by European Commission’s VIES  website.


Business Benefits:

  • Accurate VAT registration number for customer, vendor

  • Quality master data

  • Error free business transaction

  • No manual effort required for validation

  • No human error

To automate this VAT registration number validation process  we need to develop proxy based interface. This proxy interface will consume the  SOAP services officered by European Commission VIES website.  The required WSDL file to generate the proxy can be obtained form the below URL:


This proxy method can be invoked in several ABAP application like : Customer Exit for individual validation , Report  for mass validation.

STEP-BY-STEP  Process:

How to create ABAP proxy for VAT registration number validation?

Step 1: Go to SE80 provide your package.

Note: For POC purpose we have used local package ($tmp). In project appropriate package to be selected.

Step 2: Select ‘Service Consumer’ and click on Cont.

Step 3: Here we are using a WSDL file available in European Commission website. Select third radio button and click on Cont.

Step 4: Select 1st radio button and click on Cont.

Step 5: Specify the WSDL file created from the URL provided European Commission website.

Step 6: Specify the package and prefix. Prefix is just identifier for the ABAP objects created through wizard. Click on Cont.


Step 7: Now we can see proxy class is generated.


Step 8: Activate all the generated objects.

Step 9: We can see following two methods ‘checkVat’ and ‘checkVatApprox’ created for the proxy class.

Now we should be able to use these methods in our custom application for validating VAT registration number.


How to create logical port for validating VAT registration number?

Step 1: Go to transaction ‘SOAMANAGER’.

Step 2: Select 4th option ‘Web Service Configuration’

Step 3: Enter object name ‘checkVatPortType’. Created at the time of proxy generation.

Step 4: Click on option ‘Create’ and select WSDL Based Configuration

Step 5: Enter logical port name and description.

Step 6: Select 2nd radio button via file. Upload the WSDL file created from the URL provided in European Commission website.



Step 7: Now binding get created. Click on next.

Step 8:  No user name and password required here. Click on next.


Step 9: Following data automatically gets populated from WSDL file. Click on next.

Step 10: Click on next.

Step 11: Click on next.


Step 12: Click on next.


Step 13: Now you can see the logical port is created.

Step 14: Select ping function and you can see communication is successful and connection established with European Commission website.


Demo Application:


Below is an example of simple application of custom report which validate customer Vat registration number.

We can provide the list of customer for which vat registration number to be validated.


Sample Code:


DATA(gv_proxy ) = ‘ZVATVALCHK’. “ Logical port name
DATA(lo_vat_chk) =
NEW zvtco_check_vat_port_type( logical_port_name = gv_proxy ).


***We can use the proxy method ‘check_vat‘ to validate the VAT number.


******* Checks the PROXY output
check_vat_request = VALUE zvtcheck_vat_request(
country_code = <lfs_data>-stceg(2)
vat_number = <lfs_data>-stceg+2
check_vat_response = DATA(ls_response)

CATCH cx_ai_system_fault INTO DATA(lo_exc_syst_fault).
" Internal Error
<lfs_data>-statu = text-008.
" VAT not maintained in Customer Master
<lfs_data>-icon = icon_yellow_light.


CATCH cx_ai_system_fault.
MESSAGE e000(ckmlwip) INTO DATA(lv_error_msg) ##NEEDED.
" Internal Error. Contact your System administrators!
textid = VALUE scx_t100key(
msgid = sy-msgid
msgno = sy-msgno


Labels in this area