SAP Knowledge Base Article - Public

3426361 - Sort Ascending and Descending of the Invoice ID is not Working as Expected

Symptom

The Ascending and Descending sorting of the Invoice ID field is not working as expected.

Environment

SAP Business ByDesign

Reproducing the Issue

In our example you have set up a document numbering rule for Customer Invoices with the prefix RE and the suffix as the current year (e.g. 2024).

Go to the Customer Invoicing work center. 

Select the Invoice Documents view. 

Show All Invoice Documents.

In the Invoice ID column select e.g. Sort Ascending.

The results are sorted as follows:

RE-1-2024

RE-10-2024

RE-100-2024

RE-109-2024

RE-11-2024

RE-111-2024

 

You expect them to be sorted:

RE-1-2024

RE-2-2024

RE-3-2024

...

RE-9-2024

RE-10-2024

...

RE-99-2024

RE-100-2024

etc. 

Cause

The field Invoice ID us an alphanumeric field and combines alphabets and numbers. and is therefore alphanumeric instead of number (numeric).

Any alphanumeric sorting places the alphabets in order, and then the numbers in order by their first numeral, so 10 and 100 etc. will come before 2.

Thus, when you sort by Invoice ID, it is not following an ascending order of numbers but the described pattern of the alphanumeric sorting rule.

Resolution

This is the expected system behavior.

Keywords

Sorting; numbers; sequence; alphanumeric; numeric; characters; ID;  , KBA , SRD-CRM-INV , Customer Invoicing , Problem

Product

SAP Business ByDesign all versions