Introduction
This chapter explores useful recipes related to the programming of e-mail sending. We will start with a brief overview of BCS and the various classes available. Then we will see a simple recipe that will generate an e-mail to an SAP user in his or her inbox. Then, we will show how the same program may be changed in order to send the e-mail to Internet e-mail addresses.
We will then add attachments such as an Excel (XML file) to the e-mail. Creating HTML documents will also be discussed. Finally, we will create a program that will execute another ABAP program, convert its output into PDF, and attach the PDF to an e-mail message.
We will see the most important and commonly used classes (and their methods) used for e-mail creation. In addition to e-mail programming classes such as CL_BCS
and CL_BCS_DOCUMENT
, we will also see classes such as CL_CONVERT_BCS
that are used for converting files into appropriate formats suitable for attaching to e-mail documents.
Throughout the chapter...