Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Hash Algorithm

Former Member
0 Likes
2,097

Hi Experts,

Pls explain Hash Algorithm with one example

Thanks In Advance,

Ur's

Harsha.

3 REPLIES 3
Read only

sukhbold_altanbat
Active Participant
0 Likes
801

Hi Harsha,

check these out (general information):

<a href="http://en.wikipedia.org/wiki/Hash_function">Hash function</a>

<a href="http://en.wikipedia.org/wiki/Hash_table">Hash table</a>

<a href="http://en.wikipedia.org/wiki/Hash_list">Hash list</a>

<a href="http://en.wikipedia.org/wiki/Hash_tree">Hash tree</a>

Regards,

Sukhee

Read only

0 Likes
801

these links are not opened it's showing Error.

Read only

Former Member
0 Likes
801

if you want a internal table which allows faster reading then you should go for hashed table , but the disadvantage is that you cannot use index to read the hashed itab.

you have to use keys.

sample declratin of hashed table.

data:cc_text TYPE HASHED TABLE OF /bi0/tcostcenter WITH UNIQUE KEY co_area costcenter langu .

to read entries from the hashed table.

READ TABLE cc_text INTO wa_cc_text WITH KEY

co_area = coarea

costcenter = cctr

langu = sy-langu .

Hash table access time dosent increase based on the number of records, its constant.

check out the ABAP key work documentation for different types of internal table and their usages.

> How Hash Algorithm and Logarithmic Algorithm works

> to fetch the data ?

Fetching part is the same as standard internal table, only when you work with the internal table, than it's different.

> What the basic things we have to keep in mined when

> we select the Internal table ?

Eg Performance.

> Any rule for selecting the internal table which

> should be followed ?

Standard table is quite easy to use, but you might loose performance with it. Most of the time hash table is the fastest.

Using standard table and sort it is a good choice, when you access in READ TABLE via BINARY SEARCH.

Check 'ABAP for Power Users' SAP tutorial in SDN, it very good explains this topic in detail.

http://www.sap.info/public/en/category.php4/Category-28943c61b1e60d84b/page/0/article/Article-119884...

Regards,

Pavan