<?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 of select statement in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-of-select-statement/m-p/5998552#M1343841</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in addition, keep in mind that EKBE tends to get very big, especially if you are working with framework orders or contracts. to reduce the size, try to move the data to EKBEH using RM06EKBE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Aug 2009 10:51:50 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2009-08-14T10:51:50Z</dc:date>
    <item>
      <title>performance of select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-of-select-statement/m-p/5998550#M1343839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I doing performance tuning for report .&lt;/P&gt;&lt;P&gt;when i checked in ST05 , the below 2 statements is taking more time eventhough i tried to reduce as much as possible .&lt;/P&gt;&lt;P&gt;SELECT ebeln&lt;/P&gt;&lt;P&gt;               EBELP&lt;/P&gt;&lt;P&gt;               BEWTP&lt;/P&gt;&lt;P&gt;               BWART&lt;/P&gt;&lt;P&gt;               budat&lt;/P&gt;&lt;P&gt;               MATNR&lt;/P&gt;&lt;P&gt;               werks&lt;/P&gt;&lt;P&gt;                    FROM EKBE INTO TABLE T_EKBE&lt;/P&gt;&lt;P&gt;                    WHERE BUDAT IN S_EINDT&lt;/P&gt;&lt;P&gt;                    AND   matnr in so_matnr&lt;/P&gt;&lt;P&gt;                    AND   WERKS IN S_WERKS&lt;/P&gt;&lt;P&gt;                    AND   BEWTP EQ 'E'&lt;/P&gt;&lt;P&gt;                    AND   BWART IN ('101','105').&lt;/P&gt;&lt;P&gt;IF NOT t_ekbe[] IS INITIAL.&lt;/P&gt;&lt;P&gt;SELECT ebeln&lt;/P&gt;&lt;P&gt;           ebelp&lt;/P&gt;&lt;P&gt;           etenr&lt;/P&gt;&lt;P&gt;           eindt&lt;/P&gt;&lt;P&gt;           menge&lt;/P&gt;&lt;P&gt;           wemng&lt;/P&gt;&lt;P&gt;                 FROM EKET INTO TABLE T_EKET&lt;/P&gt;&lt;P&gt;             FOR ALL ENTRIES IN T_EKBE&lt;/P&gt;&lt;P&gt;             WHERE EBELN = T_EKBE-EBELN&lt;/P&gt;&lt;P&gt;             AND   EBELP = T_EKBE-EBELP.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please suggest how to reduce the time taken.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;chetan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 10:36:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-of-select-statement/m-p/5998550#M1343839</guid>
      <dc:creator>former_member192432</dc:creator>
      <dc:date>2009-08-14T10:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: performance of select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-of-select-statement/m-p/5998551#M1343840</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;The problem should be in the SELECT of EKBE, here u don't use any key fields, I don't know the logic of your program in order to find out the jey fields value before selecting EKBE data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So u should consider if it needs to create a secondary index with the fields you're using in the select.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Max&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 10:48:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-of-select-statement/m-p/5998551#M1343840</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-14T10:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: performance of select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-of-select-statement/m-p/5998552#M1343841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;in addition, keep in mind that EKBE tends to get very big, especially if you are working with framework orders or contracts. to reduce the size, try to move the data to EKBEH using RM06EKBE.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 10:51:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-of-select-statement/m-p/5998552#M1343841</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-14T10:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: performance of select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-of-select-statement/m-p/5998553#M1343842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe you can first access EKET (index on EINDT) and then EKBE, if you normally have a small selection range in S_EINDT. Even better, use a JOIN and let the optimizer decide about the best access path.&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 12:37:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-of-select-statement/m-p/5998553#M1343842</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2009-08-14T12:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: performance of select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-of-select-statement/m-p/5998554#M1343843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) Create an index on database table EKET on field BUDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) On the selection screen make field BUDAT mandatory.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2009 13:45:50 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-of-select-statement/m-p/5998554#M1343843</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-14T13:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: performance of select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-of-select-statement/m-p/5998555#M1343844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Itu2019s required to create an index to BUDAT and change the query like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FROM EKBE INTO TABLE T_EKBE&lt;/P&gt;&lt;P&gt;WHERE BUDAT IN S_EINDT&lt;/P&gt;&lt;P&gt;AND matnr in so_matnr&lt;/P&gt;&lt;P&gt;AND WERKS&lt;/P&gt;&lt;P&gt;AND BEWTP EQ 'E'&lt;/P&gt;&lt;P&gt;AND BWART EQ u2018101u2019 OR u2018105'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sunitha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2009 07:05:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-of-select-statement/m-p/5998555#M1343844</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-17T07:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: performance of select statement</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/performance-of-select-statement/m-p/5998556#M1343845</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;Use all the primary keys of table EKBE as done in below code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
TABLES: S001.
CONSTANTS: SSOUR_INI  LIKE S001-SSOUR VALUE   IS INITIAL,
           VRSIO_INI  LIKE S001-VRSIO VALUE   IS INITIAL,
           SPMON_INI  LIKE S001-SPMON VALUE   IS INITIAL,

           SPTAG_INI  LIKE S001-SPTAG VALUE   IS INITIAL,
           SPWOC_INI  LIKE S001-SPWOC VALUE   IS INITIAL,
           SPBUP_INI  LIKE S001-SPBUP VALUE   IS INITIAL.


DATA: TA_S001 TYPE STANDARD TABLE OF S001.
DATA: WA_S001 TYPE S001.

SELECT-OPTIONS:
              SO_SPTAG   FOR S001-SPTAG OBLIGATORY,
              SO_KUNNR   FOR S001-KUNNR OBLIGATORY,
              SO_VKORG   FOR S001-VKORG OBLIGATORY,
              SO_VTWEG   FOR S001-VTWEG OBLIGATORY,
              SO_SPART   FOR S001-SPART OBLIGATORY,
              SO_MATNR   FOR S001-MATNR OBLIGATORY.

START-OF-SELECTION.

SELECT        * FROM  S001

       INTO TABLE TA_S001
       WHERE  SSOUR  GE SSOUR_INI     "Greater Equal initial value
       AND    VRSIO  GE VRSIO_INI     "   idem
       AND    SPMON  GE SPMON_INI     "   idem
       AND    SPTAG  IN SO_SPTAG
       AND    SPWOC  GE SPWOC_INI     "   idem
       AND    SPBUP  GE SPBUP_INI     "   idem
       AND    KUNNR  IN SO_KUNNR
       AND    VKORG  IN SO_VKORG
       AND    VTWEG  IN SO_VTWEG
       AND    SPART  IN SO_SPART
       AND    MATNR  IN SO_MATNR.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You will definately find some improvement...&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Krishna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2009 08:54:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/performance-of-select-statement/m-p/5998556#M1343845</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2009-08-17T08:54:04Z</dc:date>
    </item>
  </channel>
</rss>

