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

Former Member
0 Likes
1,140

Moderator message: please use a meaningful subject in future

Hi Experts,

I need to select all the customer name start with B alpahahet.

I have tried like this.

select kunnr name1 from kna1 into corresponding fields of table

it_kna1 where name1 = 'C%'.

But it is not working.

Please guide me.

Thank you in advanced.

Edited by: Matt on Dec 2, 2008 10:09 AM

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,109

hi,

in where condition use

select kunnr name1 from kna1 into corresponding fields of table

it_kna1 where name1 like 'C%'.

Rgds.,

subash

9 REPLIES 9
Read only

Former Member
0 Likes
1,110

hi,

in where condition use

select kunnr name1 from kna1 into corresponding fields of table

it_kna1 where name1 like 'C%'.

Rgds.,

subash

Read only

Former Member
0 Likes
1,109

>

> Hi Experts,

> I need to select all the customer name start with B alpahahet.

>

> I have tried like this.

>

> select kunnr name1 from kna1 into corresponding fields of table

> it_kna1 where name1 = 'C%'.

>

> But it is not working.

> Please guide me.

>

> Thank you in advanced.

Hi Saravanan,

See the code below.

Select kunnr name1 from kna1 into corresponding fields of table

it_kna1 where name1 LIKE 'B%'.

Thanks

Nitesh

Read only

Former Member
0 Likes
1,109

Hi,

when you use wildcards like % use LIKE addition in the where clause.

Regards

Ramchander Rao.K

Read only

Former Member
0 Likes
1,109

I had the same problem and resolve it using RANGES table

I think you can use + and * to search but you can look in the help to confirm.

Read only

abdul_hakim
Active Contributor
0 Likes
1,109

select kunnr name1 from kna1 into corresponding fields of table

it_kna1 where name1 LIKE 'C%'.

Cheers,

Hakim

Read only

Former Member
0 Likes
1,109

Hi,

you need to use 'LIKE' instead of '=' .

Regards,

Rajat

Read only

Former Member
0 Likes
1,109

Hi,

We always need to use LIKE in context to wildcard pattern matching queries.

select kunnr name1 from kna1 into corresponding fields of table
it_kna1 where name1 LIKE 'C%'.

thanks.

Read only

Former Member
0 Likes
1,109

Hi,

Check with LIKE addition..

or else.. .try offsetting as shown below..in the WHERE clause


select kunnr name1 from kna1 into corresponding fields of table
it_kna1 where name1+0(1) = 'B'

Cheers

Read only

Former Member
0 Likes
1,109

Thanks everyone.

I managed to solved it experts.

WIth you all help..