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: 

sending emails with formatting

Former Member
0 Kudos

Hi all,

I need to have a functionality where i should be able to send the mails along with the formatting. Like we do get the mails when we send it from SAP to other domain as 'plain text'. How can we get the formatted email or HTML type email through ABAP.

Thanks in advance.

Harshad.

4 REPLIES 4

Former Member
0 Kudos

Hi,

The following function module could be used:

  • Send the document

CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'

EXPORTING

document_type = 'RAW' " Raw format

document_data = l_r_doc_chng " Header of the mail (Subject, etc.)

put_in_outbox = 'X'

commit_work = 'X'

TABLES

object_content = i_t_objcont " Body of the mail

receivers = l_t_reclist " List of receivers

EXCEPTIONS

too_many_receivers = 1

document_not_sent = 2

operation_no_authorization = 4

OTHERS = 99.

Here for the exporting parameter document_type, you can specify various options like RAW, BCS, BIN, etc..

you can check in TSOTD table for the list of options from the OBJTP field values.

Best Regards,

Suresh

Former Member
0 Kudos

Check this,

Regards,

Joan

Edited by: Joan Jesudasan on Apr 7, 2009 11:40 AM

Former Member
0 Kudos

Hi,

You need to use the HTML table tags in the body and doc_type would be HTML.

Refer to this link..[Email with HTML body and Excel as attachment|http://docs.google.com/Doc?id=dfv2hmgs_0fm22tggx&hl=en]

Former Member
0 Kudos

solved