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 Data Base Select Query

Former Member
0 Likes
646

Hi All,

I want to extract the data from data base into my internal table

by not giving the exact value but the pattern.

Ex) I want to select the vendor starting with patter '12*'

from LFA table in my internal table.

Which select Query I should use for getting the

Vendor No. starting with pattern '12*' ?.

Points will be rewaded.

Thanks in Advance.

With Regards

Jitendra Gujarathi.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
620
select fld1 fld2 from lfa1
                 into table itab
                 where  lfnr like '12%'
4 REPLIES 4
Read only

Former Member
0 Likes
621
select fld1 fld2 from lfa1
                 into table itab
                 where  lfnr like '12%'
Read only

Former Member
0 Likes
620

select lifnr into table itab from lfa1 where <b>lifnr like '12%'.</b>

it will fetch the record which starts with 12 only

you may use lifnr like '%12%' also it will fetch the record which contain any 12 in it.

be careful about leading zeroes lifnr may contain leading 0.

regards

shiba dutta

Read only

Former Member
0 Likes
620

Hi jitendra,

1. simple

2.

select * from lfa1

into table lfa1

where lifnr like '12%'.

regards,

amit m .

Read only

Former Member
0 Likes
620

<b>CONCATENATE w_lifnr '%' INTO w_lifnr.

select lifnr from lfa1 where lifnr like w_lifnr.</b>

Regards,

Pavan