<?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: Urgent - Performance tuning in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/urgent-performance-tuning/m-p/1198458#M130431</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;instead of using inner join you can use Read statement in the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that will increase the performance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Jan 2006 07:53:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-01-31T07:53:40Z</dc:date>
    <item>
      <title>Urgent - Performance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/urgent-performance-tuning/m-p/1198456#M130429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following code takes more execution time..How can we reduce the execution time through performance tuning..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT DISTINCT b&lt;SUB&gt;ebeln AS bktxt b&lt;/SUB&gt;ebelp a&lt;SUB&gt;mblnr a&lt;/SUB&gt;vgart b&lt;SUB&gt;bwart b&lt;/SUB&gt;matnr b&lt;SUB&gt;werks b&lt;/SUB&gt;lifnr b&lt;SUB&gt;menge b&lt;/SUB&gt;ebeln b~erfmg &lt;/P&gt;&lt;P&gt; INTO CORRESPONDING FIELDS OF TABLE it_mseg&lt;/P&gt;&lt;P&gt; FROM mkpf AS a INNER JOIN mseg AS b ON b&lt;SUB&gt;mblnr = a&lt;/SUB&gt;mblnr&lt;/P&gt;&lt;P&gt; FOR ALL ENTRIES IN it_ekpo&lt;/P&gt;&lt;P&gt; WHERE&lt;/P&gt;&lt;P&gt; b&lt;SUB&gt;ebeln = it_ekpo-ebeln AND b&lt;/SUB&gt;ebelp = it_ekpo-ebelp AND b~matnr = it_ekpo-matnr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2006 07:46:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/urgent-performance-tuning/m-p/1198456#M130429</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-31T07:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent - Performance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/urgent-performance-tuning/m-p/1198457#M130430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Remove the INTO CORRESPONDING addition,define an itab with the required field and use INTO TABLE addition.Make use of index while comparing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Abdul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2006 07:51:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/urgent-performance-tuning/m-p/1198457#M130430</guid>
      <dc:creator>abdul_hakim</dc:creator>
      <dc:date>2006-01-31T07:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent - Performance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/urgent-performance-tuning/m-p/1198458#M130431</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;instead of using inner join you can use Read statement in the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that will increase the performance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2006 07:53:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/urgent-performance-tuning/m-p/1198458#M130431</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-31T07:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent - Performance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/urgent-performance-tuning/m-p/1198459#M130432</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you use SELECT FOR ALL ENTRIES to compare more than one field of the internal table with DB-fields the database will select the data with UNION ALL-Statements. You can see this when you use the SQL-trace in the transaction ST05.&lt;/P&gt;&lt;P&gt;In addition maybe this WebLog can help you:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2986" target="test_blank"&gt;https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2986&lt;/A&gt; &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt; &lt;B&gt;[original link is broken]&lt;/B&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2006 07:53:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/urgent-performance-tuning/m-p/1198459#M130432</guid>
      <dc:creator>timo_wendt</dc:creator>
      <dc:date>2006-01-31T07:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent - Performance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/urgent-performance-tuning/m-p/1198460#M130433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;try to remove the into corresponding ,&lt;/P&gt;&lt;P&gt;and declare the it_mseg in the order of your fields.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT 
DISTINCT b~ebeln AS bktxt
         b~ebelp
         a~mblnr
         a~vgart
         b~bwart
         b~matnr
         b~werks
         b~lifnr
         b~menge
         b~ebeln 
         b~erfmg 
INTO  TABLE it_mseg
FROM mkpf AS a INNER JOIN mseg AS b ON b~mblnr = a~mblnr
FOR ALL ENTRIES IN it_ekpo
WHERE b~ebeln = it_ekpo-ebeln
 AND b~ebelp = it_ekpo-ebelp
 AND b~matnr = it_ekpo-matnr&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2006 07:54:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/urgent-performance-tuning/m-p/1198460#M130433</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-31T07:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent - Performance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/urgent-performance-tuning/m-p/1198461#M130434</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;Either you go for index M of table MSEG.&lt;/P&gt;&lt;P&gt;Then specifiy in addition &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;b~MATNR eq it_ekpo-matnr
b~WERKS eq it_ekpo-werks
b~LGORT eq it_ekpo-lgort
b~BWART eq '101'
b~SOBKZ eq space
b~ebeln eq it_ekpo-ebeln
b~ebelp eq it_ekpo-ebelp.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; Check, if movement type and special stock type are correct in your case. Maybe you need multiple entries, try if this can still speed up the select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or you go for document index EKBE.&lt;/P&gt;&lt;P&gt;Start selection the POs. Then select EKBE for all entries with VGABE = '1'. Then go for MKPF/MSEG with primary key. Every table starting from EKBE will have a (partial) primary key access, has to be pretty fast.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2006 08:09:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/urgent-performance-tuning/m-p/1198461#M130434</guid>
      <dc:creator>christian_wohlfahrt</dc:creator>
      <dc:date>2006-01-31T08:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: Urgent - Performance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/urgent-performance-tuning/m-p/1198462#M130435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Siju,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the query which you have written, following are my suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a view of MKPF/MSEG. This will be much effective than having an join as database takes care of the performance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2006 08:22:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/urgent-performance-tuning/m-p/1198462#M130435</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-01-31T08:22:49Z</dc:date>
    </item>
  </channel>
</rss>

