Hashed vs Sorted Tables
Task
Populate both a HASHED and a SORTEDinternal table and demonstrate optimized READ access. Choose the correct table type for key-based lookup.
Write Your ABAP Code
Loading...
💡 Hint
Use READ TABLE ... WITH KEY. Hashed tables provide constant-time access.
✅ View Reference Solution
ls_row-key = 'A'. ls_row-value = 10. INSERT ls_row INTO TABLE lt_hashed. INSERT ls_row INTO TABLE lt_sorted. READ TABLE lt_hashed INTO ls_row WITH KEY key = 'A'.