<?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: tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/tables/m-p/2210531#M473389</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;U can see this useful link for wholesome info :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb20446011d189700000e8322d00/content.htm&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 May 2007 08:43:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-05-01T08:43:59Z</dc:date>
    <item>
      <title>tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tables/m-p/2210527#M473385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what r secondary indices ?plz explain me&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 08:37:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tables/m-p/2210527#M473385</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-01T08:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tables/m-p/2210528#M473386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi pinky,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. SECONDARY INDEX.&lt;/P&gt;&lt;P&gt;They are generally used for faster access.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EG.&lt;/P&gt;&lt;P&gt;In a table there are 10 fields.&lt;/P&gt;&lt;P&gt;1,2 are primary fields (primary index)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. But the table is queried many times&lt;/P&gt;&lt;P&gt;on field number 6 (eg).&lt;/P&gt;&lt;P&gt;So we can create a NEW Index&lt;/P&gt;&lt;P&gt;(Secondary index)&lt;/P&gt;&lt;P&gt;only on that 6th field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Due to this,&lt;/P&gt;&lt;P&gt;the sql will become faster &lt;/P&gt;&lt;P&gt;because NOW&lt;/P&gt;&lt;P&gt;the database will search on the&lt;/P&gt;&lt;P&gt;basis of secnodary index (made on 6th field)&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;amit m.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 08:38:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tables/m-p/2210528#M473386</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-01T08:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tables/m-p/2210529#M473387</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;Documentation&lt;/P&gt;&lt;P&gt;If you need to access an internal table with different keys&lt;/P&gt;&lt;P&gt;repeatedly, keep your own secondary indices.&lt;/P&gt;&lt;P&gt;With a secondary index, you can replace a linear search with a&lt;/P&gt;&lt;P&gt;binary search plus an index access.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Entries: 1000, Line width: 100&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;               Key width:   20&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The READ locates the 500th entry.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;READ TABLE ITAB INTO WA&lt;/P&gt;&lt;P&gt;     WITH KEY DATE = SY-DATUM.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;  " ...&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;Entries: 1000, Line width: 100&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;               Key width:   20&lt;/P&gt;&lt;/LI&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;The READ locates the 500th entry.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;READ TABLE SEC_IDX INTO  SEC_IDX_WA&lt;/P&gt;&lt;P&gt;     WITH KEY DATE = SY-DATUM&lt;/P&gt;&lt;P&gt;          BINARY SEARCH.&lt;/P&gt;&lt;P&gt;IF SY-SUBRC = 0.&lt;/P&gt;&lt;P&gt;  READ TABLE ITAB INTO WA&lt;/P&gt;&lt;P&gt;                  INDEX SEC_IDX_WA-INDX.&lt;/P&gt;&lt;P&gt;  " ...&lt;/P&gt;&lt;P&gt;ENDIF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read with Binary search improves the performance.&lt;/P&gt;&lt;P&gt;Consider the following example.&lt;/P&gt;&lt;P&gt;In linear search If you are searching for a number 99 in a set of 100 numbers, you would hit the number 99 in the 99th time.&lt;/P&gt;&lt;P&gt;If you do it the binary way, you can get it in much lesser passes.&lt;/P&gt;&lt;P&gt;split the 100 numbers into two parts.&lt;/P&gt;&lt;P&gt;less than 50 and greater than 50.&lt;/P&gt;&lt;P&gt;If your number (99) is not there in the first part, you don;t need to search that set of 50 numbers at all.&lt;/P&gt;&lt;P&gt;Now, you have to search for only the second set of 50 numbers that is 51-100 only.&lt;/P&gt;&lt;P&gt;Again split the fifty numbers into two.&lt;/P&gt;&lt;P&gt;51-75 anf 76-100.&lt;/P&gt;&lt;P&gt;99 doesn't lie in 51-75.&lt;/P&gt;&lt;P&gt;It should be there in 76-100 only..so discard the 51-75 set.&lt;/P&gt;&lt;P&gt;Continue this process until you find the number.&lt;/P&gt;&lt;P&gt;Which would be less than 10 chances compared to 99 chances in linear search.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Tamá&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 08:40:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tables/m-p/2210529#M473387</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-01T08:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tables/m-p/2210530#M473388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Look at the below links&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb47446011d189700000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb47446011d189700000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb2d446011d189700000e8322d00/content.htm" target="test_blank"&gt;http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb2d446011d189700000e8322d00/content.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&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; Sudheer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 08:42:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tables/m-p/2210530#M473388</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-01T08:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/tables/m-p/2210531#M473389</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;U can see this useful link for wholesome info :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;http://help.sap.com/saphelp_nw04/helpdata/en/cf/21eb20446011d189700000e8322d00/content.htm&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 May 2007 08:43:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/tables/m-p/2210531#M473389</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-05-01T08:43:59Z</dc:date>
    </item>
  </channel>
</rss>

