<?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/1813337#M348519</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to do 2 changes in your query.&lt;/P&gt;&lt;P&gt;1) In place of "into corresponding fields" Use "Appending corresponding fields of table".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Don't use "For all entries command as it will drastically reduce the performance.&lt;/P&gt;&lt;P&gt;Pls use 'Loop at Itab" in place of "For all entries".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this will improve your performance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 27 Jan 2007 06:11:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-01-27T06:11:33Z</dc:date>
    <item>
      <title>Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1813334#M348516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following Code is there , Performance is very low. &lt;/P&gt;&lt;P&gt;Any hint. to improve the Performance..&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Swati..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT budat arbid werks wablnr aufnr FROM afru&lt;/P&gt;&lt;P&gt;                     INTO CORRESPONDING FIELDS OF TABLE it_afru&lt;/P&gt;&lt;P&gt;                     WHERE werks = s_werks AND budat IN s_dt.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  IF s_arbpl-low NE '' .&lt;/P&gt;&lt;P&gt;    SELECT objid arbpl FROM crhd&lt;/P&gt;&lt;P&gt;                      INTO CORRESPONDING FIELDS OF TABLE it_crhd&lt;/P&gt;&lt;P&gt;                      FOR ALL ENTRIES IN it_afru&lt;/P&gt;&lt;P&gt;                      WHERE objid = it_afru-arbid AND arbpl IN s_arbpl.&lt;/P&gt;&lt;P&gt;    LOOP AT it_afru.&lt;/P&gt;&lt;P&gt;      READ TABLE it_crhd WITH KEY objid = it_afru-arbid.&lt;/P&gt;&lt;P&gt;      IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;        it_afru-arbpl = it_crhd-arbpl.&lt;/P&gt;&lt;P&gt;        MODIFY it_afru.&lt;/P&gt;&lt;P&gt;      ENDIF.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  SELECT mblnr matnr charg erfmg aufnr FROM aufm&lt;/P&gt;&lt;P&gt;                    INTO CORRESPONDING FIELDS OF TABLE it_aufm&lt;/P&gt;&lt;P&gt;                    FOR ALL ENTRIES IN it_afru WHERE&lt;/P&gt;&lt;P&gt;                    aufnr = it_afru-aufnr AND werks = s_werks AND matnr IN s_matnr&lt;/P&gt;&lt;P&gt;                    AND bwart =  '101' .&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;FURNACE OIL&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  SELECT mblnr matnr charg erfmg aufnr FROM aufm&lt;/P&gt;&lt;P&gt;                    INTO CORRESPONDING FIELDS OF TABLE it_aufm_f&lt;/P&gt;&lt;P&gt;                    FOR ALL ENTRIES IN it_afru WHERE&lt;/P&gt;&lt;P&gt;                    aufnr = it_afru-aufnr AND werks = s_werks&lt;/P&gt;&lt;P&gt;                    AND bwart = '261' OR bwart = '201'.&lt;/P&gt;&lt;P&gt;  " and matnr = 'SSOLFO0001'.  " and mblnr = it_afru-wablnr.  " matnr in s_matnr.  "&lt;/P&gt;&lt;P&gt;  IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;  ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;Dross and process Scrap&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  SELECT mblnr matnr erfmg aufnr FROM mseg&lt;/P&gt;&lt;P&gt;                    INTO CORRESPONDING FIELDS OF TABLE it_mseg&lt;/P&gt;&lt;P&gt;                    FOR ALL ENTRIES IN it_afru WHERE&lt;/P&gt;&lt;P&gt;                    aufnr = it_afru-aufnr AND werks = s_werks&lt;/P&gt;&lt;P&gt;                    AND bwart = '552' AND matnr =  'NISCAD0001'&lt;/P&gt;&lt;P&gt;                    OR matnr = 'NISCBD001' or matnr = 'RMSRPS0001'.    " and matnr in s_matnr. and mblnr = it_afru-wablnr."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Jan 2007 05:31:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1813334#M348516</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-27T05:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1813335#M348517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;avoid "INTO CORRESPONDING"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;santhosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Jan 2007 05:36:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1813335#M348517</guid>
      <dc:creator>SantoshKallem</dc:creator>
      <dc:date>2007-01-27T05:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1813336#M348518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;first thing which i can understand you have to check it_afru is initial or not before using for all entries. because if it_afru is initial all the data will be fetch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;secondly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT mblnr matnr charg erfmg aufnr FROM aufm&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE it_aufm_f&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_afru WHERE&lt;/P&gt;&lt;P&gt;aufnr = it_afru-aufnr AND werks = s_werks&lt;/P&gt;&lt;P&gt;AND ( bwart =  '261' OR bwart = '201' ).&lt;/P&gt;&lt;P&gt;" and matnr = 'SSOLFO0001'. " and mblnr = it_afru-wablnr. " matnr in s_matnr. "&lt;/P&gt;&lt;P&gt;and third&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT mblnr matnr erfmg aufnr FROM mseg&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE it_mseg&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_afru WHERE&lt;/P&gt;&lt;P&gt;aufnr = it_afru-aufnr AND werks = s_werks&lt;/P&gt;&lt;P&gt;AND bwart = '552' AND ( matnr = 'NISCAD0001'&lt;/P&gt;&lt;P&gt;OR matnr = 'NISCBD001' or matnr = 'RMSRPS0001' ). " and matnr in s_matnr. and mblnr = it_afru-wablnr." &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it may increase your performance. just try that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;shiba dutta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Jan 2007 05:47:47 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1813336#M348518</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-27T05:47:47Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1813337#M348519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to do 2 changes in your query.&lt;/P&gt;&lt;P&gt;1) In place of "into corresponding fields" Use "Appending corresponding fields of table".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Don't use "For all entries command as it will drastically reduce the performance.&lt;/P&gt;&lt;P&gt;Pls use 'Loop at Itab" in place of "For all entries".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this will improve your performance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Jan 2007 06:11:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1813337#M348519</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-27T06:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1813338#M348520</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 the code modify these Select stmts into one:&lt;/P&gt;&lt;P&gt;SELECT mblnr matnr charg erfmg aufnr FROM aufm&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE it_aufm&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_afru WHERE&lt;/P&gt;&lt;P&gt;aufnr = it_afru-aufnr AND werks = s_werks AND matnr IN s_matnr&lt;/P&gt;&lt;P&gt;AND bwart = '101' .&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;FURNACE OIL&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;SELECT mblnr matnr charg erfmg aufnr FROM aufm&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE it_aufm_f&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_afru WHERE&lt;/P&gt;&lt;P&gt;aufnr = it_afru-aufnr AND werks = s_werks&lt;/P&gt;&lt;P&gt;AND bwart = '261' OR bwart = '201'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT mblnr matnr erfmg aufnr FROM mseg&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE it_mseg&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_afru WHERE&lt;/P&gt;&lt;P&gt;aufnr = it_afru-aufnr AND werks = s_werks   &lt;/P&gt;&lt;P&gt;AND bwart = '552' AND matnr = 'NISCAD0001'&lt;/P&gt;&lt;P&gt;OR matnr = 'NISCBD001' or matnr = 'RMSRPS0001'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT mblnr matnr charg erfmg aufnr FROM aufm&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE it_aufm&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN it_afru WHERE&lt;/P&gt;&lt;P&gt;aufnr = it_afru-aufnr AND werks &amp;lt;b&amp;gt; IN &amp;lt;/b&amp;gt; s_werks AND matnr IN s_matnr&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt; "use IN if s_werks is select-options &amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;AND  bwart in ( '101' , '261', '201' , '552' ) .&lt;/P&gt;&lt;P&gt;IF sy-subrc = 0.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then: you can delete the entries from the internal table as:&lt;/P&gt;&lt;P&gt;  it_aufm_f[] = it_aufm[].&lt;/P&gt;&lt;P&gt;  it_mseg[] = it_aufm[].&lt;/P&gt;&lt;P&gt;  DELETE it_aufm_f where bwart not in ( '261' , '201' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  delete it_aufm where bwart not in ( '101' ).&lt;/P&gt;&lt;P&gt;  delete it_mseg where bwart not in ( '552' ).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then further you can filter on material numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Subramanian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Jan 2007 09:07:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-issue/m-p/1813338#M348520</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-01-27T09:07:52Z</dc:date>
    </item>
  </channel>
</rss>

