2008 Oct 10 11:44 AM
2008 Oct 10 11:45 AM
2008 Oct 10 11:45 AM
Hi,
Delete ITAB index 1.
or
Loop at ITAB.
delete itab.
exit.
endloop.
Darren
2008 Oct 10 11:47 AM
Hi,
When you say you want to delete a single record from an internal table, on what basis are you deleting it ?
If you have a specific condition in mind you can write the following code.
Read table t_test with key (cond).
(Assuming t_test has a header line).
Delete t_test index sy-index.
Regards,
Pramod
2008 Oct 10 11:48 AM
delete itab where <your condititon>
(or)
delete itab from wa--> work area.
(or)
delete itab index 3.
delete ita index 4.
For more examples place cursor on keyword DELETE ITAB and press F1 key
2008 Oct 10 11:53 AM
Hi,
there are several ways of doing this:
1.delete itab where <condition>
2008 Oct 10 11:56 AM
hi Lavanya,,
If in your Internal table having 10 records ,
F1
-
1
2
3
4
5
6
7
8
9
10
if you want to delete 5th record :
Delete itab where f1 = '5'.
Click F1 on delete in you program .. and you will get many options. dude
Thanks : Maddy
2008 Oct 10 12:31 PM
HI,
deleteion can be done on the basis of some condition:
loop at itab.
delete itab where field = ' '.
endloop.
this will work..
2008 Oct 10 12:40 PM
LOOP AT ist_bkpf INTO wa_bkpf.
READ TABLE ist_payr INTO wa_payr WITH KEY vblnr = wa_bkpf-belnr gjahr = wa_bkpf-gjahr.
IF sy-subrc = 0.
DELETE ist_bkpf.
ENDIF.
ENDLOOP.
hope this will help u
2008 Oct 10 12:50 PM
Hi,
One best thing we can do while writing code we an have F1 help when we write the code.
plz check the below examples to delete entry from internal table :
DELETE TABLE itab WITH TABLE KEY matnr = p_matnr.
DELETE TABLE itab FROM wa_mara.
READ TABLE itab WITH TABLE KEY matnr = p_matnr
TRANSPORTING NO FIELDS.
IF sy-subrc = 0.
DELETE itab INDEX sy-tabix.
ENDIF.
thanx.