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

how can i delete data from internal table

Former Member
0 Likes
1,019

how can i delete data form internal table containting multiple rows where

a field which contain 'abc*' should not be deleted

i am trying this but its not working and i dont want to use loop .

DELETE i_itmlim_rel WHERE objtype_a NA 'BUS2121*'.

thanks in advance

naval bhatt

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
921

delete i_itmlim_rel where objtyp np 'BUS2121*'.

regards

shiba dutta

delete i_itmlim_rel where objtyp np 'BUS2121*'.

regards

shiba dutta

6 REPLIES 6
Read only

Former Member
0 Likes
921

Hi ,

Hi you can use the command

<b>

DELETE i_itmlim_rel WHERE objtype_a NS 'BUS2121'.

</b>

Regards

Arun

Message was edited by:

Arun R

Read only

Former Member
0 Likes
921

Hi,

Remove astrick('*') in where condition and try.

Thanks,

Saida

Read only

Former Member
0 Likes
922

delete i_itmlim_rel where objtyp np 'BUS2121*'.

regards

shiba dutta

Read only

Former Member
0 Likes
921

Use this:

DELETE itab where field ne 'ABC'.

regards

Read only

Former Member
0 Likes
921

Hi,

loop at i_itmlim_rel.
if objtype_a cp 'abc*'.
else.
DELETE i_itmlim_rel.
endif.
endloop.

Don't use negative logic in your code. It won't give proper results some times.

Regards

Bhupal Reddy

Read only

Former Member
0 Likes
921

hi,

try this code.

DELETE i_itmlim_rel WHERE objtype_a <b>not like</b> 'BUS2121<b>%</b>'.

i hope this will help u.