<?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 Local inside function module in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-local-inside-function-module/m-p/10279025#M1831813</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, by bad.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I meant&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;CALL &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;FUNCTION &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'Z...' &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;IN &lt;/SPAN&gt;BACKGROUND &lt;SPAN class="L0S52"&gt;TASK &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;AS &lt;/SPAN&gt;SEPARATE &lt;SPAN class="L0S52"&gt;UNIT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I usually mistype it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Edgar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 May 2014 12:33:54 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2014-05-12T12:33:54Z</dc:date>
    <item>
      <title>Commit work Local inside function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-local-inside-function-module/m-p/10279019#M1831807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an FM where in i am modifying few data in data base . For this i am using modify statement. I have written commit work inside this FM soon after this Modify statement to avoid any possibility of not updating this table. Now this FM is called from many places and there are many update function module which are in stack .&lt;/P&gt;&lt;P&gt;Please provide syantax to use Commit work only for this FM which should not affect the Update function module stack.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Nikhil Kulkarni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 10:31:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-local-inside-function-module/m-p/10279019#M1831807</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-05-12T10:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: Commit work Local inside function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-local-inside-function-module/m-p/10279020#M1831808</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't you use the Call function in update task as v1 or v2 .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this way the other update function modules will not be commited and this will be added to queue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Sree&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 11:42:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-local-inside-function-module/m-p/10279020#M1831808</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-05-12T11:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: Commit work Local inside function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-local-inside-function-module/m-p/10279021#M1831809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sreevisakh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; this is normal Function module which is being called from many places for immegiate execution. This is also configured in few Workflows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Problem is there is a Commit work statement written inside it for after modify statement to ensure that entry gets succesfully modified in DB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i want to keep this commit work local to this function module only. I.E i dont want to execute the Update function module stack.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET LOCL , some thing like this, is there any Key word ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Nikhil Kulkarni&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 11:48:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-local-inside-function-module/m-p/10279021#M1831809</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-05-12T11:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: Commit work Local inside function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-local-inside-function-module/m-p/10279022#M1831810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Nikhil,&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;I have written commit work inside this FM soon after this Modify statement to avoid any possibility of not updating this table.&lt;/P&gt;


&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IMO the best way to ensure the integrity of the SAP transaction is to bundle the DB changes of the table(read: in concern) together with other DB updates. This will maintain the "atomicity" of the SAP transaction, i.e., either all or none of the changes are registered in the DB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Think of the scenario when the SAP transaction fails but your table gets updated, how would you handle it? &lt;SPAN __jive_emoticon_name="confused" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/776/images/emoticons/confused.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Afaik there is no way you can keep the update local to your FM if it is being executed in the same LUW as others. COMMIT will end the current SAP LUW and trigger the bundled DB updates &lt;SPAN __jive_emoticon_name="plain" __jive_macro_name="emoticon" class="jive_macro jive_emote" src="https://community.sap.com/776/images/emoticons/plain.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can provide the business logic you are trying to achieve may be the forum can provide some suitable workaround.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 12:04:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-local-inside-function-module/m-p/10279022#M1831810</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2014-05-12T12:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: Commit work Local inside function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-local-inside-function-module/m-p/10279023#M1831811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nikhil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can start a new LUW with instruction starting new task of call function, inside it you can have your "local" commit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Like &lt;A _jive_internal="true" href="https://answers.sap.com/people/suhas.saha"&gt;Suhas Saha&lt;/A&gt; I don't agree with this type of approach by rule, the update should be dependent on the success of your main process execution. Of course I don't know the process so I admit it might be an exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Edgar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 12:13:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-local-inside-function-module/m-p/10279023#M1831811</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-05-12T12:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: Commit work Local inside function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-local-inside-function-module/m-p/10279024#M1831812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;You can start a new LUW with instruction starting new task of call function, inside it you can have your "local" commit.&lt;/P&gt;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But if you trigger an aRFC a database commit will be executed. (Ref. - &lt;A href="http://help.sap.com/abapdocu_740/en/abapcall_function_starting.htm" title="http://help.sap.com/abapdocu_740/en/abapcall_function_starting.htm"&gt;http://help.sap.com/abapdocu_740/en/abapcall_function_starting.htm&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't think this can solve the OP's problem. I would rather suggest a tRFC or a bgRFC. Anyway let's wait for the business logic the OP wants to achieve.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 12:18:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-local-inside-function-module/m-p/10279024#M1831812</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2014-05-12T12:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: Commit work Local inside function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-local-inside-function-module/m-p/10279025#M1831813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, by bad.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I meant&lt;/P&gt;&lt;P&gt;&lt;SPAN class="L0S52"&gt;CALL &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;FUNCTION &lt;/SPAN&gt;&lt;SPAN class="L0S33"&gt;'Z...' &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;IN &lt;/SPAN&gt;BACKGROUND &lt;SPAN class="L0S52"&gt;TASK &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;AS &lt;/SPAN&gt;SEPARATE &lt;SPAN class="L0S52"&gt;UNIT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I usually mistype it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Edgar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 May 2014 12:33:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-local-inside-function-module/m-p/10279025#M1831813</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-05-12T12:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Commit work Local inside function module</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-local-inside-function-module/m-p/10279026#M1831814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nikhil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure if there is any keywork other than commit work, to make sure whether database updated or not. But if you use commit work it will update the whole LUW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In some case system need some times to update the database, to make sure database is updated you may use the below logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;DO &lt;SPAN class="L0S32"&gt;5 &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TIMES&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S31"&gt;**** Write select query to make sure data is there in DB&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &lt;SPAN class="L0S52"&gt;SELECT &lt;/SPAN&gt;xyz &lt;SPAN class="L0S52"&gt;FROM &lt;/SPAN&gt;abc&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;INTO &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TABLE &lt;/SPAN&gt;lt_tab&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;WHERE &lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;( &lt;/SPAN&gt;your CONDITION&lt;SPAN class="L0S55"&gt;)&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &lt;SPAN class="L0S52"&gt;IF &lt;/SPAN&gt;sy&lt;SPAN class="L0S70"&gt;-&lt;/SPAN&gt;subrc &lt;SPAN class="L0S55"&gt;= &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;0&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;EXIT&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &lt;SPAN class="L0S52"&gt;ELSE&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="L0S52"&gt;WAIT &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;UP &lt;/SPAN&gt;&lt;SPAN class="L0S52"&gt;TO &lt;/SPAN&gt;&lt;SPAN class="L0S32"&gt;2 &lt;/SPAN&gt;SECONDS&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &lt;SPAN class="L0S52"&gt;ENDIF&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="L0S52"&gt;ENDDO&lt;/SPAN&gt;&lt;SPAN class="L0S55"&gt;.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2014 06:10:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-local-inside-function-module/m-p/10279026#M1831814</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-05-13T06:10:34Z</dc:date>
    </item>
  </channel>
</rss>

