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: 

Send mail with PDF attachment not correct for multiple address

former_member200754
Participant
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

7 REPLIES 7

Former Member
0 Kudos

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.

0 Kudos

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

former_member200754
Participant
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

Hello Hardik Patel,

I tried but still not work. 

Thanks,

0 Kudos

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.

0 Kudos

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.