2008 Aug 12 12:42 PM
hi,
i want to delete record from internal table compring the 2nd field.
for example:
x 5
y 5
then the second record should be deleted . the comparision should be on the basis of 2nd field.
regards
nilabichi
2008 Aug 12 12:44 PM
Hi..
your requirment is not clear please provide more detail
watever i understood from question on that basis u shd.
sort the table and then loop it...
regards
vivek
2008 Aug 12 12:44 PM
Hi..
your requirment is not clear please provide more detail
watever i understood from question on that basis u shd.
sort the table and then loop it...
regards
vivek
2008 Aug 12 12:47 PM
2008 Aug 12 12:47 PM
Try this out
DELETE itab WHERE 2ndfield = ' value ' .
Regards,
Linda
2008 Aug 12 12:47 PM
Hi
sort itab.
delete adjacent duplecates comparing (that second filed)
try this one
2008 Aug 12 12:52 PM
Hi,
Use
DELETE ADJACENT DUPLICATES FROM itab comparing field2.
Regrads,
Dhan
2008 Aug 12 12:54 PM
Hi
please see this example..
DATA: i_mara TYPE STANDARD TABLE OF mara INITIAL SIZE 0,
wa_mara TYPE mara.
SELECT *
UP TO 10 ROWS
FROM mara
INto TABLE i_mara.
READ TABLE i_mara INTO wa_mara INDEX 2.
if wa_mara-ERSDA <> 'ABC'.
delete i_mara index 2 .
endif.
LOOP at i_mara INTO wa_mara.
WRITE: / wa_mara-matnr.
ENDLOOP.
2008 Aug 12 1:07 PM
HI
data:
w_temp1 like itab-f2,
w_temp2 like itab-f2.
loop at itab.
w_temp1 = itab-f2.
if w_temp1 eq w_temp2.
delete itab.
endif.
w_temp2 = w_temp1.
endloop
Regards,
Sunil Kumar M