SAP Knowledge Base Article - Preview

2396871 - Unexpect data sequence / sort order after internal table sort


1. The relative order of rows that do not have different sort keys is not retained when they are sorted.

   For example, internal table contains 3 columns <col1> <col2> <col3>, sorted by <col1> <col2>  ASCENDING:


   If it is sorted by <col1> <col2>  ASCENDING  again, the data are still in the correct order but the position of the rows with same sort keys may changes :


   The problem could happen randomly. And the problem may only happen in one system but not in another system, even there is no difference with data/kernel/

2. Using SORT command without AS TEXT option, the sort order of text/character(CHAR/STRING) fields is unexpect(not in accord with the country rules).

   The problem happens when the text/character fields contain non-numeric contents, like national characters(Chinese/Japanese...) or punctuation marks, blank characters, special technical

3. Using SORT command with AS TEXT option to sort text/character fields but the sort order is still unexpect.



ABAP System.


SAP NetWeaver all versions


select, unexpect sort order,  data sequence, sort stable, sort internal table, sort as text, national special characters, stable sorting, Chinese, Japanese, , KBA , BC-ABA-LA , Syntax, Compiler, Runtime , BC-I18 , Internationalization (I18N) , Problem

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.