It is very common that we have ABAP Reports that sends email to Upon Completion of Loads/ABAP Report Extracts Data for User Requirement. This is Common and wide usage option that We maintain the Distribution list in Program for Specific User. But in many cases this is even common in changing the receivers list in side the Program every time and this needs lot of approvals and transport Requests and migration procedure. To avoid all the stuff and to make our life simple, i have created a program using Standard T-Code SO23, through this the distribution list is not constant and that can be maintained dynamically that works and update in to program for new distribution list to receive metric automatically.
To Implement, Please go through the below steps.
Step 1: Go to SO23, To Maintain Receivers list, Follow the Steps.
Step 2: Goto SO23 and Click on Create.
Step 2: Go to Folder Filed and Click on F4/Select Search Help Button to Create Folder.
Step 3: On Pop Up, Click on Create Folder, for Shared Radio Button type. So that Folder can be used
by any one.
Step 4: Enter the Folder Name and Description, Where we maintain the email list with in Folder, This folder
Can be created on your own, suppose you want to maintain all your project/Client Specific, you can create
one with the desired Name. Click Ok/Enter shown below.
Step 5: You will see Status Message Bottom of Screen, That Folder is Created and this Shared folder,
and CLick Ok in Popup Window.
Step 6: You will see below Screen Now, Enter the folder Name in Name field and Click enter Title get filled or
Click on Distr.List Content,
Step 7: Enter the Name Email Address in Recipient List and select Internet address under Recip.Type
drop down and click on Save, follow the sequence 1,2,3.
Step 8: A status message given that, the folder With Email List is created.
Till now, You have successfully Maintained the and created the Email list.
Now, To go SE38, Create a Test Program to check dynamic list either it is working or not..?
Step 9: Go to SE38, and Create Program: ZEMAIL_LIST_CHECK and Save.
Step 10: Copy the Attached Code and Paste it in to above program.
CODE: Dynamic Email List Specific Code, Below.
Call function Module to get Receivers List maintained in SO23.
Pass the receivers list to Emailing Function Module,
Or you can Find the attached Program, and execute it. to Execute: Click F8.
Program Executes successfully and you will see pop-up that stating ‘Mail has been successfully Sent’.
Mail Received Successfully on Dynamic Specified Address.
Now, you can also go to SO23 again and change and add or modify the receivers List.
Or Click find and go to change mode and maintain the list. shown below.
You don’t need any Transport Request/Package to maintain this.
Note: Please make sure that You system is configured for Email Settings for the receivers and SMTP port enabled.
This is Basis Task and Enabling SMTP is one time activity in a system.
Please add your comments if there is any thing i can add-on.