Skip to Content
0
Former Member
Feb 09, 2011 at 11:37 AM

Sorting not working correctly for date field in alv report

304 Views

Hi All,

My report displays many rows also containing date type fields of bldat,budat .

When I sort the report selecting field of type bldat budat the sorting is not correct for the year.

Ex:

Invoice doc dat 
01-25-2011
01-21-2011
02-02-2011
10-25-2010
11-20-2010

If I use ascending then it is sorted as :

Invoice doc dat 
01-21-2011
01-25-2011
02-02-2011
10-20-2010
10-25-2010

Why the sorting is not working correct for year.(2010 records should have been first).

The field wa_tab-bldat is of type char10.

It is populated as wa_tab-bldat = bsak-bldat.

Kindly suggest what can be done.