<?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 COMMIT WORK with addition AND WAIT in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-with-addition-and-wait/m-p/12593101#M2010355</link>
    <description>&lt;P&gt;Consider the following statement:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;DATA(ls_mara) = VALUE mara( matnr = 'TEST_10000' ).
INSERT mara FROM ls_mara.
COMMIT WORK AND WAIT.

SELECT SINGLE FROM mara
  FIELDS *
  WHERE matnr EQ 'TEST_10000'
  INTO @DATA(ls_result).

[...]&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;We want to make sure - after the INSERT - that the record had been written to the db table and only after that want to proceed with the following statements. LS_RESULT shouldn't be empty after the SELECT.&lt;/P&gt;
  &lt;P&gt;- Would a COMMIT WORK be even necessary or would the INSERT be already enough?&lt;/P&gt;
  &lt;P&gt;- Is the AND WAIT addition of any use in this scenario? (no usage of UPDATE IN TASK, just plain procedual processing)&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jul 2022 16:27:16 GMT</pubDate>
    <dc:creator>MariusRaht</dc:creator>
    <dc:date>2022-07-28T16:27:16Z</dc:date>
    <item>
      <title>COMMIT WORK with addition AND WAIT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-with-addition-and-wait/m-p/12593101#M2010355</link>
      <description>&lt;P&gt;Consider the following statement:&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;DATA(ls_mara) = VALUE mara( matnr = 'TEST_10000' ).
INSERT mara FROM ls_mara.
COMMIT WORK AND WAIT.

SELECT SINGLE FROM mara
  FIELDS *
  WHERE matnr EQ 'TEST_10000'
  INTO @DATA(ls_result).

[...]&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;We want to make sure - after the INSERT - that the record had been written to the db table and only after that want to proceed with the following statements. LS_RESULT shouldn't be empty after the SELECT.&lt;/P&gt;
  &lt;P&gt;- Would a COMMIT WORK be even necessary or would the INSERT be already enough?&lt;/P&gt;
  &lt;P&gt;- Is the AND WAIT addition of any use in this scenario? (no usage of UPDATE IN TASK, just plain procedual processing)&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 16:27:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-with-addition-and-wait/m-p/12593101#M2010355</guid>
      <dc:creator>MariusRaht</dc:creator>
      <dc:date>2022-07-28T16:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: COMMIT WORK with addition AND WAIT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-with-addition-and-wait/m-p/12593102#M2010356</link>
      <description>&lt;P&gt;If you do the INSERT and SELECT in the same DB LUW, you don't need to commit immediately. It must be done at the moment when all insert/updates are in a consistent state.&lt;/P&gt;&lt;P&gt;No need of AND WAIT. Even COMMIT WORK is excessive, because it does many more things than just a DB Commit (transactional/queue RFC, update task, etc.)&lt;/P&gt;&lt;P&gt;Just look at the ABAP documentation to understand what means COMMIT WORK.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 17:01:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-with-addition-and-wait/m-p/12593102#M2010356</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2022-07-28T17:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: COMMIT WORK with addition AND WAIT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-with-addition-and-wait/m-p/12593103#M2010357</link>
      <description>&lt;P&gt;Off topic, but inserting directly into MARA? Why?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 07:02:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-with-addition-and-wait/m-p/12593103#M2010357</guid>
      <dc:creator>matt</dc:creator>
      <dc:date>2022-07-29T07:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: COMMIT WORK with addition AND WAIT</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-with-addition-and-wait/m-p/12593104#M2010358</link>
      <description>&lt;P&gt;faster than BAPI ...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 07:30:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/commit-work-with-addition-and-wait/m-p/12593104#M2010358</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2022-07-29T07:30:58Z</dc:date>
    </item>
  </channel>
</rss>

