‎2008 Dec 04 5:02 PM
Hai Friends,
I want to delete my internal table if MATNR starts like 'GT' and with someother condition also. Two conditions in a delete.
‎2008 Dec 04 5:15 PM
Hi
when i use delete itab with where clause i don`t see many issues ,infact i tried it in a code it was working faster than loop endloop.
make sure you are not using any negative conditions in your where clause.
Regards
Neha
‎2008 Dec 05 4:19 AM
hI Vennila,
Use the following
delete itab where matnr cp 'GT*'.
IF SY-SUBRC IS INITIAL.
ENDIF.
DATA : itab TYPE TABLE OF mara WITH HEADER LINE.
*SELECT * FROM mara INTO TABLE itab UP TO 100 ROWS.
itab-matnr = 'GTAHBB999'.
ITAB-ERNAM = 'RAM'.
APPEND ITAB.
CLEAR ITAB.
IF sy-subrc IS INITIAL.
DELETE itab[] WHERE matnr CP 'GT' AND ERNAM CP 'R'.
IF sy-subrc IS INITIAL.
ENDIF.
ENDIF.
for further info please go through the KEY word docu
Regards
Ramchander Rao.K
Edited by: ramchander krishnamraju on Dec 5, 2008 5:22 AM
Edited by: ramchander krishnamraju on Dec 5, 2008 5:23 AM
‎2008 Dec 05 4:24 AM
hi,
DELETE itab WHERE matnr like 'GT%' and <condition2> and <condition3>.
'GT%' means start with GT in matnr field. You can use N no of condition in WHERE clause by using logical operator like AND OR.