Skip to Content
0
Former Member
Feb 16, 2007 at 02:55 PM

Problem with Binary search statement

46 Views

Hi,

I have problem with reading the internal with Binary search.

I have two internal tables BSAS and BSIS. In BSAS I have 1,200,000 line items and BSIS 500,000 line items. I need to delete the line items if BSIS-BELNR NE BSAS-AUGBL.

I am using the following code :

LOOP AT gt_bsas .

READ TABLE gt_bsis WITH KEY bukrs = gt_bsas-bukrs

belnr = gt_bsas-augbl

gjahr = gt_bsas-gjahr.

IF sy-subrc NE 0.

DELETE gt_bsas.

CLEAR gt_bsas.

ELSE.

-


endif.

endloop.

By this execution of the loop is taking long time. If I use the binary search it is fast but result is not correct.

Please suggest me, how to resolve this issue.

Thanks,

Sri.