Use the
already provided aggregate functions, instead of finding out the
minimum/maximum values using ABAP code.
Not
recommended
Maxnu = 0.
Select * from zflight where airln = ‘LF’ and cntry = ‘IN’.
Check zflight-fligh > maxnu.
Maxnu
= zflight-fligh.
Endselect.
Recommended
Select max( fligh ) from zflight into maxnu where airln = ‘LF’ and
cntry = ‘IN’.
The other
aggregate functions that can be used are min (to find the minimum
value), avg (to find the average of a Data interval), sum (to add up
a data interval) and count (counting the lines in a data selection).
===================================================================================
This
tutorial contains a number of pages, each one explaining a tip or
trick. You can either browse them one by one (click on the NEXT
button, or jump straight to a tip or trick which interests you:

