‎2007 Jan 09 6:03 AM
How to sort an internal table in this format (1 2 3 4 ....) ? Dose it has to follow an append statement ?
Because when I used -
> SORT ITAB DESCENDING BY NUMBER. I'm getting this format (1 2 3 5 4 1).
please help.
‎2007 Jan 09 6:06 AM
it's finer i think last 1 show the header value just check it.
‎2007 Jan 09 6:13 AM
‎2007 Jan 09 6:16 AM
i m not clear abt ur requiremtn..
wht u can do is u can dd a seqno field to ur itab and then sort ur itab by this field in asc or descending order--
data: begin of itab occurs 0,
seqno(1) type c,
pernr like pa0006-pernr,
data end of itab.
select pernr from pa0006 up to 10 rows into corresponding fields of itab.
loop at itab.
itab-seqno = sy-tabix.
modify itab index sy-tabix.
endloop.
sort itab descending by seqno.
loop at itab.
write:/ itab.
endloop.
‎2007 Jan 09 6:19 AM
Hi,
When you specify
SORT ITAB BY NUMBER.It will sort no append statement is needed.