2016 Jun 06 9:43 AM
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
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
2016 Jun 07 2:44 PM
Hi Piyush,
did you already check SAP note 952625 ?
Best regards,
Nils Buerckel
2016 Jun 08 11:39 AM
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
2016 Jun 08 1:02 PM
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
2016 Jun 08 1:23 PM
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
2016 Jun 08 1:40 PM
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
2016 Jun 08 1:58 PM
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
2016 Jun 13 4:47 PM
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
2016 Jun 15 11:35 AM
Hello Nils,
Does that help? I have given the screen shots of the issue in my previous reply. Please check
Regards
Piyush
2016 Jun 15 12:41 PM
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
2016 Jun 15 4:55 PM
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
2016 Jun 17 11:24 AM
Hello Nils,
Any help out of my previous post?
Regards
Piyush
2016 Jun 17 12:42 PM
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
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |