Alex Rivera | Logout

Difference between Standard table and Hashed table Abap

Asked 2012-02-24T17:29:02.237
10

Can you please give me a clear explanation on the difference between using "standard table of", "Hashed table of", or simply "table of". Also what is the meaning of "initial size 0"?

For reference please have a look in to below code..

it_c01_d006_raw TYPE STANDARD TABLE OF /bic/ac01_d00600
                       INITIAL SIZE 0,
it_c01_d006     TYPE HASHED TABLE OF /bic/ac01_d00600
                       WITH UNIQUE KEY /bic/cemployee /bic/cdatetype,
it_c01_d002     TYPE TABLE OF /bic/ac01_d00200.
Edit
Report

1 Answer

7

Standard table

This is the most appropriate type if you are going to address the individual table entries using the index. Index access is the quickest possible access. You should fill a standard table by appending lines (ABAP APPEND statement), and read, modify and delete entries by specifying the index (INDEX option with the relevant ABAP command). The access time for a standard table increases in a linear relationship with the number of table entries. If you need key access, standard tables are particularly useful if you can fill and process the table in separate steps. For example, you could fill the table by appending entries, and then sort it. If you use the binary search option with key access, the response time is logarithmically proportional to the number of table entries.

Hashed tables

This is the most appropriate type for any table where the main operation is key access. You cannot access a hashed table using its index. The response time for key access remains constant, regardless of the number of table entries. Like database tables, hashed tables always have a unique key. Hashed tables are useful if you want to construct and use an internal table which resembles a database table or for processing large amounts of data.manu

answered 2012-04-25T10:13:31.810

Your Answer