Skip to Content
0
Former Member
May 15, 2008 at 07:07 PM

Sort statement behaviour

218 Views

I am working on a performance tuning of an extract that runs for 7 hrs. Well, I got it down to 1 hour but noticing the data differences (Telephone numbers). And when I debugged the old and new, noticed the sort statement behaves differently. Both programs use the same sort statement.

SORT t_adr2 BY addrnumber date_from.

One sorts in the order

tel1

tel2

tel3

and other sorts

tel3

tel2

tel1

The program reads the first telephone number that it gets after sorting.

Read itab index 1.

Because the sort order is different I am getting different values from old and new programs. Any feedback will be appeciated.

P.S - When I run both the programs for just one customer, I don't run into this issue. Both the programs return me the same values. But they are different when I run the program wide open.

Thanks

Anu