<?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 Table ! Accessing Issue! in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-accessing-issue/m-p/2788357#M650249</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;   I want to know what is binary search, linear search, hash algorithm will do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       or whats mean by them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Pls give specific answers.&lt;/P&gt;&lt;P&gt;   Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Sep 2007 17:35:22 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-09-05T17:35:22Z</dc:date>
    <item>
      <title>Internal Table ! Accessing Issue!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-accessing-issue/m-p/2788354#M650246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Guys!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Internal table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Sorted, Hashed, Standard&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For accesing itab uses,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Standard---&amp;gt; uses Linear Search&lt;/P&gt;&lt;P&gt;   Sorted ---&amp;gt; Binary Search&lt;/P&gt;&lt;P&gt;   Hashed-----&amp;gt; Hash Algorithm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Can u pls tell me what is linear search, binary search, hash algorithm?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   And also,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;    Why we mostly go for standard table? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  PLs give ur suggestions,&lt;/P&gt;&lt;P&gt;  Thanks for your answers&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Thanks&lt;/P&gt;&lt;P&gt;    Rahul.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Alvaro Tejada Galindo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2007 17:09:37 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-accessing-issue/m-p/2788354#M650246</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-05T17:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table ! Accessing Issue!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-accessing-issue/m-p/2788355#M650247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;
*Standard---&amp;gt; uses Linear Search

READ TABLE T_TAB WITH KEY FIELD = LS_FIELD.

*Sorted ---&amp;gt; Binary Search
*(Table is always sorted)

READ TABLE T_TAB WITH KEY FIELD = LS_FIELD
BINARY SEARCH.

*Hashed-----&amp;gt; Hash Algorithm
*Not sure...
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Blag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2007 17:16:14 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-accessing-issue/m-p/2788355#M650247</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-05T17:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table ! Accessing Issue!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-accessing-issue/m-p/2788356#M650248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TABKIND - Internal Table Types &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatives: &lt;/P&gt;&lt;P&gt;1. STANDARD TABLE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. SORTED   TABLE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. HASHED   TABLE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4. INDEX    TABLE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5. ANY      TABLE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Effect &lt;/P&gt;&lt;P&gt;The table type - set in the DATA, TYPES, orCREATE DATA statement, specifies how the system accesses entries in the internal table in generic key operations. &lt;/P&gt;&lt;P&gt;(READ TABLE itab, DELETE TABLE itab, INSERT TABLE itab, MODIFY TABLE itab, COLLECT itab). As a general rule, the runtime required for key operations depends on the total length of the key. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The various table types have the following hierarchy: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;                         ANY TABLE &lt;/P&gt;&lt;P&gt;                             | &lt;/P&gt;&lt;P&gt;                   -&lt;/P&gt;&lt;HR originaltext="--------------------" /&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;                   |                   | &lt;/P&gt;&lt;P&gt;               INDEX TABLE      HASHED TABLE &lt;/P&gt;&lt;P&gt;                   | &lt;/P&gt;&lt;P&gt;         -&lt;/P&gt;&lt;HR originaltext="--------------------" /&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;         |                   | &lt;/P&gt;&lt;P&gt;    STANDARD TABLE      SORTED TABLE &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternative 1 &lt;/P&gt;&lt;P&gt;STANDARD TABLE &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;Effect &lt;/P&gt;&lt;P&gt;Defines the table as a standard table. Key access to a standard table uses a linear search. This means that the timne required for a search is in linear relation to the number of table entries. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should use index operations to access standard tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the sake of compatibility, you can use TABLE as a synonym of STANDARD TABLE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternative 2 &lt;/P&gt;&lt;P&gt;SORTED TABLE &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;Effect &lt;/P&gt;&lt;P&gt;Defines the table as one that is always saved correctly sorted. Key access to a sorted table uses a binary key. If the key is not unique, the system takes the entry with the lowest index. The runtime required for key access is logarithmically related to the number of table entries. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also access sorted tables by index operations. When you insert using an index, the system checks to ensure that the sort sequence has been correctly maintained. For this reason, it takes longer than inserting entries in a standard table. As a rule, you should only access sorted tables using their 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;Alternative 3 &lt;/P&gt;&lt;P&gt;HASHED TABLE &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;Effect &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. 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 oe INSERT itab within a LOOP) are not allowed. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternative 4 &lt;/P&gt;&lt;P&gt;INDEX TABLE &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;Effect &lt;/P&gt;&lt;P&gt;Standard and sorted tables belong to the generic class index tables. An index table is one that you can access using an index. You can currently only use the table type INDEX TABLE to specify the type of generic parameters in a FORM or a FUNCTION. Hashed tables are not index tables, and cannot therefore be passed to parameters defined as INDEX TABLE. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternative 5 &lt;/P&gt;&lt;P&gt;ANY TABLE &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;Effect &lt;/P&gt;&lt;P&gt;Like INDEX TABLE, you use ANY TABLE to specify the type of any generic table parameter. The set of permitted operations for a table with type ANY TABLE consists of the intersection of all permitted operations for STANDARD, SORTED and HASHED TABLEs, and so is identical to the set of operations permitted for hashed tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note in particular that you cannot use index access for tables with this type.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2007 17:16:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-accessing-issue/m-p/2788356#M650248</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-05T17:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table ! Accessing Issue!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-accessing-issue/m-p/2788357#M650249</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;   I want to know what is binary search, linear search, hash algorithm will do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;       or whats mean by them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Pls give specific answers.&lt;/P&gt;&lt;P&gt;   Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2007 17:35:22 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-accessing-issue/m-p/2788357#M650249</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-05T17:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table ! Accessing Issue!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-accessing-issue/m-p/2788358#M650250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rahul..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us assume that data in the internal table is sorted and take the scenario like this. We have 1 to 10 records in the internal table and we need to access the 3rd record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Linear search: In the method search will start from the first record and progress towards the last record. whenever it reaches the required record the search will ends. The time taken for this search depends on the number of records in the internal table means time is variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Binary search: In this method the total records will be splitted into 2 groups. 1 group will have 1 to 5 records and other will have 6 to 10 records. Our requirement 3rd record is falling in the first half. so second half will be discarded. Now the active first half will be divided into 2 halfs. 1 to 3 will be in one group and 4 to 5 will be in another group. our requirement 3rd record is in first half. So, second half will be discarded. This procedure will be followed till it finds the required record. The time taken for search will depends on the number of records in the internal table means time for search is variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hashed Alogorithm: This is an special kind of search algorithm based on the 3rd order polynomial. The specific advantage of using hashed algorithm is time for search is constant. That means, the time taken for finding out the first record and tenth record are same.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this will useful for u...&amp;lt;b&amp;gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;veerendra&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Alvaro Tejada Galindo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2007 18:24:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-accessing-issue/m-p/2788358#M650250</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-05T18:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table ! Accessing Issue!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-accessing-issue/m-p/2788359#M650251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi virendra!&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;&lt;P&gt;    Thanks for your good reply!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;      I want to know generally we used to go for standard internal table why?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;   Pls give the Answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;&amp;lt;REMOVED BY MODERATOR&amp;gt;&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Thanks&lt;/P&gt;&lt;P&gt;   Rahul.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: &lt;/P&gt;&lt;P&gt;        Alvaro Tejada Galindo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Sep 2007 18:38:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-accessing-issue/m-p/2788359#M650251</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-05T18:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: Internal Table ! Accessing Issue!</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-accessing-issue/m-p/2788360#M650252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use standard tables because I find them more flexible. A sorted table stays sorted by its keys. If you want it sorted in a different order, you need a separate table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A standard table can be sorted and resorted over and over again.&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, 05 Sep 2007 21:49:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/internal-table-accessing-issue/m-p/2788360#M650252</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-09-05T21:49:16Z</dc:date>
    </item>
  </channel>
</rss>

