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: 

Sorting issue for table in Quality system

Former Member
0 Kudos

Hello Experts,

I have come across a scenario wherein when there is sort performed in the table in Quality system, it doesn't sort in the way it is expected to. However there is no change in the code rather it is the standard sort statement. It seems that the sort is performed only on the last row in the table. Also, when I checked the same thing in production, it works fine.

Here is what I have already checked:

1) Code page version for both the systems are same

Please suggest.

Regards

Piyush

12 REPLIES 12

nils_buerckel
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Piyush,

did you already check SAP note 952625 ?

Best regards,

Nils Buerckel

0 Kudos

Hello Nils,

It seems that note is specifically related to Sorting of texts. Couldn't receive much help with this. Please suggest further.

Regards

Piyush

nils_buerckel
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Piyush,

well - textual sorting can differ depending on the environment. If you do not use sort as text,  I would propose that you provide an example ...

Regards,

Nils

0 Kudos

Hi Piyush,

possibly this URL will help to check the sorting issue:

Sorting behaviour with different endianesses - Basis Corner - SCN Wiki

There is a binary sort order and a lexical sort order.

Possibly you have to sort with "SORT itab AS TEXT" with the addition STABLE.

Best regards,
Andreas

Former Member
0 Kudos

Hi,

I have only confusion that how come the same sort statement works absolutely fine in Quality but not in production. Also it is standard sort, do we really to make any change in this standard sort which works fine in Quality? please suggest

nils_buerckel
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Piyush,

I think it is not feasible(and not efficient) to just "guess blindly" what is causing the problem.

This problem can have multiple reasons ...

As an example you might have a look at http://scn.sap.com/thread/3253765 .

Regards,

Nils

0 Kudos

Hello Nils,

Sorry for the delay in my response.  Was away for sometime.

Here is the example:

The Standard Sort statement as follows:

Before Sort:

After Sort:

Expected:

Please suggest.

Regards

Piyush

0 Kudos

Hello Nils,

Does that help? I have given the screen shots of the issue in my previous reply. Please check

Regards

Piyush

nils_buerckel
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Piyush,

sorry, but I have problems to understand this ....

You want to sort a table by field tech, which is empty for all entries ...

Actually both screen shots "after sort" and "expected" do not at all look like they were sorted ...

Regards,

Nils

0 Kudos

Hello Nils,

Currently the Column Tech is empty. If you have look at Column named "COL_POS", that is where we could make out the sort difference. Please check.

Also, to re-confirm as mentioned in my first post, I get the "Excepted" sort outcome In Quality system however this sort doesn't work in Production as it does in Quality.

Regards

Piyush

0 Kudos

Hello Nils,

Any help out of my previous post?

Regards

Piyush

nils_buerckel
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Piyush,

still not sure if I got it right.

You do a sort on a field with similar values for all entries (tech = <EMPTY>) and you expect that this will result in the same sequence for all systems ?

In fact if you do not use the addition STABLE, then the sort will even differ on the same system from time to time.

You might need to extend the sort to another field of the table which contains different values ...

Best regards,

Nils