Send mail with out using commit work with cl_bcs_message class

 In my last post Send mail using CL_BCS library We explored the class to achieve mail sending functionalities. The class is a really powerful tool but it has a shortcoming i.e. it needs to commit work.

It's not a problem most of the time unless you are working with User-Exit and BADI. In this post, I wanted to showcase the usage of CL_BCS_MESSAGE class.

The class only collects data and depending upon how you set the attributes of the class object, function module SBCS_SEND or SBCS_SEND_UPDATE is called. This means we can use this class to send emails from User-exit or BADI.

Below is a sample code.

Hope You like the snippet and use this information in your day to day work.

Popular posts from this blog

ABAP read excel(.XLSX) file to internal table in ABAP using CL_FDT_XL_SPREADSHEET

ABAP convert internal table to excel (.xlsx) format and Send email or download

Application Logging in ABAP