Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Validating Email Address

Former Member
0 Likes
5,829

Hi,

I want to validate a email address which is present in a Char variable. I want to check whether it is in accurate format or not. Please suggest me some function module or code which can do this job for me.

Please Help me out.

Thank You in Advance.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
874

Hi,

Try with FM <b>SX_INTERNET_ADDRESS_TO_NORMAL</b> to validate the email address.

<b>TYP ADDRESS

INT vijay@yahoo.com</b>

Now run the FM and see...

Regards

vijay

3 REPLIES 3
Read only

Former Member
0 Likes
874

Hi Eswar,

I think there is no such FM available to validate email address. If it is email id linked with SAP user id then u can get it USR* tables and can validate or if it is a external mail id then try like this.

1.Pass the mail id to a string.

2.check for the @ if exists,

3.go on check for dot'.'

4.if succeed split at this and get the domain into another variable .

5.maintain a internal table with valid domains like com ,net,biz,tv and check the variable of step 4 with this.

Like thie you can build logic around this.

Regards,

Raghav

Read only

former_member480923
Active Contributor
0 Likes
874

Hi

If you want to validate if the email ID is maintaine din SAP or not then try this FM

ISA_CONTACT_PERSON_FROM_EMAIL

Hope This Helps

Anirban

Read only

Former Member
0 Likes
875

Hi,

Try with FM <b>SX_INTERNET_ADDRESS_TO_NORMAL</b> to validate the email address.

<b>TYP ADDRESS

INT vijay@yahoo.com</b>

Now run the FM and see...

Regards

vijay