<?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 issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1680950#M300099</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;depending on your needs, consider selection of data first from &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- VAPMA Sales index material&lt;/P&gt;&lt;P&gt;- CKMI1 Material index financial&lt;/P&gt;&lt;P&gt;- BSIM secondary material index&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That might solve performance issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Nov 2006 15:12:50 GMT</pubDate>
    <dc:creator>Clemenss</dc:creator>
    <dc:date>2006-11-01T15:12:50Z</dc:date>
    <item>
      <title>performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1680945#M300094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SELECT matnr mtart maktx FROM &lt;U&gt;olr3&lt;/U&gt;marackt              &lt;/P&gt;&lt;P&gt;                          INTO TABLE i_mara               &lt;/P&gt;&lt;P&gt;                          WHERE spras EQ sy-langu         &lt;/P&gt;&lt;P&gt;                           AND werks EQ pwerks          &lt;/P&gt;&lt;P&gt;                            AND mtart IN s_mtart.         &lt;/P&gt;&lt;P&gt;*Get MSEG data&lt;/P&gt;&lt;P&gt;IF i_mara[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;SELECT mblnr&lt;/P&gt;&lt;P&gt;mjahr&lt;/P&gt;&lt;P&gt;zeile&lt;/P&gt;&lt;P&gt;bwart&lt;/P&gt;&lt;P&gt;matnr&lt;/P&gt;&lt;P&gt;werks&lt;/P&gt;&lt;P&gt;lgort&lt;/P&gt;&lt;P&gt;sobkz&lt;/P&gt;&lt;P&gt;bwtar&lt;/P&gt;&lt;P&gt;menge&lt;/P&gt;&lt;P&gt;wempf&lt;/P&gt;&lt;P&gt;bukrs&lt;/P&gt;&lt;P&gt;grund&lt;/P&gt;&lt;P&gt;INTO TABLE i_temp_mseg&lt;/P&gt;&lt;P&gt;FROM mseg&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN i_mara&lt;/P&gt;&lt;P&gt;WHERE bwart IN s_bwart AND&lt;/P&gt;&lt;P&gt;matnr EQ i_mara-matnr AND&lt;/P&gt;&lt;P&gt;werks EQ p_werks AND&lt;/P&gt;&lt;P&gt;lgort IN s_lgort .&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES FROM i_temp_mseg.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;*Get MKPF data&lt;/P&gt;&lt;P&gt;IF i_temp_mseg[] IS NOT INITIAL.&lt;/P&gt;&lt;P&gt;SELECT mblnr&lt;/P&gt;&lt;P&gt;mjahr&lt;/P&gt;&lt;P&gt;budat&lt;/P&gt;&lt;P&gt;usnam&lt;/P&gt;&lt;P&gt;INTO TABLE i_temp_mkpf&lt;/P&gt;&lt;P&gt;FROM mkpf&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN i_temp_mseg&lt;/P&gt;&lt;P&gt;WHERE mblnr = i_temp_mseg-mblnr&lt;/P&gt;&lt;P&gt;AND mjahr = i_temp_mseg-mjahr&lt;/P&gt;&lt;P&gt;AND budat IN s_budat.&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES FROM i_temp_mkpf.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the data these tables are fetching consists of large amount of data so its taking lot of time , can any one help me out in this how to increase the performance for this two select statements.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Nov 2006 07:38:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1680945#M300094</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-01T07:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1680946#M300095</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;First check whether you are using sequence of fields in where condition as per any of table index.If not corrct the field sequence.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If possible check in the system whether there is any view whcih already exists for mseg &amp;amp; mkpf,use that instead of  table access.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark points if helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Nov 2006 07:43:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1680946#M300095</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-01T07:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1680947#M300096</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;You don't need to DELETE ADJACENT DUPLICATES. With SELECT... FOR ALL ENTRIES "Duplicates are discarded from the result set".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use view V_MKPF you can retrieve data from both tables at the same time. This would dramatically increase the performance. If this view doesn't have all the required fields, do a where used list, selecting views for both tables and compare the results. Check to see if any of the standard views is returning the data you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you don't find any and this program is to be executed often, you can create a new view and use it instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that's not an option you can still perform an INNER JOIN between both tables using the common primary keys.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Rui&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Nov 2006 09:28:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1680947#M300096</guid>
      <dc:creator>rui_nunes</dc:creator>
      <dc:date>2006-11-01T09:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1680948#M300097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chaya,&lt;/P&gt;&lt;P&gt;Also to add &lt;/P&gt;&lt;P&gt;instead of selecting records in first select and then deleting duplicates records..you can better go for SELECT DISTINCT..&lt;/P&gt;&lt;P&gt;This will definitely help...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Enjoy SAP.&lt;/P&gt;&lt;P&gt;Pankaj Singh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Nov 2006 10:28:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1680948#M300097</guid>
      <dc:creator>messier31</dc:creator>
      <dc:date>2006-11-01T10:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1680949#M300098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;      follow below logic &lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;      select from mkpf with budat since secondary index &lt;/P&gt;&lt;P&gt;      is defined on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT mblnr&lt;/P&gt;&lt;P&gt;mjahr&lt;/P&gt;&lt;P&gt;budat&lt;/P&gt;&lt;P&gt;usnam&lt;/P&gt;&lt;P&gt;INTO TABLE i_temp_mkpf&lt;/P&gt;&lt;P&gt;FROM mkpf&lt;/P&gt;&lt;P&gt;where budat IN s_budat.&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES FROM i_temp_mkpf.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not i_temp_mkpf[] is initial.&lt;/P&gt;&lt;P&gt;SELECT mblnr&lt;/P&gt;&lt;P&gt;mjahr&lt;/P&gt;&lt;P&gt;zeile&lt;/P&gt;&lt;P&gt;bwart&lt;/P&gt;&lt;P&gt;matnr&lt;/P&gt;&lt;P&gt;werks&lt;/P&gt;&lt;P&gt;lgort&lt;/P&gt;&lt;P&gt;sobkz&lt;/P&gt;&lt;P&gt;bwtar&lt;/P&gt;&lt;P&gt;menge&lt;/P&gt;&lt;P&gt;wempf&lt;/P&gt;&lt;P&gt;bukrs&lt;/P&gt;&lt;P&gt;grund&lt;/P&gt;&lt;P&gt;INTO TABLE i_temp_mseg&lt;/P&gt;&lt;P&gt;FROM mseg&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN i_temp_mkpf.&lt;/P&gt;&lt;P&gt;WHERE mblnr = i_temp_mkpf-mblnr&lt;/P&gt;&lt;P&gt;     mjahr = i_temp_mkpf-mjahr&lt;/P&gt;&lt;P&gt;     matnr EQ i_mara-matnr AND&lt;/P&gt;&lt;P&gt;     werks EQ p_werks AND&lt;/P&gt;&lt;P&gt;     lgort IN s_lgort and&lt;/P&gt;&lt;P&gt;      bwart IN s_bwart .&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;DELETE ADJACENT DUPLICATES FROM i_temp_mseg.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not i_temp_mseg[] is initial.&lt;/P&gt;&lt;P&gt;SELECT matnr mtart maktx FROM &lt;U&gt;olr3&lt;/U&gt;marackt &lt;/P&gt;&lt;P&gt;INTO TABLE i_mara &lt;/P&gt;&lt;P&gt;for all entries in  i_temp_mseg&lt;/P&gt;&lt;P&gt;WHERE matnr = i_temp_mseg-matnr&lt;/P&gt;&lt;P&gt;AND werks = i_temp_mseg-werks&lt;/P&gt;&lt;P&gt;AND mtart IN s_mtart&lt;/P&gt;&lt;P&gt;and  spras EQ sy-langu .&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;besides above point see below steps&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;     reduce database time&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Remove corresponding from select satement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Remove * from select&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Select field in sequence as defined in database&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) Avoid unnecessary selects&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e check for internal table not initial&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5) Use all entries and sort table by key fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;7) Try to use secondary index when you don't have &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;full key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FORM SUB_SELECTION_AUFKTAB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not it_plant[] is initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it_plant1[] = it_plant[].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort it_plant1 by werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;delete adjacent duplicates from it_plant1 comparing werks &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT AUFNR KTEXT USER4 OBJNR INTO CORRESPONDING FIELDS OF TABLE I_AUFKTAB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM AUFK&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_plant1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE AUFNR IN S_AUFNR AND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;KTEXT IN S_KTEXT AND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;WERKS IN S_WERKS AND&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AUART IN S_AUART AND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;USER4 IN S_USER4 AND&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;werks eq it_plant1-werks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;free it_plant1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ENDFORM. "SUB_SELECTION_AUFKTAB&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) &amp;lt;b&amp;gt;reduce abap time&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;1) Remove selects from loop and use binary search&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Modify internal table use transporting option&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Avoid nested loop . Use read table and loop at itab&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from sy-tabix statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4) free intrenal table memory wnen table is not &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;required for further processing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3)&amp;lt;b&amp;gt;Reduce sytsem time&amp;lt;/b&amp;gt;Regards&lt;/P&gt;&lt;P&gt; 1) perform give types of formal parameters&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;    perform add using a b.&lt;/P&gt;&lt;P&gt;    form add a type i b type i.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;amole&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Nov 2006 11:28:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1680949#M300098</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-01T11:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1680950#M300099</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;depending on your needs, consider selection of data first from &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- VAPMA Sales index material&lt;/P&gt;&lt;P&gt;- CKMI1 Material index financial&lt;/P&gt;&lt;P&gt;- BSIM secondary material index&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That might solve performance issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Clemens&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Nov 2006 15:12:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1680950#M300099</guid>
      <dc:creator>Clemenss</dc:creator>
      <dc:date>2006-11-01T15:12:50Z</dc:date>
    </item>
  </channel>
</rss>

