07-19-2007 4:57 PM
Hallo
i'm doing a select for a max-value in a column of a table. i'm getting the highest value exists twice (in two rows) and the rc that i get is 4. how can i get both rows in an internal table? or can i specify more tahn 1 column to find only one max-value.
the first column is a date, the second i could use would be a time-field.
my select-statement:
SELECT * FROM yvtebstg
INTO CORRESPONDING FIELDS OF TABLE lt_ebstg
WHERE polnr = ls_vermitt-polnr
AND temudat = ( select MAX( temudat ) FROM yvtebstg ).
many thanks, martin.
07-19-2007 5:30 PM
Why dont u use SELECT .....DESCENDING..
This will give u all the entries satisfying the condition & then u can delete all but one entries..
second method is to use SELECT UP TO 1 ROWS....DESCENDING.
Check out F1 help on SELECT statement..
07-19-2007 5:30 PM
Why dont u use SELECT .....DESCENDING..
This will give u all the entries satisfying the condition & then u can delete all but one entries..
second method is to use SELECT UP TO 1 ROWS....DESCENDING.
Check out F1 help on SELECT statement..
07-19-2007 6:10 PM