2005 Aug 29 7:51 AM
Hello All,
In an ALV list is a colum of type char(5), when the list is sortend by this column, it is sorted alfabethically.
How to specify in the ALV when that column is sorted to be sorted numerically?(not alfabeticaly).
Thank you
Bogdan
2005 Aug 29 7:53 AM
Hi,
Specify on what column basis u have to sort.
If u specify based on char column it will sort alphabetically, if u give by numeric column then it will do so.
So specify some numeric column name for sorting.
2005 Aug 29 7:57 AM
Hi Judith,
The Column which must be numerically sorted is of type char, and the problem is that i can not modify its type to a numerically one.
Thank u
Bogdan
2005 Aug 29 7:59 AM
Hi,
If it is of type CHAR then how come u can sort numerically?
2005 Aug 29 8:04 AM
if it is char field and you want to sort numerically
keep numerical values in that field like
00001
00002
00003...
00099...
then if your sort this alphabetically u can the numeric sort...
while diaplaying u need to only value without zeros in front of values, then use CONVERSION_EXIT_ALPHA_OUTPUT to achive this.
regds
gv
2005 Aug 29 8:05 AM
A sort example:
Values for cost center:
100, 200, 203, 1001, 1004, Not assigned,.. etc.
value "not assigned" can not be stored in a numeric field.
So if sorted those values:
100,1001,1004,200,203,Not assigned..
and i need
100,200,203,1001,1004,Not assigned..
thnks
Bogdan
2005 Aug 29 11:49 AM
Hi Bogdan,
There is nothing much you can do about that, I guess.
A character field will be sorted as a character.
If you didnt have alphabets, then may be we could have changed some properties in fieldcatalog and achieved ur goal. In this case, I dont think there is a way out.
Remember 2 reward points to answers that were very helpful for you.
Reg,
Prash,.