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

Hashed table -- Operations on it.

Former Member
0 Likes
2,713

Hi,

tell me any one way of inserting data in to hashed table,

and operations possible on the hashed table.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,544

Hi Kranthi,

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 to INSERT itab within a LOOP) are not allowed."

Hashed table is useful when your have to work with very big internal table and to read it with

"READ TABLE WITH KEY ..."

And,

http://If its possible to declare a standard table with same type as hashed table.

Move your data to a standard table with the same Type as your dynamic hashed table.

tb_stand] = tb_hash[.

And access the records of the standard table.

kindly reward if found helpful.

cheers,

Hema.

7 REPLIES 7
Read only

Former Member
0 Likes
1,545

Hi Kranthi,

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 to INSERT itab within a LOOP) are not allowed."

Hashed table is useful when your have to work with very big internal table and to read it with

"READ TABLE WITH KEY ..."

And,

http://If its possible to declare a standard table with same type as hashed table.

Move your data to a standard table with the same Type as your dynamic hashed table.

tb_stand] = tb_hash[.

And access the records of the standard table.

kindly reward if found helpful.

cheers,

Hema.

Read only

0 Likes
1,544

then how does hashed table can be filled, before i read the same with many options you have given, it should have data before i copy it to some other internal table?

so how can it be filled?

my question is how to insert data into hashed internal table.

Read only

Former Member
0 Likes
1,544

Take a look at this sample code:

http://www.sap-basis-abap.com/abap/use-hashed-tables-to-improve-performance.htm

It shows the different operations done on hashed tables.

Read only

Former Member
0 Likes
1,544

Hi..

About hashed table..

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.

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.

U can have other operations like MODIFY statement

APPEND, COLLECT, INSERT, READ TABLE ..but

With all changing accesses to individual rows of sorted and hashed tables you must not change the content of the table key.

regards

Sheeba

Read only

0 Likes
1,544

i want fill hash table expilcitly using work area not from select statement?

please suggest solution.

Read only

Former Member
0 Likes
1,544

thanks guys,

i got the answer. points rewarded.

Read only

Former Member
0 Likes
1,544

thread is completed