Posts

Showing posts with the label cl_bcs_message

Easily send emails from ABAP using Custom utility class ZCL_SEND_MAIL

in the previous post,s I shared how to use CL_BCS class to send emails . and I also shared how to use cl_bcs_message class to send email in user-exit and BADI . The standard libraries even though useful, are cumbersome to use so I have created a utility that combines the power of both CL_BCS and CL_BCS_MESSAGE to let you send an email with ease from anywhere in the system. Below are examples and source links to the utility class ZCL_SEND_MAIL A simple example: Sending email from user exit/Badi Link to Source:  ZCL_SEND_MAIL As usual, Hope you like the post and use the information in your day to day work.

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.