Skip to Content
0
Former Member
Jul 26, 2016 at 02:04 PM

Sorting Character string numerically

3071 Views

Hey guys, I have an ALV Grid that needs to display a column of numbers with units at the end. the unit may change example Kg, mm, cm. Within the ALV, if they click on the sorting buttons, it does not sort correctly.It is because as a string it sorts differently from how numbers sort.. Example data: 1. 850,000 mm 2. 77,000 mm 3. 740,000 mm It sorts the data as : 1. 740,000mm 2.77,000 mm 3. 850,000 mm Instead it should sort data as: 1. 77,000mm 2.740,000 mm 3. 850,000 mm. Please help me. I have checked the following discussion, but was not helpful. https://scn.sap.com/thread/3429747 Regards Dilip S