03-29-2016 4:08 PM
Hello all,
When i try to send mail for multiple address and not correct in case there is one wrong address
(In my case the email address contain some chinese character ).
Ex: i have 10 address need to be sent and the number 5 is wrong then the address number 6 to 10 can not be sent although they are correct.So, I just send only from address 1 to 5.
My current FM is SO_NEW_DOCUMENT_SEND_API1. But i tried the class send mail BCL and i got same issue.
So, i tried to validate to avoid wrong address with FM : SX_INTERNET_ADDRESS_TO_NORMAL and i got issue that quite similar to issue send mail above.( if the address number fine is wrong then the address from 6 to 10 return with sy-subrc <> 0 although these address are correct).
Could you have me how to resolve this issue ?
Thank you so much.
Regards,
Tan Tai
04-04-2016 12:15 PM
Hi,
When you have E-mail address in Chinese, Did you try to pass Language as Chinese? May be it can work. I am not sure how you are getting mail address.But if you are using select for tables, You can link language details using tables ADRP and USR21.
Thanks,
Hardik
03-30-2016 3:08 AM
Can you share your code for this part so we can check?
I assume you are looping the receiver internal table to validate each email address. If only address 5 is wrong, then check if you clear every value you pass to FM. Sample:
DATA: receiver TYPE SX_ADDRESS.
LOOP AT table_reciever INTO wa_reciever.
receiver-type = 'INT'.
receiver-address = wa_reciever-email_address.
CALL FUNCTION 'SX_INTERNET_ADDRESS_TO_NORMAL'
EXPORTING
address_unstruct = receiver
EXCEPTIONS
ERROR_ADDRESS_TYPE = 1
ERROR_ADDRESS = 2
ERROR_GROUP_ADDRESS = 3
OTHERS = 4.
IF sy-subrc EQ 0. "Email is valid
"Pass to new table the valid email address
APPEND wa_reciever TO valid_reciever.
ENDIF.
CLEAR: receiver, wa_reciever.
ENDLOOP.
03-30-2016 7:56 AM
Hello Elzkie La,
I did a example like yours. But in my wrong address number contain some chinese characters
like : abcdef@sdec.com.cn (收获联系人) then all the address follow this will be check with sy-subrc <> 0 (Funtion module not working).
If the address be wrong without chinese characters then all address follow will be check correct.
I guest the reason because of chinese character. But i do not know how to restrict this.
Thanks,
TanTai
04-04-2016 11:39 AM
Hello all,
Can anybody help me ?
As i removed all the error emails then program will send many more email, but we can not send to all emails. i do not know why ?
I do not know whether SAP config restrict the quantity email send out or not.
Thanks,
TanTai
04-04-2016 12:15 PM
Hi,
When you have E-mail address in Chinese, Did you try to pass Language as Chinese? May be it can work. I am not sure how you are getting mail address.But if you are using select for tables, You can link language details using tables ADRP and USR21.
Thanks,
Hardik
04-05-2016 4:08 AM
04-05-2016 2:06 PM
Hello,
I am not sure about exact solution for your problem. While looking for it, I found some content on SAP help:
International Address Versions - Business Address Services (BC-SRV-ADR) - SAP Library
As I understood, might be function module "ADDRESS_INTO_PRINTFORM" can help out. Or maybe you can use it as direction for getting solution. There are couple of SAP notes also provided. Please refer and try to fix your problem.
Also, if you get solution, Please share it.
Thanks,
Hardik.
04-06-2016 11:50 AM
Hi Hardik Patel,
I tried to duplicate issue in other system and it worked fine. Mybe after EHP7 upgrade cause this.
I tried to delete all email contain chinese chracters out of customer for temporary solution.
Thanks for your help.