Hashed Table

Why Trust Techopedia

What Does Hashed Table Mean?

A hashed table or hash table is a special type of internal table used in ABAP programs, where by using the hash functionality, the necessary table record is obtained. Like other types of internal tables, hashed tables are also used to extract data from standard SAP database tables by means of ABAP programs or ABAP objects. However, unlike other types of internal tables like standard or sorted, hash tables cannot be accessed using an index. As with database tables, hashed tables also require a unique key.

Techopedia Explains Hashed Table

The features of a hashed internal table include:

Advertisements

To declare an internal table a hashed table, the declaration of the internal table should contain the keywords ‘TYPE HASHED TABLE’. This would make the internal table accessible to the internal HASH algorithm.
The unique key must be declared when a HASH table is to be used as it is mandatory in the HASH algorithm. The unique key is defined by the keyword ‘UNIQUE KEY’.
A hash table allows the table read to have costs independent of table size.
Hashed tables are preferred over other types of internal tables when there are large data sets with lots of reads and a negligible number of writes. Hashed tables are also ideal for processing large amounts of data.
Regardless of the number of table entries present, the response time for key access in a hashed table remains constant.
Hashed tables work comparatively faster only for full table keys and cannot work for ranges .

Advertisements

Related Terms

Margaret Rouse
Senior Editor
Margaret Rouse
Senior Editor

Margaret is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages.