Tuesday, 9 August 2016

Different types of Internal Tables based on Sorting Techniques


  1. Standard internal table.
  2. Sorted internal table.
  3. Hashed internal table.

Standard internal table.

  1. By default any internal table is standard internal table.
  2. This is follows linear search(one by one) algorithm.
  3. Searching time is proportional to number of records.
  4. Syntax :
Data : <internal table >  TYPE STANDARD TABLE OF <TB /STR name> WITH NON-UNIQUE KEY  <key > WITH HEADER LINE.

Sorted internal table.

  1. This is follows binary search help.
  2. It supports unique as well as no-unique key.
  3. Syntax :
Data : <internal table >  TYPE SORTED TABLE OF <tab/str name>
            WITH <UNIQUE / non-unique > KEY <keyname>  WITH HEADER LINE .


Hashed internal table.

  1. There is no non-unique key.
  2. Its follows index based search.
  3. Syntax :
Data : <internal table > TYPE HASHED TABLE OF <TB/STR NAME>
             WITH UNIQUE KEY <KEY> WITH HEADER LINE. 

Note : WITH HEADER LINE is optional .

No comments:

Post a Comment