Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I insert subject title which changed monthly and mail body with footer.

0 Kudos
501

Hi Experts!!

Please find attached image here which is taken from outlook where i received mail as spool recipient email-program.jpg.I scheduled ABAP program using SM36 and sending mail with attachment using spool recipient to mail id krishnak.yadav@cspc.co.in.Now i want to add subject title which changed according to month and year. In addition i also want to add body of mail with footer as mentioned in attached image file here.

Please suggest my how can i do the same. Please give ABAP code for best solution so i can easily understood the matter.

thanking you in advance.

2 REPLIES 2

Jeansy
Active Contributor
344

Hi,

please check the BCS-classes, they are perfect for sending out mails including mail title and body also including attachments.

Please check the following links for more details:
https://sap4tech.net/clbcs-class-send-email-abap-example/
https://wiki.scn.sap.com/wiki/display/Snippets/Send+email+from+ABAP+with+class+CL_BCS

You can also check the various demo reports of SAP via SE38, just look for report names startin with BCS_EXAMPLE_*

Kind regards
Jens

Sandra_Rossi
Active Contributor
0 Kudos
344

I think you can't customize the way the email is sent. Instead you must create an ABAP program to read the spool file, attach it to the email and set the email title and body you want.

For more information, search the forum, all the points above have already been answered (many times).