When does SAP recommend to use a sorted or a hashed table respectively? Note: There are 2 correct answers to this question.

When does SAP recommend to use a sorted or a hashed table respectively? Note: There are 2 correct answers to this question.
A . A hashed table, when you read a single record and specify the complete key.
B . A hashed table, when you read a subset in a loop and specify a part of the key from the left without gaps.
C . A sorted table, when you read a subset in a loop and specify a part of the key from the left ^ without gaps.
D . A sorted table, when you read a single record and specify non key fields.

Answer: A, C

Explanation:

SAP recommends using different types of internal tables based on the operation and access pattern to optimize performance:

A hashed table, when you read a single record and specify the complete key – This is correct. Hashed tables are optimized for single-record access where the entire key is specified. They offer the fastest access time for such operations because the hash algorithm computes the storage location of the record directly from the key.

A sorted table, when you read a subset in a loop and specify a part of the key from the left without gaps – This is correct. Sorted tables are optimized for binary search when part of the key is specified, as long as it is from the leftmost part of the key and without gaps.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments