01-13-2020 12:12 PM
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.
01-13-2020 12:40 PM
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
01-13-2020 12:40 PM
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
01-13-2020 12:49 PM
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.
01-13-2020 2:13 PM
Use Comment button to answer to a proposal, not Answer (because it is not an answer)
01-13-2020 2:45 PM
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)
01-13-2020 3:48 PM
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).
01-13-2020 1:46 PM
Standard demo (example) program BCS_EXAMPLE_7 already exist for this. There is input parameter "mailto".