cancel
Showing results for 
Search instead for 
Did you mean: 

How to send an e-mail to additional recipients as CC

RiccardoEscher
Active Participant
0 Kudos

I have the need to code a PPF action which sends an e-mail (smartform) not only to the main recipient(s) but also to additional recipients as CC.

I am wondering if module SO_NEW_DOCUMENT_ATT_SEND_API1 does the job, but I am very skeptical.

Has someone already done it and who can share his experience?

Accepted Solutions (1)

Accepted Solutions (1)

Daniel-Alex
Product and Topic Expert
Product and Topic Expert
0 Kudos

Dear Riccardo,

the best approach for this issue is to follow the description and example of note #935670.

The general outline is as follows:

1. when calling the SF function module set parameter to get back the OTF document

*-----------get back OTF document --------------------------------------
* set 'ls_control_parameters-getotf' to get back the processed OTF
* document; OTF document is returned in 'job_output_info-oftdata'
* sending will be done in a later step
 ls_control_parameters-getotf = sppf_true.
*-----------------------------------------------------------------------

2. use class CL_BCS to send the document

There are standard example reports BCS_EXAMPLE_X X=1..5 which shows the general usage of this class to send messages. This class is the recommended interface for SAPconnect to generate and send messages. Whenever possible, please use this class instead of outdated function modules.

3. to add a second recipient as CC use

* set recipient (mandatory)
  lo_recipient = cl_bor_object_bcs=>getu_persistent(
                        i_logsys  = is_mail_recipient-logsys
                        i_objkey  = is_mail_recipient-objkey
                        i_objtype = is_mail_recipient-objtype ).
  call method send_request->add_recipient
    exporting
      i_recipient      = lo_recipient
*      i_express        = i_express
*      i_copy           = i_copy
*      i_blind_copy     = i_blind_copy
*      i_no_forward     = i_no_forward
       .
* set CC recipient in addition (optional)
  clear lo_recipient.
  lo_recipient = cl_cam_address_bcs=>create_internet_address(
                        i_address_string = 'your.internet.address_at_domain.com'
                        i_address_name = 'Your Visible Name'
                        ).
  call method send_request->add_recipient
    exporting
      i_recipient      = lo_recipient
      i_copy           = sppf_true
      .

That's all

Best regards, Daniel

Edited by: Daniel-Alexander Heller on Dec 3, 2008 10:24 AM

RiccardoEscher
Active Participant
0 Kudos

Hello Daniel,

thank you very much. I found it finally by myself, but your description is really valuable for the community!

Thanks!

Former Member
0 Kudos

Hi Riccardo,

What was the solution you got for this issue? It would be great if you can share with me.

Thanks in advance!

Regards

Vicky

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Riccardo,

What was the solution you got for this issue? I also have same requirement please share with us.

Thanks.

Yousuf.

RiccardoEscher
Active Participant
0 Kudos

Funny, this old thread is still alive...

It seems that the SDN e-mail notification is not working.

Anyway, my solution can be found here:

/people/riccardo.escher/blog/2009/10/09/pep-up-your-charm--part-3-turn-cinderella-pdf-mails-into-prettyusefull-ones

Former Member
0 Kudos

Hi,

One other option is to create a distribution list and assign the required recipients if they are internal users of the CRM system in the list. This distribution list can be assigned while defining the conditions for the action and subsequently the mail can be sent to all the recipients. Make sure that the users all have their e-mail id's mentioned if they need to be e-mailed and also check for the SCOT settings.

Hope this helps.

Regards,

Ashwin

Former Member
0 Kudos

Hi Riccardo,

If the additional recipients is assigned in order then advisable is to create one more Action Definition with additional recipients as Partener dependent.

Hope it'll help u.

Thanks,

Dipesh.