

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Sorting an already sorted internal table in ABAP
If you leave 2nd sort, it would be quicker as itab will be there in right order.
SORT itab by f1 f2 f3. READ TABLE itab WITH KEY f1 = 'A' f2 = 'B' f3 = 'C' BINARY SEARCH. READ TABLE itab WITH KEY f1 = 'A' BINARY SEARCH.
When 2nd READ TABLE is by f2, you should leave the SORT and BINARY SEARCH as well. In best case scenario, SORT + BINARY SEARCH speed is n+log(n).
Also note that worst case of sort is n log n.
- Related Questions & Answers
- Inserting rows to an internal table through debug in SAP ABAP
- Adding rows in an internal table with header line in SAP ABAP
- Large to Small Sorting Algorithm of already sorted array in JavaScript
- Finding a particular value in internal table itab in ABAP
- Modification not working for both internal table and control table in SAP ABAP
- Difference between Work area, global structure and internal table in SAP ABAP
- Usage of subqueries in internal table as condition in SAP ABAP source code.
- How to map output of a function to an internal table in SAP ABAP using Gateway service
- Using SAP ABAP, how can I read content of CSV files in a directory to an internal table?
- In ABAP, How to select all the data into my internal table using loops?
- Checking number of rows in an internal table in SAP
- Is it possible to delete the actives while you are running a loop over an internal table in SAP ABAP?
- How to insert auto_increment in an already created table in MySQL?
- Saving an internal table to SAP directory in csv format
- Saving an internal table to SAP directory in csv format
Advertisements