on 06-01-2007 5:48 AM
Hi
I am displaying some data in a table, but when i sort any column of the table output, it is giving preference to the rows which are in Capital letter then it is considering small.
Eg:
A
B
C
a
b
c
Is there any work around to make the sort as:
A
a
B
b
C
c
Regards,
Trikanth
Hi,
Refer this Thread
http://help.sap.com/saphelp_nw04/helpdata/en/c5/0c4263d01146c082c500ab717872ad/frameset.htm
Regards,
Senthil K.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Senthil,
Thanks for you reply,
I have seen the thread, it shows how to sort the table in the backend and send it to the VC, but that is not my requirement.
My issue is in the runtime, when the user clicks on a particular column name, the table gets sorted by that columm and i have my data starting with Caps and Small letters, but is not considering A and a as same and the result is all the caps are sorted and then all the small are sorted like:
America
Boston
Canada
austria
berlin
Regards,
Trikanth
Hi Trikanth,
but the sort function works correctly (have a look at the ASCII table: A = ASCII 65, B = ASCII 66 and so on a = ASCII 97, b = ASCII 98 and so on). If you want to have another sort order you must do it as it is mentionend in the post before with a backend functionmodule.
Best Regards,
Marcel
Hi Marcel,
Finally i go back to my original question that is there any way to tweak and make it sort like AbBbCc in the runtime of column sort event ?
Some how i can get the data from backend in the order how i need by writing code in the backend FM , but problem is when user shuffles the data in the table during runtime then again the table will be sorted based on ASCII code.
Regards,
Trikanth
Hi Trikanth,
Ok by default you can not sort it like you wanted. A workaround could a function module which sorts it like you want. When a user click on the sort function (table header) then it sorted based on ASCII that's correct. I'm sorry to say that it is not possible to disable the default sort function. This is something which I also need for some apps.
Another question. Which data service returns you the data? If it is a RFC you can modify it, so that the data sorted as you want or otherwise you can modify the data, e.g. that everything is in lower case or in caps, therefore you can use a VC function UPPER().
Best Regards,
Marcel
If this question is answered for you please mark the question as answered and reward points, otherwise ask me again.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.