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

E-Mail id verification

Former Member
0 Likes
1,279

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,119

Hi Srini,

Check the program in below link

http://www.saptechnical com/Tutorials/Others/ValidateEmailID/Webservice.htm

Regards,

Syf

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

6 REPLIES 6
Read only

Former Member
0 Likes
1,119

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.

Read only

0 Likes
1,119

Hi,

It not the e-mail id stored in SAP. It the id which user will enter in the selection screen.,

Regards

Srini

Read only

Former Member
0 Likes
1,120

Hi Srini,

Check the program in below link

http://www.saptechnical com/Tutorials/Others/ValidateEmailID/Webservice.htm

Regards,

Syf

Read only

Former Member
0 Likes
1,119

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.

Read only

Former Member
0 Likes
1,119

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

Read only

Former Member
0 Likes
1,119

Hi Srini,

I think function module SX_INTERNET_ADDRESS_TO_NORMAL can be useful.

Regards,

Darshan Mulmule