<?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 Using SAP Mailbox, FM:SO_DOCUMENT_SEND_API1 in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-sap-mailbox-fm-so-document-send-api1/m-p/3047172#M721339</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ABAP gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time on my query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a very typical issue with sending emails to external email IDs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. We have an output (ABCD) from Billing documents, which sends Delivery Confirmation document by email, by deriving the email ID from the ship-to-party master data from the Billing document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. the output ABCD is processed by a batch job, which collects ABCD outputs from all the possible Billing Documents and processes at a time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Now the issue is, for eg: if 500 ABCD outputs are processed successfully, it has 500 successful entries in NAST table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. but atleast 20% of the emails are missed to sent, which means only 400 correspondings entries are present in SOST table and the remaining 100 emails are missed and so not available in SOST table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. Again if we reprocess the missed out outputs they are sent successfully and the entries are available in SOST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Technical:&lt;/P&gt;&lt;P&gt;The FM: SO_DOCUMENT_SEND_API1 is used to send external emails&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following routine does that in our output program:&lt;/P&gt;&lt;P&gt;====================================&lt;/P&gt;&lt;P&gt;FORM send_mail TABLES   lt_outtab&lt;/P&gt;&lt;P&gt;               CHANGING i_sender_addr LIKE soextreci1-receiver&lt;/P&gt;&lt;P&gt;                        e_rc            LIKE sy-subrc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA : l_sent_to_all(1) TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  REFRESH reclist.&lt;/P&gt;&lt;P&gt;  CLEAR   reclist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Completing the recipient list&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  reclist-receiver   = i_receiver_addr.         "Email Address&lt;/P&gt;&lt;P&gt;  reclist-rec_type   = 'U'.                     "Address Type = External&lt;/P&gt;&lt;P&gt;  reclist-notif_ndel = 'X'.                     "Notify of non-delivery&lt;/P&gt;&lt;P&gt;  APPEND reclist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sending the document&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'SO_DOCUMENT_SEND_API1'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            sender_address      = i_sender_addr&lt;/P&gt;&lt;P&gt;            sender_address_type = 'SMTP'&lt;/P&gt;&lt;P&gt;            document_data       = doc_chng&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            packing_list        = objpack&lt;/P&gt;&lt;P&gt;            object_header       = objhead&lt;/P&gt;&lt;P&gt;            contents_txt        = objtxt&lt;/P&gt;&lt;P&gt;            receivers           = reclist&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            OTHERS              = 99.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  e_rc = sy-subrc.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;================================================&lt;/P&gt;&lt;P&gt;Can some one suggest what could have been wrong with the FM usage or the code or anything else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;Siva.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Nov 2007 14:14:57 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-15T14:14:57Z</dc:date>
    <item>
      <title>Using SAP Mailbox, FM:SO_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-sap-mailbox-fm-so-document-send-api1/m-p/3047172#M721339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ABAP gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time on my query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a very typical issue with sending emails to external email IDs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. We have an output (ABCD) from Billing documents, which sends Delivery Confirmation document by email, by deriving the email ID from the ship-to-party master data from the Billing document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. the output ABCD is processed by a batch job, which collects ABCD outputs from all the possible Billing Documents and processes at a time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Now the issue is, for eg: if 500 ABCD outputs are processed successfully, it has 500 successful entries in NAST table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. but atleast 20% of the emails are missed to sent, which means only 400 correspondings entries are present in SOST table and the remaining 100 emails are missed and so not available in SOST table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. Again if we reprocess the missed out outputs they are sent successfully and the entries are available in SOST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Technical:&lt;/P&gt;&lt;P&gt;The FM: SO_DOCUMENT_SEND_API1 is used to send external emails&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The following routine does that in our output program:&lt;/P&gt;&lt;P&gt;====================================&lt;/P&gt;&lt;P&gt;FORM send_mail TABLES   lt_outtab&lt;/P&gt;&lt;P&gt;               CHANGING i_sender_addr LIKE soextreci1-receiver&lt;/P&gt;&lt;P&gt;                        e_rc            LIKE sy-subrc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DATA : l_sent_to_all(1) TYPE c.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  REFRESH reclist.&lt;/P&gt;&lt;P&gt;  CLEAR   reclist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Completing the recipient list&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  reclist-receiver   = i_receiver_addr.         "Email Address&lt;/P&gt;&lt;P&gt;  reclist-rec_type   = 'U'.                     "Address Type = External&lt;/P&gt;&lt;P&gt;  reclist-notif_ndel = 'X'.                     "Notify of non-delivery&lt;/P&gt;&lt;P&gt;  APPEND reclist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Sending the document&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  CALL FUNCTION 'SO_DOCUMENT_SEND_API1'&lt;/P&gt;&lt;P&gt;       EXPORTING&lt;/P&gt;&lt;P&gt;            sender_address      = i_sender_addr&lt;/P&gt;&lt;P&gt;            sender_address_type = 'SMTP'&lt;/P&gt;&lt;P&gt;            document_data       = doc_chng&lt;/P&gt;&lt;P&gt;       TABLES&lt;/P&gt;&lt;P&gt;            packing_list        = objpack&lt;/P&gt;&lt;P&gt;            object_header       = objhead&lt;/P&gt;&lt;P&gt;            contents_txt        = objtxt&lt;/P&gt;&lt;P&gt;            receivers           = reclist&lt;/P&gt;&lt;P&gt;       EXCEPTIONS&lt;/P&gt;&lt;P&gt;            OTHERS              = 99.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  e_rc = sy-subrc.&lt;/P&gt;&lt;P&gt;ENDFORM.&lt;/P&gt;&lt;P&gt;================================================&lt;/P&gt;&lt;P&gt;Can some one suggest what could have been wrong with the FM usage or the code or anything else.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &amp;amp; regards&lt;/P&gt;&lt;P&gt;Siva.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2007 14:14:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-sap-mailbox-fm-so-document-send-api1/m-p/3047172#M721339</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-15T14:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAP Mailbox, FM:SO_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-sap-mailbox-fm-so-document-send-api1/m-p/3047173#M721340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sap version  ECC 6.0 &lt;/P&gt;&lt;P&gt;CALL FUNCTION 'SO_DOCUMENT_SEND_API1'&lt;/P&gt;&lt;P&gt;EXPORTING&lt;/P&gt;&lt;P&gt;   sender_address = i_sender_addr&lt;/P&gt;&lt;P&gt;   sender_address_type = 'SMTP'&lt;/P&gt;&lt;P&gt;   document_data = doc_chng&lt;/P&gt;&lt;P&gt;   COMMIT_WORK  = 'X' &lt;/P&gt;&lt;P&gt;TABLES&lt;/P&gt;&lt;P&gt;   packing_list = objpack&lt;/P&gt;&lt;P&gt;   object_header = objhead&lt;/P&gt;&lt;P&gt;   contents_txt = objtxt&lt;/P&gt;&lt;P&gt;   receivers = reclist&lt;/P&gt;&lt;P&gt;EXCEPTIONS&lt;/P&gt;&lt;P&gt;   OTHERS = 99.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2007 16:01:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-sap-mailbox-fm-so-document-send-api1/m-p/3047173#M721340</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-15T16:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAP Mailbox, FM:SO_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-sap-mailbox-fm-so-document-send-api1/m-p/3047174#M721341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi George &amp;amp; all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently we are using 4.6C version and there is no COMMIT WORK parameter in the FM. Please advise how can I proceed further.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Siva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 04:43:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-sap-mailbox-fm-so-document-send-api1/m-p/3047174#M721341</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-16T04:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAP Mailbox, FM:SO_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-sap-mailbox-fm-so-document-send-api1/m-p/3047175#M721342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok if you don't have COMMIT WORK In the FM, you can try with the explicit COMMIT WORK after your FM call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Naimesh Patel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2007 05:13:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-sap-mailbox-fm-so-document-send-api1/m-p/3047175#M721342</guid>
      <dc:creator>naimesh_patel</dc:creator>
      <dc:date>2007-11-16T05:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using SAP Mailbox, FM:SO_DOCUMENT_SEND_API1</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/using-sap-mailbox-fm-so-document-send-api1/m-p/3047176#M721343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Patel &amp;amp; others,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But already I am using "SUBMIT rsconn01 AND RETURN" immediately after the send_emails routine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can please let me know having an explicit "Commit_Work" immediately after Call Function will be much useful? If so how it will be?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks &amp;amp; regards,&lt;/P&gt;&lt;P&gt;Siva.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2007 06:30:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/using-sap-mailbox-fm-so-document-send-api1/m-p/3047176#M721343</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-19T06:30:52Z</dc:date>
    </item>
  </channel>
</rss>

