<?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: MBEW performance Issue. in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/mbew-performance-issue/m-p/3044891#M720741</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this code itself within a loop?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Nov 2007 13:18:20 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-11-01T13:18:20Z</dc:date>
    <item>
      <title>MBEW performance Issue.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mbew-performance-issue/m-p/3044889#M720739</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;&lt;/P&gt;&lt;P&gt;We are fetching records from mbew table using key fields matnr,bwkey.&lt;/P&gt;&lt;P&gt;When we use for all entries option in select statement the system gets hang.&lt;/P&gt;&lt;P&gt;So we are using concept of package size to increase the performance.&lt;/P&gt;&lt;P&gt;It works fine for minimum no of records but for large no of records it doesnt work.&lt;/P&gt;&lt;P&gt;Kindly guide us thru efficient way to resolve this issu.&lt;/P&gt;&lt;P&gt;The code is attached herewith for your reference&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT * FROM mard&lt;/P&gt;&lt;P&gt;INTO TABLE it_mard_temp package size 400&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_s033&lt;/P&gt;&lt;P&gt;WHERE matnr EQ it_s033-matnr&lt;/P&gt;&lt;P&gt;AND werks EQ it_s033-werks.&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 4.&lt;/P&gt;&lt;P&gt;MESSAGE e002(sy) WITH 'Record not found'.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF it_mard_temp[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT matnr&lt;/P&gt;&lt;P&gt;bwkey&lt;/P&gt;&lt;P&gt;verpr FROM mbew&lt;/P&gt;&lt;P&gt;INTO TABLE it_mbew_temp&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_mard_temp&lt;/P&gt;&lt;P&gt;WHERE matnr = it_mard_temp-matnr&lt;/P&gt;&lt;P&gt;AND bwkey = it_mard_temp-werks.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;append lines of it_mard_temp to it_mard.&lt;/P&gt;&lt;P&gt;append lines of it_mbew_temp to it_mbew.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;refresh: it_mard_temp,it_mbew_temp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endselect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Regards&lt;/P&gt;&lt;P&gt;***************************Point is assured **********************&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2007 09:25:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mbew-performance-issue/m-p/3044889#M720739</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-01T09:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: MBEW performance Issue.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mbew-performance-issue/m-p/3044890#M720740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In my humble opinion I would not go with PACKAGE SIZE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would rather get all my data in one hit and then do an ABAP looping on the internal table to process the other SELECT Query&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would have written something like this.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
do.
DESCRIBE table itab1 line total_length.
APPEND LINES OF itab1 idx1 TO idx2 TO itab2. 

Select &amp;lt;something something&amp;gt;
for all entries in itab2
where &amp;lt;something something&amp;gt;.

* keep clearing this and keep filling it. It's lesser than SELECT ENDSELECT PACKAGE SIZE
clear : itab2[]
          itab2.
* This is just the logic you can fix the idx2 by dividing the data chunk in 4, 5 or watever parts.

if idx2 = total_length
 EXIT.
endif.
idx1 = idx2.
idx2 = idx2 * 2.

enddo.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason for doing like this is I like ABAP to do my processing instead of using any kind of SELECT ENDSELECT even if it's with package size.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This approach might work for you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Nishant&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: This is just a demonstrative logic not the actual code &lt;SPAN __jive_emoticon_name="wink"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2007 10:51:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mbew-performance-issue/m-p/3044890#M720740</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-01T10:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: MBEW performance Issue.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mbew-performance-issue/m-p/3044891#M720741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this code itself within a loop?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2007 13:18:20 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mbew-performance-issue/m-p/3044891#M720741</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-01T13:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: MBEW performance Issue.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mbew-performance-issue/m-p/3044892#M720742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;after selecting the records from MARD,&lt;/P&gt;&lt;P&gt;you can sort the internal table it_mard_temp by matnr werks&lt;/P&gt;&lt;P&gt;Then Delete the adjacent duplicates from it_mard comparing matnr werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can hit the table MBEW with for all entries of it_mard_temp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reward if it is useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Srinivas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2007 17:29:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mbew-performance-issue/m-p/3044892#M720742</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-01T17:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: MBEW performance Issue.</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/mbew-performance-issue/m-p/3044893#M720743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks All for your valuable help.&lt;/P&gt;&lt;P&gt;point has been givn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2007 10:12:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/mbew-performance-issue/m-p/3044893#M720743</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-11-06T10:12:42Z</dc:date>
    </item>
  </channel>
</rss>

