<?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: Performace Which is better ?  : Bapi inside a loop OR Select from Tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performace-which-is-better-bapi-inside-a-loop-or-select-from-tables/m-p/6774371#M1463608</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dependent's on you requirement again..coz if you want only selected data in report the BAPI will fetch unnecessery data also and you also can check if the BAPI has parameter for fetching Specific data if it suffice your requirement ..but again you can filter the data if you directly access table s by  having a strong selection criteria ..!&lt;/P&gt;&lt;P&gt;you can very well try using in SE30&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Anup Deshmukh on Mar 30, 2010 6:51 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 30 Mar 2010 04:51:26 GMT</pubDate>
    <dc:creator>anup_deshmukh4</dc:creator>
    <dc:date>2010-03-30T04:51:26Z</dc:date>
    <item>
      <title>Performace Which is better ?  : Bapi inside a loop OR Select from Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performace-which-is-better-bapi-inside-a-loop-or-select-from-tables/m-p/6774369#M1463606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a report which displays purchase info records. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I am selecting from tables i need to use EINA, EINE, EORD and some other tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a BAPI which gets all purchase info records specific to a vendor , material , purchasing organisation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;QUESTION: Performace wise which is the better Approach, either selecting from tables or BAPI for Purchase info records&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Avi.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Mar 2010 04:45:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performace-which-is-better-bapi-inside-a-loop-or-select-from-tables/m-p/6774369#M1463606</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-30T04:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Performace Which is better ?  : Bapi inside a loop OR Select from Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performace-which-is-better-bapi-inside-a-loop-or-select-from-tables/m-p/6774370#M1463607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are able to get all the details from 1 bapi then you can go with&lt;/P&gt;&lt;P&gt;that option instead of using select on multiple tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also check the trace difference between both using SM30 transaction.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Mar 2010 04:49:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performace-which-is-better-bapi-inside-a-loop-or-select-from-tables/m-p/6774370#M1463607</guid>
      <dc:creator>GauthamV</dc:creator>
      <dc:date>2010-03-30T04:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: Performace Which is better ?  : Bapi inside a loop OR Select from Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performace-which-is-better-bapi-inside-a-loop-or-select-from-tables/m-p/6774371#M1463608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dependent's on you requirement again..coz if you want only selected data in report the BAPI will fetch unnecessery data also and you also can check if the BAPI has parameter for fetching Specific data if it suffice your requirement ..but again you can filter the data if you directly access table s by  having a strong selection criteria ..!&lt;/P&gt;&lt;P&gt;you can very well try using in SE30&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Anup Deshmukh on Mar 30, 2010 6:51 AM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Mar 2010 04:51:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performace-which-is-better-bapi-inside-a-loop-or-select-from-tables/m-p/6774371#M1463608</guid>
      <dc:creator>anup_deshmukh4</dc:creator>
      <dc:date>2010-03-30T04:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Performace Which is better ?  : Bapi inside a loop OR Select from Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performace-which-is-better-bapi-inside-a-loop-or-select-from-tables/m-p/6774372#M1463609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gautam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I am using BAPI i need to use it inside a LOOP, so is it advicable?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Avi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Mar 2010 04:52:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performace-which-is-better-bapi-inside-a-loop-or-select-from-tables/m-p/6774372#M1463609</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-30T04:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: Performace Which is better ?  : Bapi inside a loop OR Select from Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performace-which-is-better-bapi-inside-a-loop-or-select-from-tables/m-p/6774373#M1463610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Whether it using BAPI or select. you need to check the performance. If you have full key for these tables EINA, EINE, EORD  then mak a select outside of the loop and within loop use READ TABLE statement with binary search. of if you want multiple records within loop then use loop insdie loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your final objective is to minimise the database hits . If you use bapi inside loop then your database hits will be more&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
select from EINA
select from EINE
select from EORD
loop at itab,
  read table EINA
  read table EINE
  read table EORD
endloop
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a®&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Mar 2010 04:57:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performace-which-is-better-bapi-inside-a-loop-or-select-from-tables/m-p/6774373#M1463610</guid>
      <dc:creator>former_member194669</dc:creator>
      <dc:date>2010-03-30T04:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: Performace Which is better ?  : Bapi inside a loop OR Select from Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performace-which-is-better-bapi-inside-a-loop-or-select-from-tables/m-p/6774374#M1463611</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;Check the run time analysis for both cases. You are saying that you need to pick up data from 4 tables. Hence, you should be able to write a better select query using JOINs which should not cause much performance drain.Instead of picking data from the tables each time in a loop , i feel its better to fetch the data from the tables at one go using SELECT.Run SM30 and check Database time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lakshman.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Mar 2010 04:57:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performace-which-is-better-bapi-inside-a-loop-or-select-from-tables/m-p/6774374#M1463611</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-30T04:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Performace Which is better ?  : Bapi inside a loop OR Select from Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performace-which-is-better-bapi-inside-a-loop-or-select-from-tables/m-p/6774375#M1463612</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;yes you can use BAPI inside a loop..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and its give u better performance then a select statement ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;RItesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 Mar 2010 04:59:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performace-which-is-better-bapi-inside-a-loop-or-select-from-tables/m-p/6774375#M1463612</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-03-30T04:59:15Z</dc:date>
    </item>
  </channel>
</rss>

