<?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 how to avoid COMMIT WORK in sending mail using FM in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-commit-work-in-sending-mail-using-fm/m-p/8263497#M1632346</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using FM "SO_NEW_DOCUMENT_ATT_SEND_API1" for sending mails. I have to write a COMMIT WORK after the FM execution, since the mails are not going unless COMIT WORK is written. I am writing this code in one enhancement, and I feel its risky to write a COMMIT WORK. Is there any other solution to send mail so the COMMIT WORK is avoided.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with class CL_BCS for which also COMMIT WORK is required. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Madhuri S&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: madhuri sonawane on Oct 11, 2011 9:25 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Oct 2011 03:55:48 GMT</pubDate>
    <dc:creator>Madhurivs23</dc:creator>
    <dc:date>2011-10-11T03:55:48Z</dc:date>
    <item>
      <title>how to avoid COMMIT WORK in sending mail using FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-commit-work-in-sending-mail-using-fm/m-p/8263497#M1632346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using FM "SO_NEW_DOCUMENT_ATT_SEND_API1" for sending mails. I have to write a COMMIT WORK after the FM execution, since the mails are not going unless COMIT WORK is written. I am writing this code in one enhancement, and I feel its risky to write a COMMIT WORK. Is there any other solution to send mail so the COMMIT WORK is avoided.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with class CL_BCS for which also COMMIT WORK is required. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks and regards,&lt;/P&gt;&lt;P&gt;Madhuri S&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: madhuri sonawane on Oct 11, 2011 9:25 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 03:55:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-commit-work-in-sending-mail-using-fm/m-p/8263497#M1632346</guid>
      <dc:creator>Madhurivs23</dc:creator>
      <dc:date>2011-10-11T03:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to avoid COMMIT WORK in sending mail using FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-commit-work-in-sending-mail-using-fm/m-p/8263498#M1632347</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;  FM "SO_NEW_DOCUMENT_ATT_SEND_API1" in import parameter having COMMIT_WORK just pass the 'X' in that function module.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the class CL_BCS also required COMMIT WORK after the CALL METHOD l_send_request-&amp;gt;send( ).&lt;/P&gt;&lt;P&gt;Please refer the link &lt;A class="jive_macro jive_macro_thread" href="https://community.sap.com/" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1832037"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dhina...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 04:06:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-commit-work-in-sending-mail-using-fm/m-p/8263498#M1632347</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-11T04:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: how to avoid COMMIT WORK in sending mail using FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-commit-work-in-sending-mail-using-fm/m-p/8263499#M1632348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Madhuri,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since &lt;EM&gt;SO_NEW_DOCUMENT_ATT_SEND_API1&lt;/EM&gt; is an RFM you can call it in a parallel session using the STARTING NEW TASK addition and pass 'X' to the COMMIT_WORK param.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Dhina: If we pass 'X' to the COMMIT_WORK, an explicit commit is triggered inside the FM. This will terminate the current LUW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PS: The basic idea is to trigger the COMMIT WORK in a separate session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Suhas Saha on Oct 11, 2011 9:37 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 04:06:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-commit-work-in-sending-mail-using-fm/m-p/8263499#M1632348</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2011-10-11T04:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to avoid COMMIT WORK in sending mail using FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-commit-work-in-sending-mail-using-fm/m-p/8263500#M1632349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello&lt;/P&gt;&lt;P&gt;As said above....please put 'X '  in the commit work parameter of that FM.&lt;/P&gt;&lt;P&gt;or use the below FM   ..I have used this in so many reports it worked...no need of explicit COMMIT WORK.&lt;/P&gt;&lt;P&gt;After you execute your transaction/user exit....goto SOST.transaction .and check whether  you have the email in it...if it is there  then select it and click  on send process.(execute button)..then SAP will send mails from SAP to external email ids.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because sometimes the SOST background jobs runs slowly depends on the job settings...so we need to explicitly run our email from SOST to send out from SAP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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;      document_data              = w_doc_data&lt;/P&gt;&lt;P&gt;      put_in_outbox              = 'X'&lt;/P&gt;&lt;P&gt;      sender_address             = lw_sender_address&lt;/P&gt;&lt;P&gt;      sender_address_type        = lw_sender_address_type&lt;/P&gt;&lt;P&gt;      commit_work                = 'X'&lt;/P&gt;&lt;P&gt;    IMPORTING&lt;/P&gt;&lt;P&gt;      sent_to_all                = w_sent_all&lt;/P&gt;&lt;P&gt;    TABLES&lt;/P&gt;&lt;P&gt;      packing_list               = t_packing_list&lt;/P&gt;&lt;P&gt;      contents_bin               = t_attachment&lt;/P&gt;&lt;P&gt;      contents_txt               = it_message&lt;/P&gt;&lt;P&gt;      receivers                  = t_receivers&lt;/P&gt;&lt;P&gt;    EXCEPTIONS&lt;/P&gt;&lt;P&gt;      too_many_receivers         = 1&lt;/P&gt;&lt;P&gt;      document_not_sent          = 2&lt;/P&gt;&lt;P&gt;      document_type_not_exist    = 3&lt;/P&gt;&lt;P&gt;      operation_no_authorization = 4&lt;/P&gt;&lt;P&gt;      parameter_error            = 5&lt;/P&gt;&lt;P&gt;      x_error                    = 6&lt;/P&gt;&lt;P&gt;      enqueue_error              = 7&lt;/P&gt;&lt;P&gt;      OTHERS                     = 8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 04:42:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-commit-work-in-sending-mail-using-fm/m-p/8263500#M1632349</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-11T04:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: how to avoid COMMIT WORK in sending mail using FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-commit-work-in-sending-mail-using-fm/m-p/8263501#M1632350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much Suhas, The problem is solved .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way also for CL_BCS send method? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Madhuri s&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: madhuri sonawane on Oct 11, 2011 10:56 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 05:21:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-commit-work-in-sending-mail-using-fm/m-p/8263501#M1632350</guid>
      <dc:creator>Madhurivs23</dc:creator>
      <dc:date>2011-10-11T05:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to avoid COMMIT WORK in sending mail using FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-commit-work-in-sending-mail-using-fm/m-p/8263502#M1632351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Suhas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do we really need to call this function module in NEW TASK with commit option ? If there is an implicit commit happening after the enhancement, I think calling the function module / CL_BCS (without calling explicity COMMIT) will trigger the mail after successful completion of transaction.  &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately I am not able to simulate the scenario in current system. Generated mail is appearing in SOST without commit, but waiting for transmission as my Mail server is not configured. (or is it due to absence of explicity commit? )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Vinod&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2011 05:47:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-commit-work-in-sending-mail-using-fm/m-p/8263502#M1632351</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-10-11T05:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: how to avoid COMMIT WORK in sending mail using FM</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-commit-work-in-sending-mail-using-fm/m-p/14093239#M2041745</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;how did you solve this problem please&lt;/P&gt;</description>
      <pubDate>Mon, 05 May 2025 10:13:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-avoid-commit-work-in-sending-mail-using-fm/m-p/14093239#M2041745</guid>
      <dc:creator>ANISMEZNI</dc:creator>
      <dc:date>2025-05-05T10:13:39Z</dc:date>
    </item>
  </channel>
</rss>

