send email with attachment from an ABAP program

send email with attachment from an ABAP program
5 (100%) 1 vote
CL_BCS class is aimed ABAP’ers to execute office operations, lets say Business Communication Service, from ABAP. Recently, i had need to send email from SAP with an attachment excel file. CL_BCS class used with CL_DOCUMENT_BCS has the required method to implement this functionality. I have created a demo program to send selected materials to selected users’ mail adresses. Users’ mail adresses are gathered from SU01 mail adresses over ADR6 and USR21 tables. Below is the sample code.

You may also like