Application Development 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: 

validate email address

Former Member
0 Kudos

hi,

i am uploading customer master in which i want to validate email address before upload. how to do this.

rgds

Madhu

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Madhu,

Chk this solution from other thread

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.

OR

check FMs

ISA_CONTACT_PERSON_FROM_EMAIL

also chk this:

SX_INTERNET_ADDRESS_TO_NORMAL

3 REPLIES 3

Former Member
0 Kudos

Hi Madhu,

Chk this solution from other thread

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.

OR

check FMs

ISA_CONTACT_PERSON_FROM_EMAIL

also chk this:

SX_INTERNET_ADDRESS_TO_NORMAL

Former Member
0 Kudos

Hi Madhu,

The best way is to validate the E-mail address for @ (should be 2nd character or at later) and . after @.

As you can't validate the complete e-mail ID.

Regards,

Atish