sapdev logo background
sapdev logo sapdev logo
Comments

SAP SORT TEXT RULES documentation, setup help and example usage



Return to SAP documentation index


ARTICLE

Rules for Sorting
You may want to sort data according to the
locale of the text environment instead of the usual binary sort. You can do this using SORT ... AS TEXT for an internal table or an extract . You can also use CONVERT ... INTO SORTABLE CODE to generate a field that reproduces the order according to the locale of the text environment.
The locale is either predefined, or can be set explicitly in a program using the SET LOCALE statement.
The result of a locale -specific sort depends on the operating system of the
application server , since its locale determines the way in which data is sorted. While the sequence of letters belonging to the active language is the same on any operating system, different operating systems differ in how they treat those characters that do not belong to the alphabet of the current language.
In sorting whole words, slight differences may occur in the sort order of letters from the active language.
Furthermore, the sequence of upper- and lowercase letters depends on the operating system.
You cannot assume that locale -specific sorting will produce worthwhile result.
Remember that you must reckon with differences between operating systems!
For this reason, never assume a particular sort order in your program code!
SAP is currently in discussion with various operating system manufacturers about unifying the sort order. This should become available in a future release. This means that the sort sequence could, in future, change from its current rules.
Documentation extract taken from SAP system, � Copyright SAP AG. All rights reserved




SORT_TEXT_ABEXA
SOURCE_CODE_ENHANCEMENT




comments powered by Disqus