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

regarding select qurey

Former Member
0 Likes
605

Hi All,

There is a select statements like

select * from kna1 where kunnr like '*%'.

select * from makt where matnr like '%'.

what is this meanings

Regards

krishna

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
584

in plade of like u can use CS / CP operator

CP (Contains Pattern) and CS (Contain string).

Hi All,

There is a select statements like

select * from kna1 where kunnr like '*%'.

select * from makt where matnr like '%'.

what is this meanings

Regards

krishna

4 REPLIES 4
Read only

Former Member
0 Likes
585

in plade of like u can use CS / CP operator

CP (Contains Pattern) and CS (Contain string).

Read only

dhruv_shah3
Active Contributor
0 Likes
584

Hi,

This select statement means that select all the data from kna1 where kunnr. Like statement is using the WIld card Characters *,%.

So that you can place any combination there.

E.g

select * from kna1 where kunnr like 'S%'.

means select all the data where kunnr is having the S as first Character.

Same as for 2nd question.

HTH,

Regards,

Dhruv Shah

Read only

Former Member
0 Likes
584

hi.

% is like * of selection criteria...

means suppose u need all material start from 1 so u will enter 1* into selection field but for this u need to write select matnr from mara where matnr like '1%'.

<REMOVED BY MODERATOR>

Edited by: Alvaro Tejada Galindo on Mar 4, 2008 2:56 PM

Read only

Former Member
0 Likes
584

hi check these coding,


tables :kna1.
data: itab like kna1 occurs 0 with header line.
select * from kna1  into table  itab where kunnr like '%'.

loop at itab.
write:/ itab-kunnr.
endloop.

data: itab1 like kna1 occurs 0 with header line.
select * from kna1  into table  itab1 where kunnr like '*'.

loop at itab.
write:/ itab-kunnr.
endloop.

<REMOVED BY MODERATOR>

venkat.

Edited by: Alvaro Tejada Galindo on Mar 4, 2008 2:57 PM