CL_BCS,SAP send email cl_bcs

CL_BCS : How to easily Send Email with ABAP

CL_BCS 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

The different steps are:

Create BCS Document

Set the e-mail address of the sender

Or you can set the connected user as a sender with

Set the receiver

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

Assign document to the send request

Add the sender to the send request

Send mail CL_BCS

ABAP Send Mail with CL_BCS

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

Check also   EDI 870: Discover How Order Status Report handle in ORDERS05 IDoc

Check also   SAP GOS Attachment : Authorization and Technical Overview