Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

binary search .

ravi_kumar221
Participant
0 Kudos
110

hi   binary     searchn not    working

data itab type  table of sflight  .

data itab1 type  sflight  .

sort  itab .

read table     itab   with table key carrid = 'AA' into  itab1   binary search

Program Z

The addition "BINARY SEARCH" must not be used with index access or

general table search. .

Moderator Message: Please read SAP help.

Message was edited by: Kesavadas Thekkillath

1 REPLY 1

Kartik2
Contributor
0 Kudos
58

Hi,

If you have such basic doubts then please go through the f1 documentation for statement. Here your construct of the statement is completely wrong

   READ TABLE lt_table INTO ls_table
                    WITH KEY field = lv_value
                    BINARY SEARCH.

Regards,

Kartik