<?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: BAPI_TRANSACTION_COMMIT is too slow in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150845#M1977032</link>
    <description>&lt;P&gt;One can encounter the WAIT addition in ABAP coding way more time then necessary. There was a great article about this topic on &lt;A href="https://webcache.googleusercontent.com/search?q=cache:9jXIViRSH-oJ:https://sapinsider.wispubs.com/Assets/Articles/2003/July/Update-BAPIs-And-Commit-Handling+&amp;amp;cd=1&amp;amp;hl=hu&amp;amp;ct=clnk&amp;amp;gl=hu"&gt;sapinsider&lt;/A&gt;:&lt;/P&gt;&lt;P&gt;"&lt;STRONG&gt;Is It Worth Waiting for the Update Task?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When you pass a space character or an empty string to the Wait parameter, the commit BAPI executes a normal COMMIT WORK and returns control to the client application immediately. In most cases, this is what you want.&lt;/P&gt;&lt;P&gt;When you pass anything else to this parameter (by convention, “X” would be used), the BAPI executes a COMMIT WORK AND WAIT statement (ABAP is a verbose language). This not only causes the Update Task to commence processing the updates written to the Update Log for your session since the last commit or rollback, but it will also wait for the completion of said Update Task and report success or failure in the &lt;CODE&gt;Return&lt;/CODE&gt; parameter.&lt;/P&gt;&lt;P&gt;Doesn’t that sound great? Is that what you should always use? No! Using COMMIT WORK AND WAIT slows down R/3 and should only be used when there is some justification (and paranoia does not count as justification). You might not trust the asynchronous update mechanism in R/3 and may be tempted to use COMMIT WORK AND WAIT just in case something goes wrong. But resist that temptation. In a normal production system, nothing ever goes wrong in the Update Task. This is &lt;EM&gt;not&lt;/EM&gt; why COMMIT WORK AND WAIT was invented.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Only in This Special Case!&lt;/STRONG&gt;&lt;BR /&gt;Let me give you a sample scenario in which COMMIT WORK AND WAIT should actually be used:&lt;/P&gt;&lt;P&gt;Your application first creates a new customer and then wants to create a sales order for that customer. It is not possible to commit these two update BAPIs in a single LUW, since the sales-order creation BAPI would come back with an error message saying that the specified customer number is wrong (remember that the application tables are not updated until COMMIT WORK). So you add the customer, commit, and then add the sales order.&lt;/P&gt;&lt;P&gt;In this type of scenario it makes sense to use COMMIT WORK AND WAIT. Otherwise, if you execute the sales-order creation BAPI too quickly after the customer creation, the Update Task might not be done with the changes for the customer creation, and you would get an error message.&lt;/P&gt;&lt;P&gt;In more general terms: only use COMMIT WORK AND WAIT if you execute more than one update BAPI, and a subsequent BAPI relies on the changes of a previous one."&lt;/P&gt;</description>
    <pubDate>Thu, 19 Mar 2020 15:50:11 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2020-03-19T15:50:11Z</dc:date>
    <item>
      <title>BAPI_TRANSACTION_COMMIT is too slow</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150840#M1977027</link>
      <description>&lt;P&gt;Hi there.&lt;/P&gt;
  &lt;P&gt;I trying to create a client with class &lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;cmd_ei_api=&amp;gt;maintain_bapi&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;After, I execute &lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
        wait = 'X'.&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;When I execute this setence is too slow, but this happens sometimes. Are there any sentence for reduce the runtime?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2020 15:05:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150840#M1977027</guid>
      <dc:creator>former_member664593</dc:creator>
      <dc:date>2020-03-19T15:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_TRANSACTION_COMMIT is too slow</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150841#M1977028</link>
      <description>&lt;P&gt;Check the SM50 transaction, maybe there is a lot of activities in the process UPD. &lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2020 15:09:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150841#M1977028</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2020-03-19T15:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_TRANSACTION_COMMIT is too slow</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150842#M1977029</link>
      <description>&lt;P&gt;Maybe, but this process always would be working. It's possible make parallel processing like solution?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2020 15:22:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150842#M1977029</guid>
      <dc:creator>former_member664593</dc:creator>
      <dc:date>2020-03-19T15:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_TRANSACTION_COMMIT is too slow</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150843#M1977030</link>
      <description>&lt;P&gt;Your program (in foreground) use a DIA, when it tries to save something it uses the UPD. But if you have few UPD and a lot of request, SAP creates a queue of the requests, qnd you wait.&lt;/P&gt;&lt;P&gt;Your Basis Admin could check this&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2020 15:24:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150843#M1977030</guid>
      <dc:creator>FredericGirod</dc:creator>
      <dc:date>2020-03-19T15:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_TRANSACTION_COMMIT is too slow</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150844#M1977031</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;jimmy21&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Depending on your scenario consider dropping:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;      EXPORTING
        wait = 'X'.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This way data will be updated asynchronously and control will be returned to your application fast, without waiting for data update.&lt;/P&gt;&lt;P&gt;That's way SAP implemented UPD and UP2 processes and asynchronous updates in the first place. Try to take advantage of it.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Dominik Tylczynski&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2020 15:35:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150844#M1977031</guid>
      <dc:creator>Dominik_Tylczynski</dc:creator>
      <dc:date>2020-03-19T15:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_TRANSACTION_COMMIT is too slow</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150845#M1977032</link>
      <description>&lt;P&gt;One can encounter the WAIT addition in ABAP coding way more time then necessary. There was a great article about this topic on &lt;A href="https://webcache.googleusercontent.com/search?q=cache:9jXIViRSH-oJ:https://sapinsider.wispubs.com/Assets/Articles/2003/July/Update-BAPIs-And-Commit-Handling+&amp;amp;cd=1&amp;amp;hl=hu&amp;amp;ct=clnk&amp;amp;gl=hu"&gt;sapinsider&lt;/A&gt;:&lt;/P&gt;&lt;P&gt;"&lt;STRONG&gt;Is It Worth Waiting for the Update Task?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;When you pass a space character or an empty string to the Wait parameter, the commit BAPI executes a normal COMMIT WORK and returns control to the client application immediately. In most cases, this is what you want.&lt;/P&gt;&lt;P&gt;When you pass anything else to this parameter (by convention, “X” would be used), the BAPI executes a COMMIT WORK AND WAIT statement (ABAP is a verbose language). This not only causes the Update Task to commence processing the updates written to the Update Log for your session since the last commit or rollback, but it will also wait for the completion of said Update Task and report success or failure in the &lt;CODE&gt;Return&lt;/CODE&gt; parameter.&lt;/P&gt;&lt;P&gt;Doesn’t that sound great? Is that what you should always use? No! Using COMMIT WORK AND WAIT slows down R/3 and should only be used when there is some justification (and paranoia does not count as justification). You might not trust the asynchronous update mechanism in R/3 and may be tempted to use COMMIT WORK AND WAIT just in case something goes wrong. But resist that temptation. In a normal production system, nothing ever goes wrong in the Update Task. This is &lt;EM&gt;not&lt;/EM&gt; why COMMIT WORK AND WAIT was invented.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Only in This Special Case!&lt;/STRONG&gt;&lt;BR /&gt;Let me give you a sample scenario in which COMMIT WORK AND WAIT should actually be used:&lt;/P&gt;&lt;P&gt;Your application first creates a new customer and then wants to create a sales order for that customer. It is not possible to commit these two update BAPIs in a single LUW, since the sales-order creation BAPI would come back with an error message saying that the specified customer number is wrong (remember that the application tables are not updated until COMMIT WORK). So you add the customer, commit, and then add the sales order.&lt;/P&gt;&lt;P&gt;In this type of scenario it makes sense to use COMMIT WORK AND WAIT. Otherwise, if you execute the sales-order creation BAPI too quickly after the customer creation, the Update Task might not be done with the changes for the customer creation, and you would get an error message.&lt;/P&gt;&lt;P&gt;In more general terms: only use COMMIT WORK AND WAIT if you execute more than one update BAPI, and a subsequent BAPI relies on the changes of a previous one."&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2020 15:50:11 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150845#M1977032</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-03-19T15:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_TRANSACTION_COMMIT is too slow</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150846#M1977033</link>
      <description>&lt;P&gt;Kudos &lt;SPAN class="mention-scrubbed"&gt;gabmarian&lt;/SPAN&gt; spot on comment!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2020 15:52:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150846#M1977033</guid>
      <dc:creator>Dominik_Tylczynski</dc:creator>
      <dc:date>2020-03-19T15:52:21Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_TRANSACTION_COMMIT is too slow</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150847#M1977034</link>
      <description>&lt;P&gt;Do an ABAP trace to understand why it's "slow". What is "slow" from your point of view?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2020 16:22:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150847#M1977034</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-03-19T16:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_TRANSACTION_COMMIT is too slow</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150848#M1977035</link>
      <description>&lt;P&gt;This bapi was called from web service, this response with a timeout.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2020 16:56:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150848#M1977035</guid>
      <dc:creator>former_member664593</dc:creator>
      <dc:date>2020-03-19T16:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_TRANSACTION_COMMIT is too slow</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150849#M1977036</link>
      <description>&lt;P&gt;Yes, I did it. I tried with wait = ' ' and wait 'X', but I have the same problem. &lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2020 16:59:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150849#M1977036</guid>
      <dc:creator>former_member664593</dc:creator>
      <dc:date>2020-03-19T16:59:22Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_TRANSACTION_COMMIT is too slow</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150850#M1977037</link>
      <description>&lt;P&gt;A timeout after how much time? What amount of updates are you doing? What does the ABAP trace says?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2020 18:03:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150850#M1977037</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-03-19T18:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_TRANSACTION_COMMIT is too slow</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150851#M1977038</link>
      <description>&lt;P&gt;Timeout occurs after 5 mins, but this happens only any hours' day. I make just a one update. Now service is working fine =/ I can't see trace. You know how can I make to work it always? &lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Mar 2020 21:55:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150851#M1977038</guid>
      <dc:creator>former_member664593</dc:creator>
      <dc:date>2020-03-19T21:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI_TRANSACTION_COMMIT is too slow</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150852#M1977039</link>
      <description>&lt;P&gt;&lt;A href="https://answers.sap.com/users/954872/jimmy21.html"&gt;Jimmy Arnold Moreno Nuñez&lt;/A&gt; I think it's very difficult to make an efficient trace for rare intermittent and non-reproducible issues. Maybe you can use a trace with no side-effect like the ABAP Call Monitor. Anyway, if it's rare, if it's a slow-down of 5 minutes, if you can't reproduce, it's not worth spending time on it.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2020 13:24:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-transaction-commit-is-too-slow/m-p/12150852#M1977039</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-03-20T13:24:18Z</dc:date>
    </item>
  </channel>
</rss>

