Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SORT

radhushankar
Participant
0 Likes
985

Moderator message: please use a more informative subject in futuer

Hi All,

I am having a entries in my table like this

Field1(TYPE C)

8

9

10

11

12.

When i use SORT ITAB DESCENDING BY FIELD1.I am getting out put like this.

9

8

12

11

10

But i want the output like this.

12

11

10

9

8.

Can any one tell me how to acheive this..

Edited by: Matt on Nov 18, 2008 7:55 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
966

Hi,

Use type i (Integer). It will work fine.

If you are using type N. keep value like 09,08,11,12

use FM conversion_exit_alpha_input to convert value 9 to 09

then use sort command

7 REPLIES 7
Read only

Former Member
0 Likes
966

declare field1 type as number nd sort descending by field1

Read only

0 Likes
966

Yeah now i have changed to N.

But still i am facing the same error

Thanks

Read only

0 Likes
966

Can any one take this up???

Thanks in advance

Read only

0 Likes
966

Now ay it cant be wrong , are you using any other field in addition.

use this statement .

SORT ITAB DESCENDING FIELD1 . ( Dnt add any other field )

Read only

0 Likes
966

Hi

I have done like this SORT INT_UPLOADED DESCENDING BY SEQUENCE.

SEQUENCE IS MY FIELD NAME AND I HAVE DECLARED IT AS

data: sequence(4) type n.

Still i am facing the same error.

Thanks

Read only

0 Likes
966

how can you so sure that its getting sorted wrongly !!!! it cant go wrong . Are you writing it out or r u seeing in debugging mode . If debugging make sure the cursor passes the sort command. As per the above code nothing is wrong , it should work.

Read only

Former Member
0 Likes
967

Hi,

Use type i (Integer). It will work fine.

If you are using type N. keep value like 09,08,11,12

use FM conversion_exit_alpha_input to convert value 9 to 09

then use sort command