cancel
Showing results for 
Search instead for 
Did you mean: 

Table view sort

Former Member
0 Kudos

Hello experts,

I have placed a table view in our application with sort as server sort.

There is a column in that table view which displays the period say 09.2007 .

It is of type character of length 10. When i sort using that column, my results get sort taking into account only the month and not the year.

for eg.,

02.2006

03.2007

04.2005

Let me know your suggestions.

Thanks in advance,

Vijayalakshmi

Accepted Solutions (0)

Answers (2)

Answers (2)

raja_thangamani
Active Contributor
0 Kudos

Since you mentioned type as <b>character</b>, the values 02.2006

03.2007

04.2005 will be considered as character, it wont take it as date/year.

<i>*Reward each useful answer</i>

Raja T

daniel_humberg
Contributor
0 Kudos

Hi Brigitte,

i think you either have to go for sort=application, or you have to display it as

"2007.03" instead of "03.2007" (that's what I usually do in excel, where you have the same sorting problem).

A third option (if you use an iterator) would be to add a new column to the internal table (e.g. called "SORT_COL"), where you write "200703", while keeping "03.2007" in the original column. Then you specify column_key = "SORT_COL" in the iterator's GET_COLUMN_DEFINITIONS, and overwrite the value with the original column in RENDER_CELL_START.

Regards,

Daniel

Former Member
0 Kudos

Hi,

Did you mean that you need to sort according to the year also...??!?!

i.e if you give 09.2007 as a filter criteria, it is currently getting 09.2007 and 09.2006, 09.2005 and so on....

It might be because it is considering the number as a decimal number...

The solution to your problem can be that you can GET the filter value entered by user and then SET it according after modifying it....

for eg. referr to the following threads...!