hi all,
I wrote below code to select the maximum value of field cust_id from table ZPND_CUST_TAB,
but its not working as i required its giving last entry of the table.
can any one tell me what should i change in below code to get maximum value from cust_id field of ZPND_CUST_TAB table.
DATA temp_cust_id TYPE ZPND_CUST_TAB-CUST_ID.
SELECT MAX( CUST_ID ) FROM ZPND_CUST_TAB
INTO temp_cust_id
WHERE CUST_ID > 0.
WRITE temp_cust_id.