2007 Jan 02 8:01 PM
Hi All,
I have check table with following email address domain values.
@abc.com
@def.com
@ghi.com
@jkl.com
....
....
....
like said above i have all in an internal table.
and i am getting a user smtp address thru selection screen input, I need to validate the user email address getting
thru selection screen with above said values from internal table that user smtp address ending match with the internal table valies.
I have done this by using the following command
SEARCH itab FOR g. (Here g contains the domain name from user smtp address)
I like to know is there any better method for doing this?
Thanks
aRs
2007 Jan 02 8:07 PM
Hi,
I need to one more point to my query.
The domain internal table mentioned have a thousand of domains.
Thanks
aRs
2007 Jan 02 8:03 PM
Hi,
Use CS ..
DATA: v_char(30) VALUE 'NAREN@ABC.COM'.
IF v_char CS '@ABC.COM'.
WRITE: / 'True'.
ELSE.
WRITE: / 'False'.
ENDIF.
Thanks,
Naren
2007 Jan 02 8:07 PM
Hi,
I need to one more point to my query.
The domain internal table mentioned have a thousand of domains.
Thanks
aRs
2007 Jan 02 8:12 PM
data: domain type string.
data: name type string.
parameters: email(255) type c.
at selection-screen.
split email at '@' into name domain .
concatenate '@' domain into domain.
condense domain no-gaps.
translate domain to upper case.
read table itab with key domain = domain.
if sy-subrc <> 0.
message E001(00) with 'Email domain not valid'.
endif.
How about this?
Regards,
RIch Heilman
2007 Jan 02 8:19 PM
Thanks Rich,
Your reply solved the problem.
Points given.
Thanks
aRs