08-20-2007 9:34 AM
08-20-2007 9:37 AM
08-20-2007 9:40 AM
Hi Pandu,
First select all the entries into itab, Then sort it by timestamp in descending order,
then delete the entries other than first occurance.
Code,
SORT ITAB BY FIELD1 ASCENDING TIMESTMP DESCENDING.
READ TABLE ITAB INTO WA_ITAB.
LOOP AT ITAB.
IF WA_ITAB-FIELD1 = ITAB-FIELD1 AND SY-TABIX NE 1.
DELETE ITAB INDEX SY-TABIX.
ELSE.
MOVE ITAB TO WA_ITAB.
ENDIF.
ENDLOOP.
08-20-2007 9:40 AM
hi,
u have select data based on some field.
that may be date (if date field is there),or somthing else.
You cant select recent data without any specific field. So search for that option.