<?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: peformance Issue in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/peformance-issue/m-p/1570879#M257699</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;Inner join can retrieve fields from both the tables at a time with improved performance. I need the table from which u r fetching data into it_flat to give u the inner join syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rajesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Oct 2006 06:46:36 GMT</pubDate>
    <dc:creator>rajeshkumar_kaveti</dc:creator>
    <dc:date>2006-10-12T06:46:36Z</dc:date>
    <item>
      <title>peformance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/peformance-issue/m-p/1570876#M257696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi SDNs,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the following stmts giving performance issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT LGORT&lt;/P&gt;&lt;P&gt;         WERKS&lt;/P&gt;&lt;P&gt;         FROM T001L&lt;/P&gt;&lt;P&gt;         INTO TABLE LT_LGORT&lt;/P&gt;&lt;P&gt;         FOR ALL ENTRIES IN LT_FLAT&lt;/P&gt;&lt;P&gt;         WHERE WERKS = LT_FLAT-WERKS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  LOOP AT LT_FLAT INTO LW_FLAT.&lt;/P&gt;&lt;P&gt;    LOOP AT LT_LGORT INTO LW_LGORT WHERE WERKS = LW_FLAT-WERKS.&lt;/P&gt;&lt;P&gt;      LW_TEMP-MATNR = LW_FLAT-MATNR.&lt;/P&gt;&lt;P&gt;      LW_TEMP-LGORT = LW_LGORT-LGORT.&lt;/P&gt;&lt;P&gt;      LW_TEMP-WERKS = LW_FLAT-WERKS.&lt;/P&gt;&lt;P&gt;      APPEND LW_TEMP TO LT_LGORT_TEMP.&lt;/P&gt;&lt;P&gt;      CLEAR LW_TEMP.&lt;/P&gt;&lt;P&gt;      CLEAR LW_LGORT.&lt;/P&gt;&lt;P&gt;    ENDLOOP.&lt;/P&gt;&lt;P&gt;    CLEAR LW_FLAT.&lt;/P&gt;&lt;P&gt;  ENDLOOP.&lt;/P&gt;&lt;P&gt;  REFRESH LT_LGORT.&lt;/P&gt;&lt;P&gt;  LT_LGORT[] = LT_LGORT_TEMP.&lt;/P&gt;&lt;P&gt;  REFRESH LT_LGORT_TEMP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could any tell me how to make these feasible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanking you.,&lt;/P&gt;&lt;P&gt;Rama krishna S&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2006 06:28:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/peformance-issue/m-p/1570876#M257696</guid>
      <dc:creator>former_member206396</dc:creator>
      <dc:date>2006-10-12T06:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: peformance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/peformance-issue/m-p/1570877#M257697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rama,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take a look at this code which should be better ( better than "loop where"&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
data : w_index_lgort like sy-index.

SELECT LGORT
WERKS
FROM T001L
INTO TABLE LT_LGORT
FOR ALL ENTRIES IN LT_FLAT
WHERE WERKS = LT_FLAT-WERKS.

sort lt_flat by werks.
sort lt_lgort by werks.

LOOP AT LT_FLAT INTO LW_FLAT.

   LOOP AT LT_LGORT INTO LW_LGORT from w_index_lgort.
      if lw_lgort-werks gt lw_flat-werks.
         exit.
      else.
        w_index_lgort = w_index_lgort + 1.
        check lw_lgort-werks eq lw_flat-werks.
        LW_TEMP-MATNR = LW_FLAT-MATNR.
        LW_TEMP-LGORT = LW_LGORT-LGORT.
        LW_TEMP-WERKS = LW_FLAT-WERKS.
        APPEND LW_TEMP TO LT_LGORT_TEMP.
        CLEAR LW_TEMP.
        CLEAR LW_LGORT.
        endif.
        ENDLOOP.
CLEAR LW_FLAT.
ENDLOOP.
REFRESH LT_LGORT.
LT_LGORT[] = LT_LGORT_TEMP.
REFRESH LT_LGORT_TEMP.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erwan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2006 06:38:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/peformance-issue/m-p/1570877#M257697</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-12T06:38:36Z</dc:date>
    </item>
    <item>
      <title>Re: peformance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/peformance-issue/m-p/1570878#M257698</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 looping within a loop, try using the read table statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;read table LT_LGORT INTO LW_LGORT with key WERKS = LW_FLAT-WERKS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, after the statement "for all entries", use : if itab[] is not initial.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Sandeep.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: sandeep kumar&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2006 06:40:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/peformance-issue/m-p/1570878#M257698</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-12T06:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: peformance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/peformance-issue/m-p/1570879#M257699</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;Inner join can retrieve fields from both the tables at a time with improved performance. I need the table from which u r fetching data into it_flat to give u the inner join syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rajesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2006 06:46:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/peformance-issue/m-p/1570879#M257699</guid>
      <dc:creator>rajeshkumar_kaveti</dc:creator>
      <dc:date>2006-10-12T06:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: peformance Issue</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/peformance-issue/m-p/1570880#M257700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please try out : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT LGORT&lt;/P&gt;&lt;P&gt;WERKS&lt;/P&gt;&lt;P&gt;FROM T001L&lt;/P&gt;&lt;P&gt;INTO TABLE LT_LGORT&lt;/P&gt;&lt;P&gt;FOR ALL ENTRIES IN LT_FLAT&lt;/P&gt;&lt;P&gt;WHERE WERKS = LT_FLAT-WERKS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now if there is single record corresponding to every entry(means LT_FLAT has WERKS as primary key identifier) of LT_LGORT-WERKS efficiency can be improved using READ statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT LT_LGORT INTO LW_LGORT. &lt;/P&gt;&lt;P&gt;READ TABLE  LT_FLAT INTO LW_FLAT WHERE WERKS = LW_LGORT-WERKS.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0&lt;/P&gt;&lt;P&gt;  LW_TEMP-MATNR = LW_FLAT-MATNR.&lt;/P&gt;&lt;P&gt;  LW_TEMP-LGORT = LW_LGORT-LGORT.&lt;/P&gt;&lt;P&gt;  LW_TEMP-WERKS = LW_FLAT-WERKS.&lt;/P&gt;&lt;P&gt;  APPEND LW_TEMP TO LT_LGORT_TEMP.&lt;/P&gt;&lt;P&gt;  CLEAR LW_TEMP.&lt;/P&gt;&lt;P&gt;  CLEAR LW_LGORT.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;CLEAR LW_FLAT.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REFRESH LT_LGORT.&lt;/P&gt;&lt;P&gt;LT_LGORT[] = LT_LGORT_TEMP.&lt;/P&gt;&lt;P&gt;REFRESH LT_LGORT_TEMP.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2006 06:49:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/peformance-issue/m-p/1570880#M257700</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-10-12T06:49:36Z</dc:date>
    </item>
  </channel>
</rss>

