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

Select statement with range

Former Member
0 Likes
674

Hi ,

How to use range option to have multiple values 0 let us say 100 values in select statement.

my req is :

select * from Dbase into it_tabe

where field1 in ( 2323, 22,3434,sssd,dfff,etc......)

i'm having all ( 2323, 22,3434,sssd,dfff,etc......) in an internal table

with thanks and regards

Arun

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
648

Hi,

1. U can use FOR ALL ENTRIES IN itab WHERE field1 = Itab-Field1

regards,

amit mittal.

5 REPLIES 5
Read only

Former Member
0 Likes
648

use for all entries tab..

select * from Dbase into it_tabe

for all entries in it_field1

where field = ...

here it_field1 table is a table where u hav the values

( 2323, 22,3434,sssd,dfff,etc......)

here specify where condition as per ur field in database table

Hope dis helps

Reward all helpful answers

Read only

Former Member
0 Likes
649

Hi,

1. U can use FOR ALL ENTRIES IN itab WHERE field1 = Itab-Field1

regards,

amit mittal.

Read only

Former Member
0 Likes
648

Hi Arun,

Do like this

if you have values ( 2323, 22,3434,sssd,dfff,etc......) in itab write the code like this.

if itab[] is not initial.
 select * from Dbase into table it_tabe for all entries in itab
where field1 = itab-field1.
endif.

Regards,

Satish

Read only

Former Member
0 Likes
648

hi,

use for all entries statement

if not i_your_table_name[] is initial.

select * from dbtable 
into it_table
for all entries in i_your_table_name
where
field1 = i_your_table_name-your_field_name.

endif.

and make sure you check that i_your_table_name is not initial. or there will be a wrong query executed.

Regards,

Abdullah

Read only

Former Member
0 Likes
648

Hi,

You can do the same using for all entries clause.

Sorry for wrong suggestion in my last post as dint read the question completely.

Regards,

Lalit

Message was edited by:

Lalit Kabra