07-03-2007 8:32 AM
hi,
i am uploading customer master in which i want to validate email address before upload. how to do this.
rgds
Madhu
07-03-2007 8:33 AM
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
07-03-2007 8:33 AM
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
07-03-2007 8:36 AM
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
07-03-2007 8:38 AM