12-23-2008 10:59 AM
Dear all,
Is there any Function module to validate the e-mail id parameter which I'm having in my selection screen parameter.
Regards
Srini
12-23-2008 11:04 AM
Hi Srini,
Check the program in below link
http://www.saptechnical com/Tutorials/Others/ValidateEmailID/Webservice.htm
Regards,
Syf
12-23-2008 11:03 AM
Hi,
Which email ID you want to verify? If its a email address maintained in user master in SU01, you can use following BAPI.
BAPI_USER_GET_DETAIL
pass the user name to it u will get corresponding mail address in addsmtp .
Thanks,
Supriya.
12-23-2008 11:05 AM
Hi,
It not the e-mail id stored in SAP. It the id which user will enter in the selection screen.,
Regards
Srini
12-23-2008 11:04 AM
Hi Srini,
Check the program in below link
http://www.saptechnical com/Tutorials/Others/ValidateEmailID/Webservice.htm
Regards,
Syf
12-23-2008 11:18 AM
Hi,
But the email id will be stored somewhere in the system rt? E.g. vendor mail id is stored in the vendor master.
Supriya.
12-23-2008 12:09 PM
Hi Srini,
I am not sure of any FM, but if I assume correctly you have a generic e-mail id to verify.
If so, why don't you try using something like the code below.
IF p_email NP '@.*'.
Show message for Invalid E-Mail ID
MESSAGE 'Invalid E-Mail ID.' TYPE 'E'.
ENDIF.
I agree that this is a very basic validation. But, I go by the rule that make the program as generic as it is required.
In case of a usual e-mail id like say 'someone@somewhere'(add .com etc after somewhere) the only validation you can use is that it should have a '@' and then a web server id like 'emailserver.co'.
In case you are going to use only a specific mail server, like your company, you can add that restriction in the above pattern, e.g.,
IF p_email NP '*@xyz.co'. -
> add specific domain for your mail IDs
Show message for Invalid E-Mail ID
MESSAGE 'Invalid E-Mail ID.' TYPE 'E'.
ENDIF.
Regards
Barada
12-23-2008 4:03 PM
Hi Srini,
I think function module SX_INTERNET_ADDRESS_TO_NORMAL can be useful.
Regards,
Darshan Mulmule