Professional Documents
Culture Documents
Introduction .................................................................................................................................................. 2
Basics steps to follow .................................................................................................................................... 2
Example ..................................................................................................................................................... 2
Steps to follow .......................................................................................................................................... 3
Data definition ...................................................................................................................................... 3
Have data/text ready for email body .................................................................................................... 3
Have an internal table ready with attachment data............................................................................. 4
Convert internal table with attachment data into a binary stream ..................................................... 4
Set the email request subject ............................................................................................................... 5
Create the email document .................................................................................................................. 5
Set the email request attributes ........................................................................................................... 5
Attach the email document to the email request ................................................................................ 6
Create and set the email sender ........................................................................................................... 6
Add the attachment to the email document ........................................................................................ 6
Create and set the email recipients ...................................................................................................... 6
Send the email request and commit work ............................................................................................ 7
Check the created email in the transaction SOST ................................................................................. 7
Introduction
There are business requirements where you need to generate emails with or without attachments based
on a custom logic in an ABAP program.
Data definition
Example
Send an email using sample content and an attachment. Check the email in SOST to verify.
Steps to follow
Data definition
Define data set to be used in the program. See program comment for details.
Disclaimer
This article is done based on my research and readings, unless otherwise stated. The views expressed are
my own and not of anyone else.
Author accepts no liability for the content of the articles in this website or for the consequences of any
actions taken on the basis of the information provided. Using this information is at the users own
discretion and responsibility.