04-23-2008 12:04 AM
hi gurus,
i have an internal table with 10 records.
one of the columns is 'Modification Date' ,
i need to get the latest of the records, ie. the date which is most recent.
how do i acomplish this task,
is there a function module to compare dates in an internal table.
thanks.
04-23-2008 12:07 AM
you can use sort based on date and as well as compare as well
sort table itab1 by dat1 descending.
sort table itab2 by dat2 descending.
if itab1-dat1 > itab2-dat2.
....
..
04-23-2008 12:07 AM
you can use sort based on date and as well as compare as well
sort table itab1 by dat1 descending.
sort table itab2 by dat2 descending.
if itab1-dat1 > itab2-dat2.
....
..
04-23-2008 12:07 AM
Sort the internal table by date descending and pick the first record.
04-23-2008 5:43 AM
Hello Sanjana-
To get the latest record comparing date field for ex:budat.
sort i_tab by budat ascending.
read table i_tab into w_area index 1.
Cheers,
~Srini.....
04-23-2008 6:00 AM
Hello Sanjana-
To get the latest record comparing date field for ex:budat.
sort i_tab by budat ascending.
read table i_tab into w_area index 1.
Cheers,
~Srini.....