‎2005 Jul 12 4:19 AM
Hi,
i have a date field in an internal table. i need to fetch record with most recent date. is there any function module to do that or is there any date comparision operator.
your help would be appreciated.
Thanks,
kranthi
‎2005 Jul 12 4:25 AM
Hi Kranthi,
You can sort the internal table by date field. and get the first record's date. That will fetch you the recent date.
Hope it will solve your problem.
Suvan.
‎2005 Jul 12 4:25 AM
Hi Kranthi,
You can sort the internal table by date field. and get the first record's date. That will fetch you the recent date.
Hope it will solve your problem.
Suvan.
‎2005 Jul 12 4:54 AM
Hi Kranthi / Sankar,
Sorting the internal table by the data field and fetching the first record seems to be the best approach.
Regards,
Anand Mandalika.
‎2005 Jul 12 4:28 AM
Hi,
Try this.
You can use >,<,etc.,
loop at itab into wa.
if sy-tabix = 1 or v < wa-date.
v = wa-date.
endif.
endloop.
write 'Recent', v.