<?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: Statement is expensive in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-is-expensive/m-p/4042765#M966312</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;first of all move all the entries into an internal table .. instead of &lt;/P&gt;&lt;P&gt;select..endselect ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT DISTINCT pernr INTO table it_pernr&lt;/P&gt;&lt;P&gt;FROM pa0001&lt;/P&gt;&lt;P&gt;CLIENT SPECIFIED&lt;/P&gt;&lt;P&gt;WHERE mandt EQ sy-mandt&lt;/P&gt;&lt;P&gt;AND pernr IN s_pernr&lt;/P&gt;&lt;P&gt;AND subty EQ space&lt;/P&gt;&lt;P&gt;AND objps EQ space&lt;/P&gt;&lt;P&gt;AND sprps EQ space&lt;/P&gt;&lt;P&gt;AND endda GE sy-datum&lt;/P&gt;&lt;P&gt;AND begda LE sy-datum&lt;/P&gt;&lt;P&gt;AND seqnr EQ '000'&lt;/P&gt;&lt;P&gt;AND bukrs IN s_bukrs&lt;/P&gt;&lt;P&gt;AND werks IN s_werks&lt;/P&gt;&lt;P&gt;AND persg IN s_persg&lt;/P&gt;&lt;P&gt;AND persk IN s_persk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_pernr.&lt;/P&gt;&lt;P&gt;READ TABLE it_adpernr INTO wa_adpernr&lt;/P&gt;&lt;P&gt;WITH TABLE KEY pernr = it_pernr-pernr.&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;  wa_adpernr-entry = 'X'. "indicator selection&lt;/P&gt;&lt;P&gt;  MODIFY it_adpernr FROM wa_adpernr&lt;/P&gt;&lt;P&gt;  TRANSPORTING entry&lt;/P&gt;&lt;P&gt;  WHERE pernr EQ it_pernr-pernr.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;  delete it_pernr.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Jun 2008 12:07:31 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-06-23T12:07:31Z</dc:date>
    <item>
      <title>Statement is expensive</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-is-expensive/m-p/4042764#M966311</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;This statement is expensive because the information that was entered in the where clause is not very selective. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly suggest the suitable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;UL&gt;&lt;UL&gt;&lt;LI level="3" type="ul"&gt;&lt;P&gt;Check selection entry&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;/UL&gt;&lt;P&gt;  SELECT DISTINCT pernr INTO it_pernr-pernr&lt;/P&gt;&lt;P&gt;               FROM pa0001&lt;/P&gt;&lt;P&gt;               CLIENT SPECIFIED&lt;/P&gt;&lt;P&gt;               WHERE mandt EQ sy-mandt&lt;/P&gt;&lt;P&gt;               AND   pernr IN s_pernr&lt;/P&gt;&lt;P&gt;               AND   subty EQ space&lt;/P&gt;&lt;P&gt;               AND   objps EQ space&lt;/P&gt;&lt;P&gt;               AND   sprps EQ space&lt;/P&gt;&lt;P&gt;               AND   endda GE sy-datum&lt;/P&gt;&lt;P&gt;               AND   begda LE sy-datum&lt;/P&gt;&lt;P&gt;               AND   seqnr EQ '000'&lt;/P&gt;&lt;P&gt;               AND   bukrs IN s_bukrs&lt;/P&gt;&lt;P&gt;               AND   werks IN s_werks&lt;/P&gt;&lt;P&gt;               AND   persg IN s_persg&lt;/P&gt;&lt;P&gt;               AND   persk IN s_persk.&lt;/P&gt;&lt;P&gt;    READ TABLE it_adpernr INTO wa_adpernr&lt;/P&gt;&lt;P&gt;         WITH TABLE KEY pernr = it_pernr-pernr.&lt;/P&gt;&lt;P&gt;    IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;      APPEND it_pernr.&lt;/P&gt;&lt;P&gt;      wa_adpernr-entry = 'X'.          "indicator selection&lt;/P&gt;&lt;P&gt;      MODIFY it_adpernr FROM wa_adpernr&lt;/P&gt;&lt;P&gt;                        TRANSPORTING entry&lt;/P&gt;&lt;P&gt;                        WHERE pernr EQ it_pernr-pernr.&lt;/P&gt;&lt;P&gt;    ENDIF.&lt;/P&gt;&lt;P&gt;  ENDSELECT.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2008 11:58:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statement-is-expensive/m-p/4042764#M966311</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-23T11:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Statement is expensive</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/statement-is-expensive/m-p/4042765#M966312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;first of all move all the entries into an internal table .. instead of &lt;/P&gt;&lt;P&gt;select..endselect ..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT DISTINCT pernr INTO table it_pernr&lt;/P&gt;&lt;P&gt;FROM pa0001&lt;/P&gt;&lt;P&gt;CLIENT SPECIFIED&lt;/P&gt;&lt;P&gt;WHERE mandt EQ sy-mandt&lt;/P&gt;&lt;P&gt;AND pernr IN s_pernr&lt;/P&gt;&lt;P&gt;AND subty EQ space&lt;/P&gt;&lt;P&gt;AND objps EQ space&lt;/P&gt;&lt;P&gt;AND sprps EQ space&lt;/P&gt;&lt;P&gt;AND endda GE sy-datum&lt;/P&gt;&lt;P&gt;AND begda LE sy-datum&lt;/P&gt;&lt;P&gt;AND seqnr EQ '000'&lt;/P&gt;&lt;P&gt;AND bukrs IN s_bukrs&lt;/P&gt;&lt;P&gt;AND werks IN s_werks&lt;/P&gt;&lt;P&gt;AND persg IN s_persg&lt;/P&gt;&lt;P&gt;AND persk IN s_persk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;loop at it_pernr.&lt;/P&gt;&lt;P&gt;READ TABLE it_adpernr INTO wa_adpernr&lt;/P&gt;&lt;P&gt;WITH TABLE KEY pernr = it_pernr-pernr.&lt;/P&gt;&lt;P&gt;IF sy-subrc EQ 0.&lt;/P&gt;&lt;P&gt;  wa_adpernr-entry = 'X'. "indicator selection&lt;/P&gt;&lt;P&gt;  MODIFY it_adpernr FROM wa_adpernr&lt;/P&gt;&lt;P&gt;  TRANSPORTING entry&lt;/P&gt;&lt;P&gt;  WHERE pernr EQ it_pernr-pernr.&lt;/P&gt;&lt;P&gt;else.&lt;/P&gt;&lt;P&gt;  delete it_pernr.&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;endloop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jun 2008 12:07:31 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/statement-is-expensive/m-p/4042765#M966312</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-06-23T12:07:31Z</dc:date>
    </item>
  </channel>
</rss>

