<?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: internal tables in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2353979#M519895</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorted internal table works on Binary Search and Hashed internal tables works on hashed alogorthim through indexes&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Jun 2007 09:03:18 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-06-14T09:03:18Z</dc:date>
    <item>
      <title>internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2353977#M519893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;what is the difference between hashed &amp;amp; sorted internal &lt;/P&gt;&lt;P&gt;tables?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 08:49:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2353977#M519893</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T08:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2353978#M519894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;     Hashed table is useful when your have to work with very big internal table and to read it with &lt;/P&gt;&lt;P&gt;"READ TABLE WITH KEY ..." &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The time access is constant ! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorted tables store records in a "sorted" fashion at all times. It is faster to search through a sorted table vs a standard table. But performance is dictated by the amount of records in the internal table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A hashed table's performance in reads is NOT dependent on the number of records. However, it is intended for reads that will return only and only one record. It uses a "side-table" with a hash algorithm to store off the physical location of the record in the actual internal table. It is not NECESSARILY sorted/organized in an meaningful order (like a sorted table is). Please note that changes to a hashed tables records must be managed carefully. Review SAP's on-help in SE38/80 about managing hashed tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Definition of a Hashed Table: &lt;/P&gt;&lt;P&gt;"Defines the table as one that is managed with an internal hash procedure. You can imagine a hashed table as a set, whose elements you can address using their unique key. Unlike standard and sorted tables, you cannot access hash tables using an index. All entries in the table must have a unique key. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Access time using the key is constant, regardless of the number of table entries. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can only access a hashed table using the generic key operations or other generic operations (SORT, LOOP, and so on). Explicit or implicit index operations (such as LOOP ... FROM to INSERT itab within a LOOP) are not allowed." &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As long as your records has unique key(s), using hash table will give you a huge performance gain when dealing with large dataset. assuming in your case, 10000 record , and if the key is unique, use hash table. The main use of hash tables is for looking up fixed information from a key. So if you have a report that has personnel number and you want to display their name, you could use a hash table. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thus: &lt;/P&gt;&lt;P&gt;Code: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;types: begin of typ_pernr, &lt;/P&gt;&lt;P&gt;pernr like pa0001-pernr, &lt;/P&gt;&lt;P&gt;ename like pa0001-ename, &lt;/P&gt;&lt;P&gt;end of typ_pernr. &lt;/P&gt;&lt;P&gt;data: ls_pernr type typ_pernr, &lt;/P&gt;&lt;P&gt;lt_pernr type hashed table of typ_pernr with unique key pernr. &lt;/P&gt;&lt;P&gt;... &lt;/P&gt;&lt;P&gt;select pernr ename into table lt_pernr from pa0001. &lt;/P&gt;&lt;P&gt;... &lt;/P&gt;&lt;P&gt;loop at itab. &lt;/P&gt;&lt;P&gt;read table lt_pernr with table key pernr = itab-pernr &lt;/P&gt;&lt;P&gt;into ls_pernr. &lt;/P&gt;&lt;P&gt;write: ls_pernr-ename, itab-data. &lt;/P&gt;&lt;P&gt;endloop. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 08:52:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2353978#M519894</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T08:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2353979#M519895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorted internal table works on Binary Search and Hashed internal tables works on hashed alogorthim through indexes&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2007 09:03:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2353979#M519895</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-14T09:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: internal tables</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2353980#M519896</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;thanks to all  for responding to my query&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;suri&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2007 10:41:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-tables/m-p/2353980#M519896</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-06-15T10:41:10Z</dc:date>
    </item>
  </channel>
</rss>

