I am working on performance tuning of a report and have come across following situation:
loop at itab
Read table ITAB2 with key field 1 = itab-field1
, field 2 = itab-field2
field 3 = itab-field3
field4 = itab-field4
field5 = itab-field5
if sy-subrc <> 0.
append itab to itab2
modify ITAB2 from itab index lv_index
this code takes couple of minutes to execute , i wanted to using sorting on ITAB2 with 5 fields in where clause and use binary search but the problem is
sorting will get destroyed by the records gets modified.
I tried sorting in loop itself but it will be a performance issues too.
Can some please advice if how can i use a binary search here ?