Application Development and Automation 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 seach using ABAP!!

Former Member
0 Kudos
81

Hi

Request you to send me code which assimilates the behavious of binary search algorithm using ABAP

Regards

Gunjan

2 REPLIES 2

Former Member
0 Kudos
57

the entire binary search algortithm is consolidated into a single statement in ABAP.

sort itab by matnr.

read table itab with key matnr = v_matnr binary search.

REgards,

Ravi

Former Member
0 Kudos
57

hi Gunja,

You can use BINARY SEARCH statement in a read table statement to assimilate ..

  read table it_mara with key <conditions> binary search.

Regards,

santosh