<?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 over BDC performence perspective? in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-over-bdc-performence-perspective/m-p/8793425#M1679377</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;Why don't you create a copy of this code and make the necessary changes and test it? In that case the other people who use the code will not be affected and if your code turns out better then you can implement it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your second question, I will not recommend running a DO loop for 1000 times with a select statement inside it. This means that each time the loop runs your program accesses the database which shouldn't be done. It is recommended that, Select statement that accesses a particular table should access it just once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please mark as correct or helpful answer if found fruitful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 Jun 2012 05:39:25 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2012-06-07T05:39:25Z</dc:date>
    <item>
      <title>BAPI over BDC performence perspective?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-over-bdc-performence-perspective/m-p/8793423#M1679375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to do performence tuning a RFC function module, thisRFC is creating sales orders from contracts by using BDC for VA01, well.&lt;/P&gt;&lt;P&gt;If the sales order is created in this BDC, in next step, we are changing the ship-to address by using VA02 BDC.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obviously we have n number of custom code in SAPMV45A user-exits, but, i guess, these user-exits will be triggered based on scenarion (like maintaining flags, validations), pls. let me know&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) In performence perspective, do i need to change this BDC into BAPI (i knew BAPI is always recommendable, but, this RFC is widely used in many case, so, ppl scare to change the code code)? if it results very very good performce, then its worth, other wise, if its a little betterment, i guess, its not worthy bcz its widely used&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) There is check on VBAK after VA01 BDC that, whetehr the sales order is created in the system, for that we are using WAIT UPTO 5 SECONDS, but, am thnking to use the below code,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: comic sans ms,sans-serif;"&gt;DO 1000 TIMES&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: comic sans ms,sans-serif;"&gt; SLEECT SINGLE auart&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: comic sans ms,sans-serif;"&gt;&amp;nbsp; INTO lv_auart&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: comic sans ms,sans-serif;"&gt;&amp;nbsp; FROM vbak&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: comic sans ms,sans-serif;"&gt;&amp;nbsp; WHERE vbeln = lv_VA01_BDC_created_new_order&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, in performce perspective, which is best, either WAIT UP TO or DO LOOP?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 14:13:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-over-bdc-performence-perspective/m-p/8793423#M1679375</guid>
      <dc:creator>former_member202077</dc:creator>
      <dc:date>2012-06-06T14:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI over BDC performence perspective?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-over-bdc-performence-perspective/m-p/8793424#M1679376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any replies experts pls.?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2012 17:23:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-over-bdc-performence-perspective/m-p/8793424#M1679376</guid>
      <dc:creator>former_member202077</dc:creator>
      <dc:date>2012-06-06T17:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI over BDC performence perspective?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-over-bdc-performence-perspective/m-p/8793425#M1679377</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;Why don't you create a copy of this code and make the necessary changes and test it? In that case the other people who use the code will not be affected and if your code turns out better then you can implement it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your second question, I will not recommend running a DO loop for 1000 times with a select statement inside it. This means that each time the loop runs your program accesses the database which shouldn't be done. It is recommended that, Select statement that accesses a particular table should access it just once.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please mark as correct or helpful answer if found fruitful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2012 05:39:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-over-bdc-performence-perspective/m-p/8793425#M1679377</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2012-06-07T05:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: BAPI over BDC performence perspective?</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-over-bdc-performence-perspective/m-p/8793426#M1679378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I would not expect a huge difference between batch input and BAPI performance. But still, I do recommend to switch to BAPI calls. It has less overhead (dynpro processing) and has better maintainability/readability. What is also important for you, is the ugly "wait up to 5 seconds" statement can be removed. Changing of the ship-to party address should also be faster with change BAPI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you switch to BAPI, you'll need to call "BAPI_TRANSACTION_COMMIT" function after the call with "wait" flag, thus making sure that the changes are committed (at least V1 updates).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do not want to invest time/effort for rewriting your code and testing, I can suggest you one relatively small change. Your idea with 1000 selects is very bad. Never ever do it like this, especially without waits inbetween. &lt;/P&gt;&lt;P&gt;Instead, batch input (CALL TRANSACTION statement) allows using UPDATE 'S' flag which makes sure that the commit is finished. If you use it, you will not need "WAIT UP TO 5 SECONDS" anymore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Yuri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Jun 2012 07:32:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/bapi-over-bdc-performence-perspective/m-p/8793426#M1679378</guid>
      <dc:creator>yuri_ziryukin</dc:creator>
      <dc:date>2012-06-07T07:32:35Z</dc:date>
    </item>
  </channel>
</rss>

