Skip to Content
0
Former Member
Jan 03, 2008 at 03:38 PM

SORT problem!!

28 Views

I don't know..might be simple problem...

DATA : BEGIN OF i_cdpos OCCURS 0.

INCLUDE STRUCTURE cdpos.

DATA : udate LIKE cdhdr-udate.

DATA : utime LIKE cdhdr-utime.

DATA : END OF i_cdpos.

i_cdpos-objectid = '0000050211'.

i_cdpos-value_new = '20070329'.

i_cdpos-value_old = '20021021'.

i_cdpos-udate = '20070518'.

i_cdpos-utime = '102421'.

APPEND i_cdpos.

i_cdpos-objectid = '0000050211'.

i_cdpos-value_new = '20070330'.

i_cdpos-value_old = '20070329'.

i_cdpos-udate = '20080103'.

i_cdpos-utime = '123617'.

APPEND i_cdpos.

SORT i_cdpos BY udate utime.

Here I'm trying to sort above table by UDATE. I've tried with ASCENDING and DESCENDING keywords as well... But always I'm getting 20070518 (udate) as first record in itab. Any one have any clue to keep 20080103 (udate) as first record in my itab.