09-30-2008 4:42 AM
Hi Gurus,
I have a internal table's structure as shown below:-
ITAB
E_OBJNR
E_POSIT
S_GJAHR
S_GNJHR
E_GNJHR
E_GES
........
.......
Row E_OBJNR E_POSIT S_GJAHR S_GNJHR E_GNJHR E_GES
1 PR00108320 0 0 0 0 X
2 PR00108331 0 0 0 0 X
3 PR00108330 0 0 0 0 X
4 PR00108325 0 0 0 0 X
5 PR00108321 0 0 0 0 X
6 PR00108324 0 0 0 0 X
7 PR00108323 0 0 0 0 X
8 PR00108326 0 0 0 0 X
9 PR00108327 0 0 0 0 X
10 PR00108329 0 0 0 0 X
11 PR00108322 0 0 0 0 X
12 PR00108328 0 0 0 0 X
sort it_bpak by e_ges descending.
after sorting, i get
Row E_OBJNR E_POSIT S_GJAHR S_GNJHR E_GNJHR E_GES
1 PR00108328 0 0 0 0 X
2 PR00108322 0 0 0 0 X
3 PR00108329 0 0 0 0 X
4 PR00108327 0 0 0 0 X
5 PR00108326 0 0 0 0 X
6 PR00108323 0 0 0 0 X
7 PR00108324 0 0 0 0 X
8 PR00108321 0 0 0 0 X
9 PR00108325 0 0 0 0 X
10 PR00108330 0 0 0 0 X
11 PR00108331 0 0 0 0 X
12 PR00108320 0 0 0 0 X
all my rows in field e_ges contains value 'X'.
so how is sorting based on?
Please advice.
Best Regards,
Fung
09-30-2008 4:49 AM
hai,
if proper value r there it will sort according to that value,
otherwise it give the reverse value of the existing.
shan.
09-30-2008 4:56 AM
Hi Shan,
thanks for your reply.
but all the e_ges contains the same value 'X'.
so how the sorting is based on?
Best Regards,
Fung
09-30-2008 4:50 AM
Hi, Since the values all same better use OBJNR or other fields for sorting which contains unique value in each row..
Regards,
Jey
09-30-2008 5:06 AM
Hi Jey,
Thanks for your reply.
I couldn't use others field for sorting because this is sort in SAP Standard program code.
i need to know which is the sort field since the field 'e_ges' contains same value?
Best Regards,
Fung