11-28-2012 4:26 AM
How to achieve Multiple email ID validations (Recipients) .
I have developed one application for sending mail using CL_BCS class. Now i want to validate email ID
(for Multiple Recipients) . << Urgency Removed >>
Message was edited by: Kesavadas Thekkillath
11-28-2012 4:47 AM
Hello Padma,
Try FM SX_INTERNET_ADDRESS_TO_NORMAL with following Parameters in ADDRESS_UNSTRUCT
TYPE = INT
ADDRESS : email id
You will get results.
Regards,
Deepti
11-28-2012 5:20 AM
Hi Deepti,
That FM validates only Single Recipient address, I need to validate Multiple email ID`s
11-28-2012 5:42 AM
Hello Padma,
You need to loop it out your internal table of email address and pass into Funtion module one by one for validation.
Regards,
Deepti
11-28-2012 6:02 AM
Hi Deepti,
same thing i have done as you said, but it checks only abc@xyz
I want to validate ( . ) also.
Thanks
11-28-2012 6:10 AM
It is giving error message if i check abc.xyz
Pls provide example. Also check below link, this might help you.
https://scn.sap.com/message/3395034
Regards,
Deepti
11-28-2012 6:13 AM
Deepti,
What is the maximum file attachment size using CL_BCS class.
Please reply me...
11-28-2012 6:15 AM
Deepti,
What is the maximum file attachment size using CL_BCS class.
Please reply me...
11-28-2012 6:40 AM
Hello Padma,
I am not sure but usely it works well with all types. Exception is always there for a huge file size.
If you want to see how to calculate file size then check below
http://scn.sap.com/thread/1832037
Regards,
Deepti
11-28-2012 7:21 AM
Hi Padmanabha,
Do you want to validate domain also. or you want to directly validate SAP User's Mail ID given in SU01.
I dont want to tell how to validate SU01 Mail ID. Because u know how to do it.
Please check the below program for external mail id's.
PARAMETERS: p_mail(100) LOWER CASE. " E-Mail id to beverified
DATA: http_client TYPE REF TO if_http_client .
DATA: w_string TYPE string ,
w_result TYPE string ,
r_str TYPE string .
DATA: result_tab TYPE TABLE OF string.
START-OF-SELECTION .
CLEAR w_string .
CONCATENATE
'http://www.webservicex.net/ValidateEmail.asmx/IsValidEmail?Email='
p_mail
INTO
w_string .
CALL METHOD cl_http_client=>create_by_url
EXPORTING
url = w_string
IMPORTING
client = http_client
EXCEPTIONS
argument_not_found = 1
plugin_not_active = 2
internal_error = 3
OTHERS = 4.
CALL METHOD http_client->send
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2.
CALL METHOD http_client->receive
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3.
CLEAR w_result .
w_result = http_client->response->get_cdata( ).
REFRESH result_tab .
SPLIT w_result AT cl_abap_char_utilities=>cr_lf INTO TABLE
result_tab .
11-28-2012 7:03 AM
Hi Padma,
Have you tried appending ';' as seperator for multiple emails..try this may be it would work. or else the suggested answer of looping the fm for every email only stands good.
for example: xyz@xyz.com; abc@abc.com; .....
Regards,
Andrew.
11-28-2012 7:12 AM
Hi,
Have you tried for the web-service for the issue. it would complicate if the requirement is not projected to use web-service
Regards,
Andrew