<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SO_NEW_DOCUMENT_ATT_SEND_API1 multiple receivers in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-multiple-receivers/m-p/7088922#M1506983</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No answer for your issue with the function module, but suggest you have a look at the class based email solution CL_BCS - it is well documented and provides a lot of additional functionality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Jul 2010 01:58:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-07-27T01:58:49Z</dc:date>
    <item>
      <title>SO_NEW_DOCUMENT_ATT_SEND_API1 multiple receivers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-multiple-receivers/m-p/7088919#M1506980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have searched the forum and found several examples and threads about function module SO_NEW_DOCUMENT_ATT_SEND_API1. &lt;/P&gt;&lt;P&gt;I have used it before but am now having a specific problem and cannot find a solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The RECEIVERS table is being populated with multiple addresses. The intent is to send one single email to all the recipients listed. Instead, the email is being sent once per recipient.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code below shows two addresses. It should send one email with a TO: and CC: address. Instead it sends it twice (with TO: and CC: populated in each email). "test1" and "test2" are incomplete email addresses for this example.&lt;/P&gt;&lt;P&gt;I assumed it was a simple coding error on my part. Anyone see it? This is on an ECC 6.0 system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;  CLEAR it_mailtxt-line.
  it_mailtxt-line = 'testing email with multiple recipients.'.
  APPEND it_mailtxt.

  DESCRIBE TABLE it_mailtxt LINES mailtxt_size.

  it_doc_att-obj_descr =  'Test email'.
  it_doc_att-sensitivty = 'F'.
  it_doc_att-doc_size = mailtxt_size * 255.

  CLEAR it_mailpack-transf_bin.
  it_mailpack-head_start = 1.
  it_mailpack-head_num = 0.
  it_mailpack-body_start = 1.
  it_mailpack-body_num = mailtxt_size.
  it_mailpack-doc_type = 'RAW'.
  APPEND it_mailpack.

  REFRESH it_reclist.
  CLEAR it_reclist.

  it_reclist-receiver = 'test1'.
  it_reclist-express = 'X'.
  it_reclist-rec_type = 'U'.
  it_reclist-com_type   = 'INT'.
  APPEND it_reclist.

  CLEAR it_reclist.
  it_reclist-copy   = 'X'.
  it_reclist-receiver = 'test2'.
  it_reclist-express = 'X'.
  it_reclist-rec_type = 'U'.
  it_reclist-com_type   = 'INT'.
  APPEND it_reclist.

  CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
      document_data                      = it_doc_att
      COMMIT_WORK                        = 'X'
    TABLES
      packing_list                       = it_mailpack
      object_header                   = it_mailhead
      contents_txt                      = it_mailtxt
      receivers                          = it_reclist
    EXCEPTIONS
      too_many_receivers                 = 1
      document_not_sent                  = 2
      document_type_not_exist            = 3
      operation_no_authorizationfiltered = 4
      parameter_error                    = 5
      x_error                            = 6
      enqueue_error                      = 7
      OTHERS                             = 8.
  IF sy-subrc &amp;lt;&amp;gt; 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jul 2010 22:46:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-multiple-receivers/m-p/7088919#M1506980</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-26T22:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: SO_NEW_DOCUMENT_ATT_SEND_API1 multiple receivers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-multiple-receivers/m-p/7088920#M1506981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you check maybe your code is being called in a loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jul 2010 23:30:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-multiple-receivers/m-p/7088920#M1506981</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-26T23:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: SO_NEW_DOCUMENT_ATT_SEND_API1 multiple receivers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-multiple-receivers/m-p/7088921#M1506982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, so I pulled out the section of code above (and the DATA declarations) and pasted it in a separate program. Same result. &lt;/P&gt;&lt;P&gt;Thought I might be missing a parameter in one of the structures.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jul 2010 23:51:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-multiple-receivers/m-p/7088921#M1506982</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-26T23:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: SO_NEW_DOCUMENT_ATT_SEND_API1 multiple receivers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-multiple-receivers/m-p/7088922#M1506983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No answer for your issue with the function module, but suggest you have a look at the class based email solution CL_BCS - it is well documented and provides a lot of additional functionality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jul 2010 01:58:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-multiple-receivers/m-p/7088922#M1506983</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-27T01:58:49Z</dc:date>
    </item>
    <item>
      <title>Re: SO_NEW_DOCUMENT_ATT_SEND_API1 multiple receivers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-multiple-receivers/m-p/7088923#M1506984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please check any OSS NOTE on SAP service market place  ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are 32 notes with this FM .. may be any one can give you any idea..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jul 2010 06:20:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-multiple-receivers/m-p/7088923#M1506984</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-27T06:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: SO_NEW_DOCUMENT_ATT_SEND_API1 multiple receivers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-multiple-receivers/m-p/7088924#M1506985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;you should create a distribution list via SBWP &amp;gt; Distribution List.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then check the function module documentation in order to find how to fill the RECEIVERS[ ] table parameter with the created distribution list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Andrea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jul 2010 07:53:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-multiple-receivers/m-p/7088924#M1506985</guid>
      <dc:creator>andrea_olivieri</dc:creator>
      <dc:date>2010-07-27T07:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: SO_NEW_DOCUMENT_ATT_SEND_API1 multiple receivers</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-multiple-receivers/m-p/7088925#M1506986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry folks. My error. Some of the target recipients were test accounts with mail forwarding. There was some looping going on that looked like duplicate emails. My apologies.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jul 2010 13:18:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/so-new-document-att-send-api1-multiple-receivers/m-p/7088925#M1506986</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-27T13:18:23Z</dc:date>
    </item>
  </channel>
</rss>

