<?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: Commit Work in main program / Function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-main-program-function-module/m-p/7851147#M1591972</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's possible, but the question is what FM you are using. &lt;/P&gt;&lt;P&gt;You have to make sure, that the FM does not commit its work inside. If it is a SAP function module and if it executes commit, then there is nothing you can do, because you cannot change itu2019s code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if you are using FM which doesn't execute commit or this is a customer function module, which you can change (with all restrictions related to that), then you can call the commit after checking the sy-subrc value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 May 2011 09:33:39 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2011-05-06T09:33:39Z</dc:date>
    <item>
      <title>Commit Work in main program / Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-main-program-function-module/m-p/7851145#M1591970</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;Is it possible to call a function module and insert / update records within that function module and later commit work / Rollback work in the calling program instead of within the function module?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is because I want to implement parallel processing by calling RFC function. In this function I'm updating records to database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to check that all the records are processed in all the calls to the FM and then later commit / rollback finally in the calling program?&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;Sriram&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 08:41:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-main-program-function-module/m-p/7851145#M1591970</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-06T08:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Commit Work in main program / Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-main-program-function-module/m-p/7851146#M1591971</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;Yes U can do that.,  After function module u can commit or roll back.., make sure that the last statement in Function module is the insert or update or whatever it is related to database statement., and in your program after function module check sy-subrc and then commit or roll back..,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps u.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; Regards&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 09:21:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-main-program-function-module/m-p/7851146#M1591971</guid>
      <dc:creator>Kiran_Valluru</dc:creator>
      <dc:date>2011-05-06T09:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: Commit Work in main program / Function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-main-program-function-module/m-p/7851147#M1591972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's possible, but the question is what FM you are using. &lt;/P&gt;&lt;P&gt;You have to make sure, that the FM does not commit its work inside. If it is a SAP function module and if it executes commit, then there is nothing you can do, because you cannot change itu2019s code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if you are using FM which doesn't execute commit or this is a customer function module, which you can change (with all restrictions related to that), then you can call the commit after checking the sy-subrc value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 May 2011 09:33:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-in-main-program-function-module/m-p/7851147#M1591972</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-05-06T09:33:39Z</dc:date>
    </item>
  </channel>
</rss>

