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

Validate External Email

Former Member
0 Likes
4,988

Hi Guys

My requirement is to validate external Email address user@abc.com. I want to validate on “@” and on “<b>.</b>” . Is there any FM to validate External email. I tried FM “SX_INTERNET_ADDRESS_TO_NORMAL” . Is it Ok or Suggest me any other FM . Or through coding how can we do this.

Waiting for reply

Thanks and regards

Naval

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,381

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

also chk this:

SX_INTERNET_ADDRESS_TO_NORMAL

regards,

keerthi

10 REPLIES 10
Read only

Former Member
0 Likes
1,381

Hi,

Please refer this thread :

Best regards,

Prashant

Read only

Former Member
0 Likes
1,381

I think the fm you are using is correct .

Check these threads:

Regards,

ravi

Read only

Former Member
0 Likes
1,381

Hi,

You can try that FM <b>SX_INTERNET_ADDRESS_TO_NORMAL</b>

Pass address type as INT ,

Regards

vijay

Read only

Former Member
0 Likes
1,381

Check this thread out

Regards,

Santosh

Read only

Former Member
0 Likes
1,381

It depends on how you wish to do the valdation ...using the fm SX_INTERNET_ADDRESS_TO_NORMAL, it would give you the local and domain names.

Surely if you wish to carry out further validations on the particular variables...you can SPLIT the same using '.' and do the neccessary validation.

Regards

Anurag

Read only

0 Likes
1,381

Hi everybody

This did not resolve my problem .FM SX_INTERNET_ADDRESS_TO_NORMAL checks for '@' . IT FAILS IF WE GIVE 2 @'S I.E. ABC@@XYZ.COM. iT ALSO DIDN'T CHECK FOR '.' DOT.

Read only

Former Member
0 Likes
1,382

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

also chk this:

SX_INTERNET_ADDRESS_TO_NORMAL

regards,

keerthi

Read only

0 Likes
1,381

Hi everybody

This did not resolve my problem .FM SX_INTERNET_ADDRESS_TO_NORMAL checks for '@' . IT FAILS IF WE GIVE 2 @'S I.E. ABC@@XYZ.COM. iT ALSO DIDN'T CHECK FOR '.' DOT.

Read only

0 Likes
1,381

My suggestion for the same would be to use the below logic---

llen = strlen( lemail ).

do llen times.

lchr = lemail(1).

case lchr

when '@'.

lasterix = lasterix + 1.

when '.'

ldot = ldot + 1.

when others.

*checking for any wierd char apart from alphanumeric.

if lchr na sy-abcde and lchr na '0123456789'.

lerror = 'Y'.

exit.

endif.

endcase.

shift lemail.

enddo.

if ldot ne 2 or lasterix ne 1.

lerror = 'Y'.

endif.

--> lerror = 'Y' is Error

Regards

Anurag

Read only

0 Likes
1,381

This message was moderated.