Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Sorting not working correctly for date field in alv report

former_member242512
Participant
0 Kudos

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.

1 ACCEPTED SOLUTION

kesavadas_thekkillath
Active Contributor
0 Kudos

The field wa_tab-bldat is of type char10

Then what it does is correct.

Refer to type datum...it will work

2 REPLIES 2

kesavadas_thekkillath
Active Contributor
0 Kudos

The field wa_tab-bldat is of type char10

Then what it does is correct.

Refer to type datum...it will work

former_member242512
Participant
0 Kudos

I changed the type wa_tab-bldat from char10 to bldat.

Now according to user-settings the date is displayed correctly and sorted correctly.

Thanks !