SAP Certified Associate – ABAP Cloud Developer — Question 13
When does SAP recommend to use a sorted or a hashed table respectively? (Choose two.)
Answer options
- A. A hashed table, when you read a single record and specify the complete key.
- B. A sorted table, when you read a subset in a loop and specify a part of the key from the left without gaps.
- C. A hashed table, when you read a subset in a loop and specify a part of the key from the left without gasp.
- D. A sorted table, when you read a single record and specify non-key fields.
Correct answer: A, B
Explanation
Answer A is correct because hashed tables are optimized for retrieving single records using the full key, allowing for efficient access. Answer B is also correct since sorted tables excel when reading subsets in a loop with a portion of the key specified from the left without gaps. The other options, C and D, do not align with SAP's recommendations for using hashed and sorted tables in the described scenarios.