SAP Knowledge Base Article - Preview

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

Symptom

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:

1.PNG

   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 :

2.PNG

   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/package.eg.

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 characters.eg

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


Read more...

Environment

ABAP System.

Product

SAP NetWeaver all versions

Keywords

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.