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

Internal Table Key

Former Member
0 Likes
281

According to the documentation, the default standard key contains the non-numeric components of a structure. If I only have numeric components, does a key get created?

For example, below itab1 has a key of my_index. But what is the key of itab2, if any?

Maybe it is a trivial question, but it is bugging me.

REPORT  z_itab_keys.

TYPES: BEGIN OF z_index,
         my_index  TYPE i,
         my_salary TYPE p,
       END OF z_index.

DATA:  z_itab1 TYPE TABLE OF z_index WITH NON-UNIQUE KEY my_index,
       z_itab2 TYPE TABLE OF z_index WITH NON-UNIQUE DEFAULT KEY.

1 REPLY 1
Read only

Former Member
0 Likes
265

Hi Jerry,

If you dont specify explicitly,there wont be any key for the internal table.

So itab2 has similar structure as itab1 but it doesnt take other properties of itab1 unless you specify.