<?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: performance about vbfa in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-about-vbfa/m-p/10564166#M1858538</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is supported by abap&lt;/P&gt;&lt;P&gt;1. using condition in lt_vbfa to fetch data&lt;/P&gt;&lt;P&gt;2. move the result into lv_vbfa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Sep 2014 10:04:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2014-09-26T10:04:50Z</dc:date>
    <item>
      <title>performance about vbfa</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-about-vbfa/m-p/10564162#M1858534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DATA: LT_VBFA TYPE STANDARD TABLE OF VBFA WITH HEADER LINE.&lt;/P&gt;&lt;P&gt;LT_VBFA-VBELN = '0086152431'.&lt;/P&gt;&lt;P&gt;LT_VBFA-POSNN = 10.&lt;/P&gt;&lt;P&gt;APPEND LT_VBFA.&lt;/P&gt;&lt;P&gt;LT_VBFA-POSNN = 20.&lt;/P&gt;&lt;P&gt;APPEND LT_VBFA.&lt;/P&gt;&lt;P&gt;LT_VBFA-POSNN = 30.&lt;/P&gt;&lt;P&gt;APPEND LT_VBFA.&lt;/P&gt;&lt;P&gt;LT_VBFA-POSNN = 40.&lt;/P&gt;&lt;P&gt;APPEND LT_VBFA.&lt;/P&gt;&lt;P&gt;LT_VBFA-POSNN = 50.&lt;/P&gt;&lt;P&gt;APPEND LT_VBFA.&lt;/P&gt;&lt;P&gt;LT_VBFA-POSNN = 60.&lt;/P&gt;&lt;P&gt;APPEND LT_VBFA.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select * into corresponding fields of table lt_vbfa&lt;/P&gt;&lt;P&gt;from vbfa&lt;/P&gt;&lt;P&gt;for all entries in lt_vbfa&lt;/P&gt;&lt;P&gt;where vbeln = lt_vbfa-vbeln and posnn = lt_vbfa-posnn and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VBTYP_V = 'C'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dear: all.&lt;/P&gt;&lt;P&gt;in the prd system,i used t-code 'SE30‘ ,test the performance of vbfa&amp;nbsp; with previous code&lt;/P&gt;&lt;P&gt;i Excute the code a few times,the Runtime is about 2,300,000 microseconds, that is about 2 seconds&lt;/P&gt;&lt;P&gt;but actually, from i click the button "mesure runtime" , to the system show how much time spend, at least 2~3 Minutes gone&lt;/P&gt;&lt;P&gt;why?&lt;/P&gt;&lt;P&gt;should i create a index for vbfa using vbeln posnn and vbtyp_v?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2014 16:42:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-about-vbfa/m-p/10564162#M1858534</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-09-25T16:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: performance about vbfa</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-about-vbfa/m-p/10564163#M1858535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;I am not understanding your code, you are selecting into internal table lt_vbfa and using the 'for all entries in' statement with the same internal table lt_vbfa. &lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;Are you missing any 'loop at it' statement here ?&lt;SPAN __jive_emoticon_name="confused" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/1024/images/emoticons/confused.gif"&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Regards,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Philip&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2014 16:58:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-about-vbfa/m-p/10564163#M1858535</guid>
      <dc:creator>philipdavy</dc:creator>
      <dc:date>2014-09-25T16:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: performance about vbfa</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-about-vbfa/m-p/10564164#M1858536</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;While using For All entries statement, SAP will break down your entries in this section to a number 5 as default and will query the database that time of times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for e.g if you have 1000 data in ur table, system will query the database 1000/5 times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;solution for this would be using range instead of for all entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it will fetch the data with only one database call.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Sep 2014 18:25:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-about-vbfa/m-p/10564164#M1858536</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-09-25T18:25:20Z</dc:date>
    </item>
    <item>
      <title>Re: performance about vbfa</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-about-vbfa/m-p/10564165#M1858537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes, it is easy to get what you said using st05, "&lt;SPAN style="color: #333333; font-size: 12px;"&gt;for e.g if you have 1000 data in ur table, system will query the database 1000/5 times.&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;my question is why the system report runtime is 2 seconds while the actually time spend to excute the code in se30 is 3 minutes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 10:03:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-about-vbfa/m-p/10564165#M1858537</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-09-26T10:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: performance about vbfa</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-about-vbfa/m-p/10564166#M1858538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;this is supported by abap&lt;/P&gt;&lt;P&gt;1. using condition in lt_vbfa to fetch data&lt;/P&gt;&lt;P&gt;2. move the result into lv_vbfa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 10:04:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-about-vbfa/m-p/10564166#M1858538</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-09-26T10:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: performance about vbfa</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-about-vbfa/m-p/10564167#M1858539</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;Please check your code!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- why you are reading and using the lt_vbfa in code. It is not required and remove the statement.&lt;/P&gt;&lt;P&gt; - Are you really looking for all fields in VBFA...try to avoid * and use required fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- You are already using the secondary index! &lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/550430" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check your code once again and there are FM's are available to read VBFA , please check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BG,&lt;/P&gt;&lt;P&gt;Kiran&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 10:16:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-about-vbfa/m-p/10564167#M1858539</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-09-26T10:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: performance about vbfa</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-about-vbfa/m-p/10564168#M1858540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;Why are you complicating the things ? &lt;SPAN __jive_emoticon_name="confused" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/1024/images/emoticons/confused.gif"&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;What you need is a range table with the some values for POSNN, for that try to create a range table.(rg_posnn)&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;&lt;EM&gt;Then build a select query for VBFA where POSNN in rg_posnn &amp;amp; vbeln = '&lt;/EM&gt;0086152431' &amp;amp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VBTYP_V = 'C'.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;EM&gt;Regards,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Philip.&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 10:22:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-about-vbfa/m-p/10564168#M1858540</guid>
      <dc:creator>philipdavy</dc:creator>
      <dc:date>2014-09-26T10:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: performance about vbfa</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-about-vbfa/m-p/10564169#M1858541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually there is no delivered index on VBFA with key VBELN and POSNN (*), but primary keys start with VBELV and POSNV. So preceeding document is used to search for the subsequent document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could create an index BUT there are usually other solutions, depending on actual type of documents, you shoud access an other table, replacing a wrong SELECT vbelv FROM vbfa WHERE vbeln with either&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
&lt;P&gt;SELECT vgbel FROM lips WHERE vbeln&lt;BR /&gt;SELECT vgbel FROM vbrp WHERE vbeln&lt;BR /&gt;SELECT aubel FROM vbrp WHERE vbeln&lt;/P&gt;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;There is a reference note &lt;A href="http://service.sap.com/sap/support/notes/185530" title="185530  - Performance: Customer developments in SD"&gt;&lt;SPAN class="title"&gt;&lt;SPAN lang="EN-US" style="color: blue;"&gt;185530 - Performance: Customer developments in SD&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;BR /&gt; Raymond&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(*) Business function JMPS_MODIF 'Media: Modifications Media Product Sales' contain such index, but not sure it is activated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 11:02:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-about-vbfa/m-p/10564169#M1858541</guid>
      <dc:creator>RaymondGiuseppi</dc:creator>
      <dc:date>2014-09-26T11:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: performance about vbfa</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-about-vbfa/m-p/10564170#M1858542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agreed, Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 11:07:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-about-vbfa/m-p/10564170#M1858542</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-09-26T11:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: performance about vbfa</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-about-vbfa/m-p/10564171#M1858543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes but the index is switch off&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 13:05:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-about-vbfa/m-p/10564171#M1858543</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-09-26T13:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: performance about vbfa</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-about-vbfa/m-p/10564172#M1858544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes i created a secondary index to solve the performance of reading vbfa&lt;/P&gt;&lt;P&gt;and i also considered your solution before i asked the question&lt;/P&gt;&lt;P&gt;but the first doc is accounting document,then to business document,&lt;/P&gt;&lt;P&gt;such as sales doc, trading doc, even purchase doc.&lt;/P&gt;&lt;P&gt;if using this solution, i have to know where every accounting doc come from,&lt;/P&gt;&lt;P&gt;and what kind of document to be counted,&lt;/P&gt;&lt;P&gt;too much business sense involved, i need a sd consultant to help me&lt;/P&gt;&lt;P&gt;maybe, someday in the future,we will recheck the logic of this report, and overwrite it &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks~&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Sep 2014 13:25:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-about-vbfa/m-p/10564172#M1858544</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-09-26T13:25:28Z</dc:date>
    </item>
  </channel>
</rss>

