<?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: Index in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/index/m-p/3767758#M906579</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 index is picked by the optimizer during runtime.u can explicitly specify the index using ORACLE HINTS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;   SELECT * UP TO 10 ROWS FROM csks&lt;/P&gt;&lt;P&gt;                          WHERE kokrs &amp;lt;&amp;gt; space AND &lt;/P&gt;&lt;P&gt;                                kostl &amp;lt;&amp;gt; space&lt;/P&gt;&lt;P&gt;                          %_HINTS ORACLE 'index(csks"J")'.&lt;/P&gt;&lt;P&gt;   WRITE: / csks. &lt;/P&gt;&lt;P&gt; ENDSELECT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Apr 2008 09:10:33 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2008-04-29T09:10:33Z</dc:date>
    <item>
      <title>Index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/index/m-p/3767757#M906578</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;There is an secondary index in BKPF with fields in the order BUKRS GJAHR AWKEY STBLG STJAH.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Select statement is : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; select bukrs belnr gjahr awkey xblnr blart from bkpf&lt;/P&gt;&lt;P&gt;  into table itab_accdoc for all entries in kaep_covp_ext1&lt;/P&gt;&lt;P&gt;  where bukrs eq kaep_covp_ext1-bukrs and&lt;/P&gt;&lt;P&gt;        gjahr eq kaep_covp_ext1-gjahr and&lt;/P&gt;&lt;P&gt;        awkey eq kaep_covp_ext1-refkey.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Through ST05, I found the select statement did not go through the above mentioned index but went through another index with fields MANDT BUKRS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly suggest ways to make the Select statement go through the correct Index so that the time reduces for selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2008 09:07:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/index/m-p/3767757#M906578</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-29T09:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: Index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/index/m-p/3767758#M906579</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 index is picked by the optimizer during runtime.u can explicitly specify the index using ORACLE HINTS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;   SELECT * UP TO 10 ROWS FROM csks&lt;/P&gt;&lt;P&gt;                          WHERE kokrs &amp;lt;&amp;gt; space AND &lt;/P&gt;&lt;P&gt;                                kostl &amp;lt;&amp;gt; space&lt;/P&gt;&lt;P&gt;                          %_HINTS ORACLE 'index(csks"J")'.&lt;/P&gt;&lt;P&gt;   WRITE: / csks. &lt;/P&gt;&lt;P&gt; ENDSELECT. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;madhu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2008 09:10:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/index/m-p/3767758#M906579</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-29T09:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: Index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/index/m-p/3767759#M906580</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;Check out the below sample code and explicitly call the index ...&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA: dbcur TYPE cursor.

*--Selecting data from purchase doccument item data.
OPEN CURSOR dbcur FOR
SELECT ebeln
ebelp
loekz
aedat
txz01
matnr
werks
matkl
idnlf
ktmng
menge
meins
netpr
peinh
elikz
erekz
wepos
weunb
repos
webre
kzabs
lmein
mtart
retpo
bsgru FROM ekpo
WHERE aedat IN s_aedat
%_HINTS ORACLE 'INDEX("EKPO""Z02")'.
DO.
FETCH NEXT CURSOR dbcur APPENDING TABLE it_ekpo PACKAGE SIZE 20000.
IF sy-subrc &amp;lt;&amp;gt; 0.
CLOSE CURSOR dbcur.
EXIT.
ENDIF.
ENDDO.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2008 09:15:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/index/m-p/3767759#M906580</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-29T09:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: Index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/index/m-p/3767760#M906581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Though I wrote &lt;/P&gt;&lt;P&gt; %_HINTS ORACLE 'INDEX ("BKPF""ZAW")'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still the Query did not go through the Index. What can be done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly can u also suggest a method to write in Open SQL..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Rajpriya Paulraj on Apr 29, 2008 3:00 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2008 10:10:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/index/m-p/3767760#M906581</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2008-04-29T10:10:17Z</dc:date>
    </item>
    <item>
      <title>Re: Index</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/index/m-p/3767761#M906582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the correct syntax for the hint is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;%_HINTS ORACLE 'INDEX("BKPF" "BKPF~ZAW")'&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is the index activated and does it exist on the database?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It might also be a good idea to rebuild the table statistics for BKPF via DB20, then you might not need the hint at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thomas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2008 11:10:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/index/m-p/3767761#M906582</guid>
      <dc:creator>ThomasZloch</dc:creator>
      <dc:date>2008-04-29T11:10:24Z</dc:date>
    </item>
  </channel>
</rss>

