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

simple qa: delete from itab with another itab

Former Member
0 Likes
588

i s.option: f_name an i eneter data(example: 1000).

i get data in itab

1000

10001

10002

........................

i want to delete all teh number that thay no 1000

i made

delete from itab where field ca f_name

i s.option: f_name an i eneter data(example: 1000).

i get data in itab

1000

10001

10002

........................

i want to delete all teh number that thay no 1000

i made

delete from itab where field ca f_name

4 REPLIES 4
Read only

Former Member
0 Likes
564

delete from itab where field cp '1000'.*

try this..........

\[removed by moderator\]

regards

anbu

Edited by: Jan Stallkamp on Jun 10, 2008 1:38 PM

Read only

Former Member
0 Likes
564

write as :

delete itab where field in f_name.

Read only

peter_ruiz2
Active Contributor
0 Likes
564

hi,

there are several options. you can use a loop statement or a range

here is a sample using range


range: r_field.

move 'I' to r_field-sign.
move 'EQ' to r_field-option.
move '1000' to r_field-field.
append r_field to r_field.

move '10001' to r_field-field.
append r_field to r_field.

move '10002' to r_field-field.
append r_field to r_field.

delete itab where field in r_field.

here is a sample using a loop.


data:
  begin of itab1 occurs 0,
     field(5) type char,
end of itab1.

append '1000' to itab1.
append '10001' to itab1.
append '10002' to itab1.

loop at itab1.
delete itab where field eq itab1-field.
endloop.

regards,

Peter

Read only

Former Member
0 Likes
564

hi,

do this way ..


delete itab where field in f_name.