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

Define hashed table using database table

Former Member
0 Likes
396

Hi,

I have a database table and would want to define a hashed table using this table structure, how would I do that?

Thanks

RT

1 ACCEPTED SOLUTION
Read only

suresh_datti
Active Contributor
0 Likes
365

DATA itab TYPE HASHED TABLE OF spfli

WITH UNIQUE KEY carrid connid.

~Suresh

2 REPLIES 2
Read only

suresh_datti
Active Contributor
0 Likes
366

DATA itab TYPE HASHED TABLE OF spfli

WITH UNIQUE KEY carrid connid.

~Suresh

Read only

Former Member
0 Likes
365

Hi Rob,

The syntax is as follows,

DATA ITAB TYPE HASHED TABLE OF SPFLI

WITH UNIQUE KEY CARRID CONNID.

The table object ITAB has the type hashed table, a line type corresponding to the flat structure SPFLI from the ABAP Dictionary, and a unique key with the key fields CARRID and CONNID. The internal table ITAB can be regarded as an internal template for the database table SPFLI. It is therefore particularly suitable for working with data from this database table as long as you only access it using the key.