<?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 do a commit from update task mode. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-do-a-commit-from-update-task-mode/m-p/524393#M18981</link>
    <description>&lt;P&gt;Hi guys!&lt;/P&gt;
  &lt;P&gt;I have a problem, inside a function module called in update task mode I need to add a record to a Z table and do a commit so its available in a step later in the same process.&lt;/P&gt;
  &lt;P&gt;If I do a commit, I get a dump because you can't do that. I tried another thing, to call another function module as a new task and inside this FM add the insert and the commit. It's not doing anything. &lt;/P&gt;
  &lt;P&gt;Code works because if I execute the first FM from SE37 as a normal FM, the records is added to the table.&lt;/P&gt;
  &lt;P&gt;So, is there a way to add a record to a table and do the correspondent commit inside a FM called in update task mode? Keep in mind that I'm doing a select to retrieve this record in a posterior step, that's why I need it, I'm adding functionality to an existing program and trying to modify as little as I can. &lt;/P&gt;
  &lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
    <pubDate>Wed, 06 Sep 2017 19:47:15 GMT</pubDate>
    <dc:creator>bettinasilveira</dc:creator>
    <dc:date>2017-09-06T19:47:15Z</dc:date>
    <item>
      <title>How to do a commit from update task mode.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-do-a-commit-from-update-task-mode/m-p/524393#M18981</link>
      <description>&lt;P&gt;Hi guys!&lt;/P&gt;
  &lt;P&gt;I have a problem, inside a function module called in update task mode I need to add a record to a Z table and do a commit so its available in a step later in the same process.&lt;/P&gt;
  &lt;P&gt;If I do a commit, I get a dump because you can't do that. I tried another thing, to call another function module as a new task and inside this FM add the insert and the commit. It's not doing anything. &lt;/P&gt;
  &lt;P&gt;Code works because if I execute the first FM from SE37 as a normal FM, the records is added to the table.&lt;/P&gt;
  &lt;P&gt;So, is there a way to add a record to a table and do the correspondent commit inside a FM called in update task mode? Keep in mind that I'm doing a select to retrieve this record in a posterior step, that's why I need it, I'm adding functionality to an existing program and trying to modify as little as I can. &lt;/P&gt;
  &lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2017 19:47:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-do-a-commit-from-update-task-mode/m-p/524393#M18981</guid>
      <dc:creator>bettinasilveira</dc:creator>
      <dc:date>2017-09-06T19:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a commit from update task mode.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-do-a-commit-from-update-task-mode/m-p/524394#M18982</link>
      <description>&lt;P&gt;How exactly is the later step performed? Read consistency means your select should already 'see' the new data if it is in the same LUW, So im wondering whether there's some caching or something involved or it's going into another LUW?&lt;/P&gt;
  &lt;P&gt;Alternatively, is it possible to transport the updated info to the later step? Perhaps using a static class attribute or something like that.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2017 20:56:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-do-a-commit-from-update-task-mode/m-p/524394#M18982</guid>
      <dc:creator>pokrakam</dc:creator>
      <dc:date>2017-09-06T20:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a commit from update task mode.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-do-a-commit-from-update-task-mode/m-p/524395#M18983</link>
      <description>&lt;P&gt;"Later step" is in the same process, same function module, same LUW. I could save the info to memory, but I'm trying to not alter the code so much. If that's the only option I have, I guess there's no other way. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2017 21:05:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-do-a-commit-from-update-task-mode/m-p/524395#M18983</guid>
      <dc:creator>bettinasilveira</dc:creator>
      <dc:date>2017-09-06T21:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a commit from update task mode.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-do-a-commit-from-update-task-mode/m-p/524396#M18984</link>
      <description>&lt;P&gt;Hmmm, it does make me wonder whether the program logic is optimal if we are writing to and then reading from the same table in the same code unit? It does sound a bit unusual.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2017 21:21:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-do-a-commit-from-update-task-mode/m-p/524396#M18984</guid>
      <dc:creator>pokrakam</dc:creator>
      <dc:date>2017-09-06T21:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a commit from update task mode.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-do-a-commit-from-update-task-mode/m-p/524397#M18985</link>
      <description>&lt;P&gt;&lt;/P&gt;
  &lt;P&gt; Try:&lt;/P&gt;
  &lt;P&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'&lt;BR /&gt; EXPORTING&lt;BR /&gt; wait = 'X'.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2017 23:29:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-do-a-commit-from-update-task-mode/m-p/524397#M18985</guid>
      <dc:creator>vera_kulish2</dc:creator>
      <dc:date>2017-09-06T23:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a commit from update task mode.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-do-a-commit-from-update-task-mode/m-p/524398#M18986</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;
  &lt;P&gt;You can do a Commit after call the FM in update task mode, so the FM will be execute and add the record, but in fact it is the same as call the FM in normal way. &lt;/P&gt;
  &lt;P&gt;Best regards. &lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2017 06:19:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-do-a-commit-from-update-task-mode/m-p/524398#M18986</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-09-07T06:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a commit from update task mode.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-do-a-commit-from-update-task-mode/m-p/524399#M18987</link>
      <description>&lt;P&gt;Then why do you do an explicit COMMIT at all?&lt;/P&gt;
  &lt;P&gt;If you change a DB table, the change is visible in "the same process, same function module, same (DB-)LUW". Or do I miss something?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2017 07:24:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-do-a-commit-from-update-task-mode/m-p/524399#M18987</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-09-07T07:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a commit from update task mode.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-do-a-commit-from-update-task-mode/m-p/524400#M18988</link>
      <description>&lt;P&gt;If you read my original post, I need to do a commit INSIDE the FM, not after.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2017 13:37:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-do-a-commit-from-update-task-mode/m-p/524400#M18988</guid>
      <dc:creator>bettinasilveira</dc:creator>
      <dc:date>2017-09-07T13:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a commit from update task mode.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-do-a-commit-from-update-task-mode/m-p/524401#M18989</link>
      <description>&lt;P&gt;But why an explicit commit? Inside an update FM and everything called there you are by default inside a DB LUW. There are no rollbacks, only in case of errors.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2017 14:33:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-do-a-commit-from-update-task-mode/m-p/524401#M18989</guid>
      <dc:creator>retired_member</dc:creator>
      <dc:date>2017-09-07T14:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to do a commit from update task mode.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-do-a-commit-from-update-task-mode/m-p/524402#M18990</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;The code which you are using to update the z table, place it in a RFC enabled function module and write a commit statement inside this RFC enabled FM.&lt;/P&gt;
  &lt;P&gt; Call this RFC enabled FM from the main program or FM as DESTIANTION 'NONE'.&lt;/P&gt;
  &lt;P&gt; EG: CALL FUNCTION '&amp;lt;RFC ENABLED FM&amp;gt;' DESTINATION 'NONE'.&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;In this way you can avoid dump and you can update the z table.&lt;/P&gt;
  &lt;P&gt; Refer notes 1895298, 896173&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2017 01:50:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-do-a-commit-from-update-task-mode/m-p/524402#M18990</guid>
      <dc:creator>former_member507110</dc:creator>
      <dc:date>2017-09-08T01:50:16Z</dc:date>
    </item>
  </channel>
</rss>

