04-07-2009 10:30 AM
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.
04-07-2009 10:33 AM
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
04-07-2009 10:39 AM
04-07-2009 10:46 AM
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]
04-08-2009 10:15 AM