Hi dgrachee!
Adding tothatJogeswarasaid, youcan also createan internal tableassorted(TYPESORTEDTABLE)andbythe sql query(ifan internal tableused inSQLstatements)andorder thequery asdescending, as I showbelow:
TYPES: BEGIN OFy_spfli,
carridTYPEspfli-carrid,
connidTYPEspfli-connid,
END OFy_spfli.
DATEt_spfliTYPESORTEDTABLE OFy_spfliWITHNON-UNIQUE KEY carridconnid.
SELECTcarridconnid
FROMspfli
INTO TABLEt_spfli
UP TO50ROWS
ORDER BYconnidDESCENDING.