Input validation: I need your help to solve a problem with two special input fields.
The first one is an input field where the user enters an email address. I would like to check the format "*@*.*"
The second one is an entry field for the VAT number. There is an SAP standard function module that checks the VAT number format, depending on the country. How can I call this function?

For the email address format validation you can use the "pattern" option of the "Set" command:

Set V[x1] "&V[email]" pattern="_%@_%._%"

if not Q[ok]

  Message "E: Invalid email address &V[email]" -statusline

endif

Explanation: in the given pattern the _ symbol stands for a single character and the % symbol for an arbitray string (can be empty).

For the tax number format check you can call an SAP function module, e.g.

Call "EU_TAX_NUMBER_CHECK" -try in.COUNTRY="&V[country]" in.EU_TAX_NUMBER="&V[taxno]"

if not Q[ok]

   Message "E: Invalid tax naumber" -statusline

endif

Here we use the -try option, since the function module returns an exception if the given tax number is not valid. A message text is not returned by this function module; you would need to write your own function module that calls "EU_TAX_NUMBER_CHECK" in order to get the message text in ABAP system fields.