Application Development and Automation 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: 
Read only

sending HTML email with SO_DOCUMENT_SEND_API1

Former Member
0 Likes
1,342

Hi all,

I have implemented a function module to send HTML emails with SO_DOCUMENT_SEND_API1.

It works fine, but in every email I have at the end a CRLF which looks not very nice in MS Outlook.

It seems that this will be added to every email in addition to my HTML text.

Has anyone an idea how I can prevent this?

Thanks in advance for your help.

Best Regards,

Marcel

1 ACCEPTED SOLUTION
Read only

Clemenss
Active Contributor
0 Likes
1,051

Hi Marcel,

did you try with CL_BCS? It may be worth a try.

Regards,

Clemens

8 REPLIES 8
Read only

former_member156446
Active Contributor
0 Likes
1,051

I heard adding a

<br />

tag at end of each line, would remove it.. never test.. but might work

Read only

0 Likes
1,051

Hi J@y,

thanks for your quick reply. I have already tested this and also adding a CRLF at the end, but without success.

The strange thing is if I have only a short line everything works fine.

Any other ideas?

Best Regards,

Marcel

Read only

0 Likes
1,051

[Microsoft Support |http://support.microsoft.com/kb/314336/]

Read only

0 Likes
1,051

Hi J@y,

thanks for the idea, but I also have the issue in the OWA so it seems to be not an issue with the Outlook.

The article also describes, that it converts the CRLF to Space. If this would happen I would have the solution.

Thanks for your help so far. Any other idea?

Cheers,

Marcel

Read only

Clemenss
Active Contributor
0 Likes
1,052

Hi Marcel,

did you try with CL_BCS? It may be worth a try.

Regards,

Clemens

Read only

Former Member
0 Likes
1,051

Hi Clemens,

can you give me a hint what you mean? Can I also use this class to send emails?

Thanks in advance,

Marcel

Read only

Former Member
0 Likes
1,051

yes... this cl_bcs can definitely be used to send mail.. with some added features than so..send..api1

there are few blogs already posted for this..

check these out..

http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3414900%29ID1374581950DB1030183667636653706...

http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3414900%29ID1374581950DB1030183667636653706...

Read only

Clemenss
Active Contributor
0 Likes
1,051

Hi Marcel,

not only you can, you should use CL_BCS for sending of email. Although I expect it to be not too different from the old functions, it points to the object oriented future of SAP/ABAP. At least it should run more stable and SAP recommends to use it as a replacement for old functions.

I came across one blog

[Sending HTML Email from SAP CRM/ERP|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417300%29ID2058700050DB10227264795501776639End?blog=/pub/wlg/2273]

You may be careful with this one: Probably it's not exactly what you need.

The one I love most for its simplicity is this one

[Unknown thus unloved?|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417300%29ID2058700050DB10227264795501776639End?blog=/pub/wlg/3443]

although it does not mention HTML - I think easy for you to adapt. Compared to functional SO_DOCUMENT.. approach the program will shrink.

If you want to understand the concepts behind, nobody explains it better than

[Thomas Jung: Sending E-Mail from ABAP - Version 610 and Higher - BCS Interface|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417300%29ID2058700050DB10227264795501776639End?blog=/pub/wlg/789]

or - if you still feel unsafe in oo environment -

[Sending E-Mail from ABAP - Version 610 and Higher - BCS Interface|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417300%29ID2058700050DB10227264795501776639End?blog=/pub/wlg/15408]

Happy coding!

Regards,

Clemens