Which internal table type allows unique and non-unique keys?

Which internal table type allows unique and non-unique keys?
A . Sorted
B . Hashed
C . Standard

Answer: C

Explanation:

The internal table type that allows both unique and non-unique keys is the standard table. A standard table has an internal linear index that can be used to access the table entries. The key of a standard table is always non-unique, which means that the table can contain duplicate entries. However, the system does not check the uniqueness of the key when inserting new entries, so the programmer can ensure that the key is unique by using appropriate logic. A standard table can be accessed either by using the table index or the key, but the response time for key access is proportional to the table size.

The other two internal table types, sorted and hashed, do not allow non-unique keys. A sorted table is filled in sorted order according to the defined table key, which must be unique. A sorted table can be accessed either by using the table index or the key, but the response time for key access is logarithmically proportional to the table size. A hashed table can only be accessed by using a unique key, which must be specified when declaring the table. A hashed table has no index, and the response time for key access is constant, regardless of the table size.

Reference: Internal Tables – ABAP Keyword Documentation, SAP ABAP: Types Of Internal Table Declaration – dan852.com

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments