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: 
Read only

Order mismatch in selected data using Select query

Phalani2
Participant
0 Likes
1,293

Hello Experts,

We are upgrading from 4.6C to ECC6. I came across a select query on a custom table, which gives different order of data from 4.6C to ECC6. Data (no. of records) is same in both the servers but order is different. Table doesn't have indexes in either 4.6C or ECC6. What would be the cause for order change?

Further, in 4,6C, ECC6 and data bases order of the data is totally different. Select query have some conditions in where clause with select options, but in both the cases (4.6C and ECC6) I am not passing any data from the selection screen so am getting entire data from the data base.

Thanks in advance

Phalani

6 REPLIES 6
Read only

Former Member
0 Likes
1,185

As per my understanding , the order of records that you get , need not necessary be same each time you fetch from table and that's why we sort as per our requirement.

So, there is no issue , if number of records are same.

Read only

0 Likes
1,185

Thanks for the response Harsha,

you are right, as long as the data is same there is no change in the result, but I wanted to know the exact reason for the order mismatch. There is are no key words I used to sort the content. Any other clue?

Thanks

Phalani

Read only

former_member194669
Active Contributor
0 Likes
1,185

My guess will be please combare all the field domain in 4.6c and ECC for that custom table, may be any domain got changed ?

a®

Read only

0 Likes
1,185

Thanks for your response a®s

I compared all the field domains and even program where I have select query written in 4.6c and ECC and found no difference.

Any another clue.

Thanks

Phalani

Read only

0 Likes
1,185

From the SAP service market place I found that

1. Unless we use SORT or ORDER BY clause the order of the data is not in our control.

2. In 4.6C, two same select queries never give the result in the same order, if the primary key contains character fields.

Thanks for your help.

Phalani

Read only

0 Likes
1,185

hello PLaz,

could you please share that link you found in sap service market place. because i am facing the same issue during our upgrade.

Thanks,

Munvar Basha.