CL_BCS Class : 5 Easy Steps To Send Email with ABAP

CL_BCS Class is the standard new SAP to handle and send email.

CL_BCS allows to
– Attach files to email
– Build the HTML/raw of body.
– Set email’s Senders & Receiver
– Send email …

This post is a step by step SAP ABAP Tutorial how to sends email from SAP with the CL_BCS in ABAP with sample ABAP code.

SAP Send Email CL BCS Class

The different steps are:

1- Create BCS Document

2- Set the e-mail address of the sender

Or you can set the connected user as a sender with

Check if an email is value in ABAP Two ways to Check if email is valid in ABAP : Function Vs Regex

3- Set the receiver

If you want to retrieve the email address of an user,
use the function module “HR_FBN_GET_USER_EMAIL_ADDRESS”

4- Assign document to the send request

Add the sender to the send request

5- Send mail CL BCS Class’s Send Method

Learn more about the new SAP ABAP with the following book ABAP Development for SAP HANA

ABAP Send Mail with CL_BCS Class

CL_BCS Class  5 Easy Steps To Send Email with ABAP

Here the complete code for Send Email CL_BCS ready to go.