<?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: Indexes in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723347#M315532</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would suggest you just check your code to make sure&lt;/P&gt;&lt;P&gt;1) you are not trying to select from VBAP with empty itab_vbak&lt;/P&gt;&lt;P&gt;2) if you have too many entries in itab_vbak - it may be better to use some of index tables like - VAPMA (order items by material) and then - select all additional info from VBAK &amp;amp; VBAP if required. btw, VAPMA has some fields from header level - like sales org. &amp;amp; so on... so it may really help if you select based on material.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Nov 2006 18:28:49 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2006-11-15T18:28:49Z</dc:date>
    <item>
      <title>Indexes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723342#M315527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Will creating an index on vbap table with the fields in where clause improve the performance of this code ?    &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; SELECT  vbeln  posnr matnr arktx pstyv vkaus werks&lt;/P&gt;&lt;P&gt;             vstel erdat netpr waerk fkrel kpein kpein&lt;/P&gt;&lt;P&gt;             exart&lt;/P&gt;&lt;P&gt;      FROM vbap&lt;/P&gt;&lt;P&gt;      INTO CORRESPONDING FIELDS OF TABLE t_vbap&lt;/P&gt;&lt;P&gt;      for all entries in itab_vbak&lt;/P&gt;&lt;P&gt;      WHERE vbeln = itab_vbak-vbeln&lt;/P&gt;&lt;P&gt;       AND werks IN plant&lt;/P&gt;&lt;P&gt;       AND matnr IN o_matnr&lt;/P&gt;&lt;P&gt;       AND pstyv IN pstyv&lt;/P&gt;&lt;P&gt;       AND abgru = '  '&lt;/P&gt;&lt;P&gt;       AND vstel IN o_vstel.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2006 14:15:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723342#M315527</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-15T14:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Indexes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723343#M315528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it will definetely increase the performance of the program...indexes are created for better performance of the programs.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2006 14:18:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723343#M315528</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-15T14:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Indexes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723344#M315529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Possibly, but lets try other things first.   Make sure that you are only doing this select when there are records in ITAB_VBAK,  and then make sure that it is sorted by VBELN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;check not ITAB_VBAK[] is initial.
sort itab_vbak ascending by VBELN.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Performance any better?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Rich Heilman&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2006 14:18:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723344#M315529</guid>
      <dc:creator>RichHeilman</dc:creator>
      <dc:date>2006-11-15T14:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Indexes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723345#M315530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Before you create an index check if you change the order of the where clause, if there is any improvement in performance.&lt;/P&gt;&lt;P&gt;also, sort the itab_vbak.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sort itab_vbak.&lt;/P&gt;&lt;P&gt;SELECT vbeln posnr matnr arktx pstyv vkaus werks&lt;/P&gt;&lt;P&gt;vstel erdat netpr waerk fkrel kpein kpein&lt;/P&gt;&lt;P&gt;exart&lt;/P&gt;&lt;P&gt;FROM vbap&lt;/P&gt;&lt;P&gt;INTO CORRESPONDING FIELDS OF TABLE t_vbap&lt;/P&gt;&lt;P&gt;for all entries in itab_vbak&lt;/P&gt;&lt;P&gt;WHERE vbeln = itab_vbak-vbeln&lt;/P&gt;&lt;P&gt;AND matnr IN o_matnr&lt;/P&gt;&lt;P&gt;AND pstyv IN pstyv&lt;/P&gt;&lt;P&gt;AND abgru = ' '&lt;/P&gt;&lt;P&gt;AND werks IN plant&lt;/P&gt;&lt;P&gt;AND vstel IN o_vstel. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Re&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2006 14:20:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723345#M315530</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-15T14:20:03Z</dc:date>
    </item>
    <item>
      <title>Re: Indexes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723346#M315531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A couple of things:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's generally not a good idea to create an index on a standard SAP table that is heavily updated in the foreground. The index has to be updated every time a user inserts a record. So while it may speed up your select, it will slow down other users. You particularly don't want to do this to speed up a single select in a single program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The main purpose of a secondary index is to be selective. In other words, to return as little data as possible. Since VBELN is already the first key field in the primary index, it's already highly selective.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I wouldn't create the index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2006 14:23:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723346#M315531</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-15T14:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: Indexes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723347#M315532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would suggest you just check your code to make sure&lt;/P&gt;&lt;P&gt;1) you are not trying to select from VBAP with empty itab_vbak&lt;/P&gt;&lt;P&gt;2) if you have too many entries in itab_vbak - it may be better to use some of index tables like - VAPMA (order items by material) and then - select all additional info from VBAK &amp;amp; VBAP if required. btw, VAPMA has some fields from header level - like sales org. &amp;amp; so on... so it may really help if you select based on material.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Nov 2006 18:28:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723347#M315532</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-15T18:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Indexes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723348#M315533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To ans your Q, yes it will certainly improve the performance provided database is selecting the alternative index during selection otherwise it will be of no use. &lt;/P&gt;&lt;P&gt;Now coming back to if you should create an index is something which needs to be really look at. As one of the response has indicated that this is definatly a load on the database as VBAP is a table which gets updated heavily and everytime this secondary index gets rebuilt.&lt;/P&gt;&lt;P&gt;So it is your call based on your req. u can look for option.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Nov 2006 08:25:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723348#M315533</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-16T08:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: Indexes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723349#M315534</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;You can replace your "INTO CORRESPONDING FIELDS" clause with a "INTO" clause.&lt;/P&gt;&lt;P&gt;It's so much better !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dieu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Nov 2006 14:40:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723349#M315534</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-17T14:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: Indexes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723350#M315535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Below are some performance tips to u...&lt;/P&gt;&lt;P&gt;1.Replace INTO CORRESPONDING with INTO.&lt;/P&gt;&lt;P&gt;2.Before using FOR ALL ENTRIES addtion jus the the respective table is empty or not.for instance..IF NOT ITAB_VBAK  IS INITIAL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Abdul Hakim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Nov 2006 05:52:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723350#M315535</guid>
      <dc:creator>abdul_hakim</dc:creator>
      <dc:date>2006-11-18T05:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Indexes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723351#M315536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello to everybody &lt;/P&gt;&lt;P&gt;I have been appearing east problem with a FI report I put more than 1000 centers of costs, for this initially prove with for all entries and preformed was terrible, later I change the for all by IN and performance was far better, but if the number of cost centers it exceeded the 1000 SQL crash I did was&lt;/P&gt;&lt;P&gt;DATA  VL_COUNTER TYPE P.&lt;/P&gt;&lt;P&gt;RANGES R_KOSTL FOR CSKS-KOSTL&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VL_COUNTER  = 0.&lt;/P&gt;&lt;P&gt;R_KOSTL-OPTION = 'EQ'.&lt;/P&gt;&lt;P&gt;R_KOSTL-SIGN = 'I'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOOP AT T_COSTLS.&lt;/P&gt;&lt;P&gt;           R_KOSTL-LOW = T_KOSTLS-KOSTL.&lt;/P&gt;&lt;P&gt;           VL_COUNTER  = VL_COUNTER  + 1 .&lt;/P&gt;&lt;P&gt;           APPEND R_KOSTL.&lt;/P&gt;&lt;P&gt;           IF VL_COUNTER  = 1000.&lt;/P&gt;&lt;P&gt;                          VL_COUNTER  = 0.&lt;/P&gt;&lt;P&gt;                          SELECT * FROM GLPCA&lt;/P&gt;&lt;P&gt;                          APPENDING TABLE T_DATA&lt;/P&gt;&lt;P&gt;                            WHERE&lt;/P&gt;&lt;P&gt;                          KOSTL IN R_KOSTL.&lt;/P&gt;&lt;P&gt;                          CLEAR R_KOSTL.&lt;/P&gt;&lt;P&gt;                          REFRESH R_KOSTL.&lt;/P&gt;&lt;P&gt;                          R_KOSTL-OPTION = 'EQ'.&lt;/P&gt;&lt;P&gt;                          R_KOSTL-SIGN = 'I'.&lt;/P&gt;&lt;P&gt;           ENDIF.&lt;/P&gt;&lt;P&gt;ENDLOOP.&lt;/P&gt;&lt;P&gt;           IF VL_COUNTER  ne 0.&lt;/P&gt;&lt;P&gt;                          VL_COUNTER  = 0.&lt;/P&gt;&lt;P&gt;                          SELECT * FROM GLPCA&lt;/P&gt;&lt;P&gt;                          APPENDING TABLE T_DATA&lt;/P&gt;&lt;P&gt;                            WHERE&lt;/P&gt;&lt;P&gt;                          KOSTL IN R_KOSTL.&lt;/P&gt;&lt;P&gt;                          CLEAR R_KOSTL.&lt;/P&gt;&lt;P&gt;                          REFRESH R_KOSTL.&lt;/P&gt;&lt;P&gt;                          R_KOSTL-OPTION = 'EQ'.&lt;/P&gt;&lt;P&gt;                          R_KOSTL-SIGN = 'I'.&lt;/P&gt;&lt;P&gt;           ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;clear the data that have one 'E' in SIGN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Gibran Roberto Martínez Santos&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2006 21:20:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723351#M315536</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-23T21:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Indexes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723352#M315537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Performance may have been better because of buffering. If you ran this program soon after the original one, records may have been taken from the buffer rather than the database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2006 21:54:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723352#M315537</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-23T21:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Indexes</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723353#M315538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hiiiii&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think index will improve the performance .............&lt;/P&gt;&lt;P&gt;but following steps can also improve performance of ur query....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Ensure first, that the internal table is not initial&lt;/P&gt;&lt;P&gt;2. You should sort internal table itab_vbak on the field vbeln &lt;/P&gt;&lt;P&gt;3. Remove the into 'corresponding fields of ' ..u should declare own internal table ..&lt;/P&gt;&lt;P&gt;4. Select the field in the sequence in which they are maintained in the table and in where conditions the sequence of fields should be the same.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Nov 2006 02:51:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/indexes/m-p/1723353#M315538</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2006-11-24T02:51:45Z</dc:date>
    </item>
  </channel>
</rss>

