Two ways to Check if email is valid in ABAP : Function Vs Regex

Check if email is valid is a common business requirement for input email address field.

Email is structural list

Email Regular Expression (Regex)

General Email Regex

Up to RFC 5322 Official Standard, which defines the Standard of email address, the Regex must be


Regex in ABAP

The most used Regular Expression in ABAP for email address is:


Regex in Javascript

For Javascript, the regular expression is, hopefully, shorter 🙂


Email Regex for other languages

In this link, find the long list of Email Regular Expression for others common languages:
Python, Swift, PHP, Perl / Ruby, Ruby , .NET.

Check if email is Valid

Check if email is valid for input Field SAP

For the input field, make sure you define the email address field based on the data element AD_SMTPADR.
SAP will handle the validation of the email automatically.

The Domain of data element AD_SMTPADR is name also AD_SMTPADR.


The Domain AD_SMTPADR has 2 Conversion routines:

Check if email is valid in ABAP with Function

In ABAP, the validity of the email address can be check with the standard function
PS: This function is called in the conversion routine of AD_SMTPADR (CONVERSION_EXIT_SXIDN_INPUT).

The type of Address is ‘INT’ for Address email.

Check if email is valid in ABAP with Regex

The Regular expression for email to be used in ABAP is

The Class CL_ABAP_MATCHER provides methods to create regular expression and do match check.