Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP : internal table issue

Former Member
0 Likes
411

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

2 REPLIES 2
Read only

Former Member
0 Likes
377

      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

Read only

Former Member
0 Likes
377

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