Application Development 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: 

Sending Email to different receiver using cl_bcs with csv attachment

0 Kudos

Hello Everyone,

I am new in ABAP world and I am trying to create a program with cl_bcs.

I have a report with 6 columns on screen.

My requirement is to send an email to different receivers according to their email id. I have created a program to send an email with an attachment to one predefined receiver (here receiver i have hard coded). Now i want to send an email to different departments according to their email id. How can i acheive this. I am stucked!!

PS: I am completely new in programming, with no previous hand on experience in ABAP. I am expecting to get an explaination with code example for a beginner level!!! 🙂

I thank you in advance for your response and help.

1 ACCEPTED SOLUTION

mmcisme1
Active Contributor

Hello,

I'm glad you stopped in to ask a question. Prior to asking a question, searching for the answer is one of the things you should do. However, it's not always easy to know what to search with.

I searched using:

SAP CL_BCS attachment in google to see what was already out there. There is a really nice code snippet here:

https://wiki.scn.sap.com/wiki/display/Snippets/Sending++attachment+using+cl_bcs+classes

Just loop through you receivers to add them to the e-mail list.

Michelle

6 REPLIES 6

mmcisme1
Active Contributor

Hello,

I'm glad you stopped in to ask a question. Prior to asking a question, searching for the answer is one of the things you should do. However, it's not always easy to know what to search with.

I searched using:

SAP CL_BCS attachment in google to see what was already out there. There is a really nice code snippet here:

https://wiki.scn.sap.com/wiki/display/Snippets/Sending++attachment+using+cl_bcs+classes

Just loop through you receivers to add them to the e-mail list.

Michelle

0 Kudos

Hello Michelle,


Thank you for your response and for that Tip. Actually as a begineer it is hard find and then reading the code lines is another issue for a begineer.

0 Kudos

Use Comment button to answer to a proposal, not Answer (because it is not an answer)

frdric.girod technically it is answer to Michelle 🙂

(/s, I know the never ending problem of people not reading "Before answering" and bad UX/UI design of this forum)

-- Tomas --

0 Kudos

Please use the COMMENT button for comments, questions, adding details, etc., ANSWER is only to propose a solution, dixit SAP text at the right of the answer area. At the same time, the person will be informed of your comment (currently not).

Tomas_Buryanek
Active Contributor

Standard demo (example) program BCS_EXAMPLE_7 already exist for this. There is input parameter "mailto".

-- Tomas --