Problem with Select MAX( field ) in OO
I have this statement:
SELECT SINGLE RUECK MAX( RMZHL ) BUDAT STZHL
WHERE AUFNR EQ P_ORDER
AND VORNR EQ P_OPER
GROUP BY RUECK RMZHL BUDAT STZHL.
My requirement is I need to use a work area (not an internal table) and ENDSELECT is not allowed. The result is not selecting the Maximum RMZHL, it will always return the first record.
How can I correctly do this in OO? Thanks in advanc.e