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: 

SO_NEW_DOCUMENT_ATT_SEND_API1 - problem after Unicode

Former Member
0 Kudos

Hi experts, I'm using SO_NEW_DOCUMENT_ATT_SEND_API1 to create an email with an attached report. Prior to Unicode upgrade, I had no problems with the attachment. Now each line of the contents_bin atttachment wraps after 127 characters and the wrapped part is in Chinese! Each line is 242 characters long so it shouldn't wrap. Can somebody suggest what I can do to prevent both the wrapping and the change from English to Chinese from char 127 onwards.? Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Thanks Rajvansh, I had already looked at those notes but neither applied to my problem. I suspect that the problem is either that I should use objhex instead of objbin or that there is some setting on Unicode that is beyond my abilities (basis perhaps). I've given up and written each record over 2 lines of < 127 characters each because my user doesn't mind anyway, and its the cheaper option that spending the time to find the cause of the fault.

7 REPLIES 7

Former Member
0 Kudos

Hi Brigitte,

I don't know the excat reason for this issue, but why couldn't you try OO concept for sending the mail ?

I think that will be more stable.

[CL_CRM_EMAIL_DATA |http://wiki.sdn.sap.com/wiki/display/Snippets/Abap-SendingemailwithclassCL_CRM_EMAIL_DATA]

[Sending mails|http://wiki.sdn.sap.com/wiki/display/ABAP/SendingMails-HomePage#SendingMails-HomePage-Howtobuildlinesofmorethan255characters%3F]

Regards

HM

Rushikesh_Yeole
Contributor
0 Kudos

it is problem due to unicode.

select the proper unicode value to support your characters ahile uploading or downloading file by mail.

use transaction SCP , you will get detailed idea about unicode selection

Former Member
0 Kudos

Thanks for your responses.

Hareesh, CL_CRM_EMAIL_DATA doesn't exist on my system. Nor do many others I tried after reading other posts.

Rushikesh, I looked at SCP but am none the wiser. How do I know which to use and where do I specify it?

Former Member
0 Kudos

Hi Brigitte,

As this issue happened after upgrade, try to check for SAP notes. Check and see if the below notes are valid for your release

Note 787418 - Sent documents are not readable after upgrade

Note 1430123 - Document size is not calculated correctly

Regards

Rajvansh

Former Member
0 Kudos

Thanks Rajvansh, I had already looked at those notes but neither applied to my problem. I suspect that the problem is either that I should use objhex instead of objbin or that there is some setting on Unicode that is beyond my abilities (basis perhaps). I've given up and written each record over 2 lines of < 127 characters each because my user doesn't mind anyway, and its the cheaper option that spending the time to find the cause of the fault.

0 Kudos

Hi Brigitte ,

Please refer note : 190669.

As I have faced the similar issue.

The problem is with the upgradation.

And due to upgradation, the internal logic of SO_NEW_DOCUMENT_ATT_SEND_API1 has been changed.

So after referring the note : 190669.

We have referred Program : BCS_EXAMPLE_# (# indicates 1-8) and updated my program with this example.

I have referred BCS_EXAMPLE_5 to send the email notification with the attachment.

Now sending email is easier comparing with the SO_NEW_DOCUMENT_ATT_SEND_API1.

As we DONT need to use PACKING LIST in this FM and

its easy to use this example as we just need to pass required parameters like

email body, subject line, receivers,attachment body,attachment name,etc., .

Regards,

Amit Linge.

Edited by: Amit Ashok Linge on Jun 24, 2011 8:53 AM

Edited by: Amit Ashok Linge on Jun 24, 2011 8:57 AM

Former Member
0 Kudos

Thanks Amit. I was hoping I wouldn't have to do so much coding but your suggestion works. Regards, Brigitte