on 11-26-2010 6:18 AM
Hi,
I have included a ALV table in my application. A column in the table is containing a list of amounts. When i am trying to sort it in ascending or descending order, the values are not listed properly. I am using "PAD_AMT7S" as the data type for the attribute which will accept up to 2 decimals. The issue is,
if the column is containing values like
0.00,
8.75,
17.00,
8.50 and
17.50.
if i perform ascending type of sorting the values are re-arranged as,
0.00
17.00
17.50
8.50
8.75
and on descending
8.75
8.50
17.50
17.00
0.00
Which are all incorrect. Please provide me your suggestions..
Thanks,
Mugundhan
Hi ,
Are you sure the the values are 17.50 , 17.00
The output looks correct if the values are 1.75 and 1.70
If the values are absolutely correct (17.50 , 17.00) then search for SAP notes related to ALV sorting.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Are you using the IF_WD_TABLE_METHOD_HNDL for the sort, or you wrote your own code?
IF_WD_TABLE_METHOD_HNDL worked incorrectly for some special fields, in these cases I had to write the sorting code manually.
e.g.
CALL METHOD WDEVENT->GET_STRING
EXPORTING
NAME = 'COL'
RECEIVING
VALUE = lv_col_name.
CALL METHOD WDEVENT->GET_STRING
EXPORTING
NAME = 'DIRECTION'
RECEIVING
VALUE = lv_direction.
CASE lv_col_name.
WHEN 'TABLE_FIELD1'.
IF lv_direction EQ '00'.
SORT lt_table BY CURR ASCENDING.
ELSE.
SORT lt_table BY CURR DESCENDING .
ENDIF.
Is the table sorted incorrectly here?
Bye
N.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.