2006 Aug 21 10:32 AM
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
2006 Aug 21 10:56 AM
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
2006 Aug 21 10:37 AM
2006 Aug 21 10:42 AM
2006 Aug 21 10:42 AM
Hi,
You can try that FM <b>SX_INTERNET_ADDRESS_TO_NORMAL</b>
Pass address type as INT ,
Regards
vijay
2006 Aug 21 10:50 AM
2006 Aug 21 10:51 AM
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
2006 Aug 21 11:34 AM
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.
2006 Aug 21 10:56 AM
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
2006 Aug 21 11:34 AM
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.
2006 Aug 21 11:48 AM
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
2016 Sep 05 6:46 AM