Only 49 lines of code can use the ABAP function to send emails to the specified mailbox trial version

In the previous steps of this tutorial, the author introduced how to use ABAP code to send mail to the specified mailbox:

Some friends think that the author's email sending code uses 面向对象the idea of ​​ABAP, that is cl_document_bcs, their projects mainly use the process-oriented ABAP programming method, so they asked me if there is any ready-made function in the ABAP system that can also realize the email sending function .

For the discussion of the two programming ideas of ABAP object-oriented and process-oriented, please refer to the author's previous articles:

In this step, the author will introduce how to use the ABAP Function Module, and the function of sending emails to the specified mailbox can be realized in just 49 lines of code.

First look at the effect of the report. After execution, maintain an address for receiving emails:

After the execution is complete, you will see successfula success message from the status bar.

Then open the recipient's outlook and see the email sent through the ABAP code:

Among them, the content of the email title and the three lines of the body are all hard-coded in the ABAP code.

The following are the detailed implementation steps. The complete source code is at the end of the article.

Guess you like

Origin blog.csdn.net/i042416/article/details/131472555