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

Selection Criteria

Former Member
0 Likes
542

Hi All,

I have to select the records from table ADRC into my internal table where one of the fields - Search Term 2 should have only first 2 characters as 'SP'. How do i do it. Kindly help me.

Regards,

T. Karthikeyan

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
504

Hi Karthik,

Please use select with wildcard search.

<b><fieldname> LIKE 'SP%'</b>

Check this sample codes.

select cretime 
into table i_table
from apqi
for all entries in i_tab
where groupid like 'VP*'.

ranges r_id for apqi-groupid.
r_id-low = 'VP*'.
r_id-sign = 'I'.
r_id-option = 'CP'.
append r_id.

select cretime 
into table i_table
from apqi
for all entries in i_tab
where groupid in r_id.

Hope this will help.

Regards,

Ferry Lianto

Please reward points if helpful.

Hi All,

I have to select the records from table ADRC into my internal table where one of the fields - Search Term 2 should have only first 2 characters as 'SP'. How do i do it. Kindly help me.

Regards,

T. Karthikeyan

3 REPLIES 3
Read only

Former Member
0 Likes
505

Hi Karthik,

Please use select with wildcard search.

<b><fieldname> LIKE 'SP%'</b>

Check this sample codes.

select cretime 
into table i_table
from apqi
for all entries in i_tab
where groupid like 'VP*'.

ranges r_id for apqi-groupid.
r_id-low = 'VP*'.
r_id-sign = 'I'.
r_id-option = 'CP'.
append r_id.

select cretime 
into table i_table
from apqi
for all entries in i_tab
where groupid in r_id.

Hope this will help.

Regards,

Ferry Lianto

Please reward points if helpful.

Read only

naimesh_patel
Active Contributor
0 Likes
504

Hello,

Use like <b>Field like 'SP%'</b> in your where condition of the select query.

Regards,

Naimesh

Read only

Former Member
0 Likes
504

Hi,

Please try this:

DATA : IT_ADRC TYPE ADRC.

SELECT FIELD1

FIELD2

FROM ADRC

INTO TABLE IT_ADRC

WHERE SEARCH FIELD LIKE 'SP%'.

Regards,

Sujana