Application Development 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: 

Define hashed table using database table

Former Member
0 Kudos

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

suresh_datti
Active Contributor
0 Kudos

DATA itab TYPE HASHED TABLE OF spfli

WITH UNIQUE KEY carrid connid.

~Suresh

2 REPLIES 2

suresh_datti
Active Contributor
0 Kudos

DATA itab TYPE HASHED TABLE OF spfli

WITH UNIQUE KEY carrid connid.

~Suresh

Former Member
0 Kudos

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.