<?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: Hash Tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-tables/m-p/2652845#M611612</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;A hased table is the kind of an internal table which is closest to a database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The fundamental difference is that the entries in a hashed table cannot be accessed through an index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, the following statement is not applicable to a hashed table - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE ITAB INDEX &amp;lt;n&amp;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;If you notice, even in case of a database table, let us say, SPFLI, we cannot say, "get me the 10th record of the table SPFLI". The entries can only be retrieved by specifying a "key". So you would have something like - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE ITAB WITH KEY....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is similar to a SELECT statement that we use for a database table. We specify the key fields in the WHERE condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obviously, a hashed table has to have a KEY, and cannot have duplicate entries for the key fields. Which is again just like in case of a database table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And finally, even though it is only used rarely, in some cases using a hashed table can improve the performance significantly - the reason being that the time required to fetch any record from a hashed internal table is constant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read this article about hashing techniques: &lt;A href="http://en.wikipedia.org/wiki/Hash_table#Time_complexity_and_common_uses_of_hash_tables" target="test_blank"&gt;http://en.wikipedia.org/wiki/Hash_table#Time_complexity_and_common_uses_of_hash_tables&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also check the link, here is sample code available, it will help u.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/what-is-use-of-using-hashed-table.htm" target="test_blank"&gt;http://www.sap-img.com/abap/what-is-use-of-using-hashed-table.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;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Priyanka&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Aug 2007 03:08:40 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-08-28T03:08:40Z</dc:date>
    <item>
      <title>Hash Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-tables/m-p/2652843#M611610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gurus&lt;/P&gt;&lt;P&gt;Can Any body explain me about HASH Tables(Advantages&amp;amp;disadvantages)Using this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;kalyan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 02:24:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-tables/m-p/2652843#M611610</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-28T02:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Hash Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-tables/m-p/2652844#M611611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi kalyan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hash tables are sorted using Hash algorithm, so here you need not to sort it again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;kishore&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 02:35:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-tables/m-p/2652844#M611611</guid>
      <dc:creator>kishorepallapothula</dc:creator>
      <dc:date>2007-08-28T02:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: Hash Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-tables/m-p/2652845#M611612</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;A hased table is the kind of an internal table which is closest to a database table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The fundamental difference is that the entries in a hashed table cannot be accessed through an index.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, the following statement is not applicable to a hashed table - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE ITAB INDEX &amp;lt;n&amp;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;If you notice, even in case of a database table, let us say, SPFLI, we cannot say, "get me the 10th record of the table SPFLI". The entries can only be retrieved by specifying a "key". So you would have something like - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;READ TABLE ITAB WITH KEY....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is similar to a SELECT statement that we use for a database table. We specify the key fields in the WHERE condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obviously, a hashed table has to have a KEY, and cannot have duplicate entries for the key fields. Which is again just like in case of a database table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And finally, even though it is only used rarely, in some cases using a hashed table can improve the performance significantly - the reason being that the time required to fetch any record from a hashed internal table is constant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read this article about hashing techniques: &lt;A href="http://en.wikipedia.org/wiki/Hash_table#Time_complexity_and_common_uses_of_hash_tables" target="test_blank"&gt;http://en.wikipedia.org/wiki/Hash_table#Time_complexity_and_common_uses_of_hash_tables&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also check the link, here is sample code available, it will help u.&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sap-img.com/abap/what-is-use-of-using-hashed-table.htm" target="test_blank"&gt;http://www.sap-img.com/abap/what-is-use-of-using-hashed-table.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;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Priyanka&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 03:08:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-tables/m-p/2652845#M611612</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-08-28T03:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: Hash Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-tables/m-p/2652846#M611613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kalyan..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Hashed Table Features:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;In this internal table system will not maintain the index. So we can access the records only using KEY.&lt;/P&gt;&lt;P&gt;Key must be always UNIQUE.&lt;/P&gt;&lt;P&gt;To access a record it will pass the Keyfield values to a HAsh algorithm which returns the Address of the Record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Advantages:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;Access time to a record is Constant in Hashed table .. So it will be efficient.&lt;/P&gt;&lt;P&gt;Very large internal tables can be declared as Hashed tables since Access time will not vary based on the No of records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Disadvantages:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;We cannot access them using index&lt;/P&gt;&lt;P&gt;We cannot store duplicate rows in hashed table. It will give a runtime error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;Reward if Helpful&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Aug 2007 03:40:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-tables/m-p/2652846#M611613</guid>
      <dc:creator>varma_narayana</dc:creator>
      <dc:date>2007-08-28T03:40:52Z</dc:date>
    </item>
    <item>
      <title>Re: Hash Tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hash-tables/m-p/2652847#M611614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanq for u r answer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Sep 2007 04:00:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hash-tables/m-p/2652847#M611614</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-01T04:00:58Z</dc:date>
    </item>
  </channel>
</rss>

