<?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: perfomance tuning in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/perfomance-tuning/m-p/2482143#M559417</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;join is not advisable to use. It will affect ur performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of this u can use For all entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to do this for the below scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select fields from table1 and put it into 1st internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select fields from table 2 for all entries in internal table 1 where matnr = itab-matnr....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;before for all entries u should &lt;/P&gt;&lt;P&gt;Sort the internal table and delete duplicate entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;need ur reward points if its useful.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jun 2007 14:54:56 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-26T14:54:56Z</dc:date>
    <item>
      <title>perfomance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perfomance-tuning/m-p/2482142#M559416</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;can any one can give alternative code for select statement in the code, to increase the perforamnce i have&lt;/P&gt;&lt;P&gt;to change it. &lt;/P&gt;&lt;P&gt;plz forward the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT mara&lt;SUB&gt;matnr marc&lt;/SUB&gt;werks mara&lt;SUB&gt;mtart mara&lt;/SUB&gt;matkl mara~meins&lt;/P&gt;&lt;P&gt;         marc&lt;SUB&gt;dismm marc&lt;/SUB&gt;dispo marc&lt;SUB&gt;disgr marc&lt;/SUB&gt;mmsta marc~perkz&lt;/P&gt;&lt;P&gt;         marc~periv&lt;/P&gt;&lt;P&gt;    FROM mara&lt;/P&gt;&lt;P&gt;      INNER JOIN marc&lt;/P&gt;&lt;P&gt;        ON mara&lt;SUB&gt;matnr = marc&lt;/SUB&gt;matnr&lt;/P&gt;&lt;P&gt;    INTO CORRESPONDING FIELDS OF TABLE it_alv&lt;/P&gt;&lt;P&gt;    WHERE mara~matnr IN so_matnr&lt;/P&gt;&lt;P&gt;      AND mara~matkl IN so_matkl&lt;/P&gt;&lt;P&gt;      AND mara~mtart IN so_mtart&lt;/P&gt;&lt;P&gt;      AND marc~werks IN so_werks&lt;/P&gt;&lt;P&gt;      AND marc~disgr IN so_disgr&lt;/P&gt;&lt;P&gt;      AND marc~dismm IN so_dismm&lt;/P&gt;&lt;P&gt;      AND marc~dispo IN so_dispo.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  DESCRIBE TABLE it_alv LINES w_nbitems.&lt;/P&gt;&lt;P&gt;  l_count = 0.&lt;/P&gt;&lt;P&gt;  LOOP AT it_alv INTO is_alv.&lt;/P&gt;&lt;P&gt;    l_tabix = sy-tabix.&lt;/P&gt;&lt;P&gt;    l_count = l_count + 1.&lt;/P&gt;&lt;P&gt;    PERFORM sr_progress_bar USING l_count&lt;/P&gt;&lt;P&gt;                                  w_nbitems&lt;/P&gt;&lt;P&gt;                                  text-m02.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Read last stock movement for selected material&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;    SELECT mkpf&lt;SUB&gt;budat mkpf&lt;/SUB&gt;mblnr mkpf&lt;SUB&gt;mjahr mseg&lt;/SUB&gt;zeile mseg~bwart&lt;/P&gt;&lt;P&gt;           mseg&lt;SUB&gt;menge mseg&lt;/SUB&gt;kostl mkpf&lt;SUB&gt;usnam mseg&lt;/SUB&gt;wempf&lt;/P&gt;&lt;P&gt;      UP TO 1 ROWS&lt;/P&gt;&lt;P&gt;      FROM mseg&lt;/P&gt;&lt;P&gt;        JOIN mkpf&lt;/P&gt;&lt;P&gt;          ON    mkpf&lt;SUB&gt;mblnr = mseg&lt;/SUB&gt;mblnr&lt;/P&gt;&lt;P&gt;            AND mkpf&lt;SUB&gt;mjahr = mseg&lt;/SUB&gt;mjahr&lt;/P&gt;&lt;P&gt;      INTO (is_alv-budat, is_alv-mblnr, is_alv-mjahr, is_alv-zeile,&lt;/P&gt;&lt;P&gt;            is_alv-bwart, is_alv-menge, is_alv-kostl, is_alv-usnam,&lt;/P&gt;&lt;P&gt;            is_alv-wempf)&lt;/P&gt;&lt;P&gt;      WHERE mseg~matnr = is_alv-matnr&lt;/P&gt;&lt;P&gt;        AND mseg~werks = is_alv-werks&lt;/P&gt;&lt;P&gt;        AND mseg~bwart IN so_bwart&lt;/P&gt;&lt;P&gt;      ORDER BY MKPF~BUDAT descending.&lt;/P&gt;&lt;P&gt;    ENDSELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    IF is_alv-budat &amp;gt;= w_startdate. " OR is_alv-budat IS INITIAL.&lt;/P&gt;&lt;P&gt;      DELETE it_alv INDEX l_tabix.&lt;/P&gt;&lt;P&gt;      CONTINUE.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*Message was edited by: &lt;/P&gt;&lt;P&gt;        Mohammed Toufeeq&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Mohammed Toufeeq&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 14:48:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perfomance-tuning/m-p/2482142#M559416</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T14:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: perfomance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perfomance-tuning/m-p/2482143#M559417</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;join is not advisable to use. It will affect ur performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of this u can use For all entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to do this for the below scenario.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select fields from table1 and put it into 1st internal table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select fields from table 2 for all entries in internal table 1 where matnr = itab-matnr....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;before for all entries u should &lt;/P&gt;&lt;P&gt;Sort the internal table and delete duplicate entries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;need ur reward points if its useful.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 14:54:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perfomance-tuning/m-p/2482143#M559417</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T14:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: perfomance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perfomance-tuning/m-p/2482144#M559418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I responded on your other post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rather than makingthe same post more than once, you can simply edit the first one and it will go to the top of the list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2007 16:02:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perfomance-tuning/m-p/2482144#M559418</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-26T16:02:19Z</dc:date>
    </item>
    <item>
      <title>Re: perfomance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perfomance-tuning/m-p/2482145#M559419</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;I want to suggest few points based on your code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a). Dont use joins instead use for all entries.&lt;/P&gt;&lt;P&gt;b). While passing values into internal table from select query..dont use into corresponding fields. which hits database server very badly.instead create internal table with the structure u want.&lt;/P&gt;&lt;P&gt;c). While using select single make sure that the fields that u r using in the where condition should be key fields&lt;/P&gt;&lt;P&gt;d).Better not to use select * , take the required fields in the select query accordingly create the Internal table strucutre&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Phani.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jun 2007 06:16:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perfomance-tuning/m-p/2482145#M559419</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-28T06:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: perfomance tuning</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/perfomance-tuning/m-p/2482146#M559420</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;three big problem in ur query:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. do not use non KEY fields inb where clause of select statemt&lt;/P&gt;&lt;P&gt;2. Do not use select ... endselect.  instead of this use for all entries and never use select inside loop.&lt;/P&gt;&lt;P&gt;3. remove perform progressbar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;others:&lt;/P&gt;&lt;P&gt;1. remvoe move corrospondig&lt;/P&gt;&lt;P&gt;2. do not use order by in SQL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jogdand M B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jun 2007 12:11:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/perfomance-tuning/m-p/2482146#M559420</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-28T12:11:56Z</dc:date>
    </item>
  </channel>
</rss>

