Hi,
I have written a select statement using the SLECT MAX.This statment has to get the Max reocrd from JCDS table where CHGNR is the maximum number.but it is getting only the firsr record instead of the Max record.
SELECT SINGLE MAX( CHGNR ) UDATE
USNAM
INACT FROM JCDS
INTO (WA_JCDS-CHGNR,
WA_JCDS-UDATE,
WA_JCDS-USNAM,
WA_JCDS-INACT)
WHERE OBJNR = WA_AUFK-OBJNR
AND STAT = 'E0003'
GROUP BY CHGNR UDATE USNAM INACT.
Could you please let us know anything wrong with this tatement?
Regards,
Xavier.P
Edited by: Xavier on Jun 8, 2009 12:54 PM