2012 Aug 08 7:49 AM
Dear Friends ,
I have a problem related to internal table :
here in internal table I have two fields like date and time .
here two records are shown :
date (UDATE ) time(UTIME)
1- 07.08.2012 12:28:29
2- 07.08.2012 14:57:54
3- 07.08.2012 17:42:12
I have to delete the two records 1 and 2 of the same date , I have to select the record 3 which time is greater then above tow records.
how can I do that , Can I delete them by delete command ,Please suggest.
Regards
Rihan
Moderator message : Not enough re-search before posting, discussion locked.
Message was edited by: Vinod Kumar
2012 Aug 08 7:53 AM
date (UDATE ) time(UTIME)
1- 07.08.2012 12:28:29
2- 07.08.2012 14:57:54
3- 07.08.2012 17:42:12
Sort Internal table by date time descending.
Delete adjacent duplicates form internal table comparing date time.
This will keep the latest record for the date and time ie. 07.08.2012 17:42:12
Message was edited by: Prithwiraj Dutta
2012 Aug 08 8:03 AM
u can sort the data & then delete duplicate entries from the data as shown below :
sort I_table by udate utime descending .
delete adjacent duplicates from i_table comparing udate.
Hopefully this will help