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

Ranges?

Former Member
0 Likes
648

Hi Experts,

I know that the following statemnt works with select options,

<i><b>DELETE ITAB WHERE NOT KUNNR = S_KUNNR[ ]</b></i>

But, in my enhancing z_prog. the earlier programmer is defined it (s_kunnr) as RANGES! (now i can not change from range to select options, bcoz of some other constraints)

So,

1 - Can I use the similar statement for the Ranges also! to get deleted all the records from itab, which does not match, like,

<i><b>DELETE ITAB WHERE NOT KUNNR = R_KUNNR [ ]</b></i>

ThanQ.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
625

Hi,

You have to use IN instead of =

DELETE ITAB WHERE NOT KUNNR <b>IN</b> R_KUNNR [ ]

Thanks,

Naren

5 REPLIES 5
Read only

Former Member
0 Likes
626

Hi,

You have to use IN instead of =

DELETE ITAB WHERE NOT KUNNR <b>IN</b> R_KUNNR [ ]

Thanks,

Naren

Read only

Former Member
0 Likes
625

Hi

Ranges also used similar to Select-options with IN operator in where condition

use

DELETE ITAB WHERE NOT KUNNR IN R_KUNNR .

it will work fine.

Reward points if useful

Regards

Anji

Read only

0 Likes
625

Hi

U mean its not necessory to use " <b>[ ]</b> " ?

thanq.

Read only

0 Likes
625

No need to use [] in Ranges and Select option.

just use

delete itab where cond in s_kunnr.

Reward Points if it is useful

Thanks

Seshu

Read only

0 Likes
625

Sridhar,

It is not necessary to use []. you can do this using IN.