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

SQL Select for wildcard search in search help in module pool programme

Former Member
0 Likes
1,056

Hi all,

In my module pool programe table control I have created F4 value ( Search help) by FM F4IF_INT_TABLE_VALUE_REQUEST

in Process on value-request.

I am populating internal table to get the values.

but user asks they will put wildcard ( * ) search for the material document to get the list by F4 values.

like 23*09 instead of full material document no.

In my select statement i have used % instead of *. ( 23%09) and with LIKE statement.

I am not getting any data from my data base table.

kindly help me what type of select statement i have to use to get the data list.

Thanks in advance.

sharma

1 ACCEPTED SOLUTION
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
957

try it with this example


data:ra_mblnr type range of mseg-mblnr.
data:wa like line of ra_mblnr.

wa-option = 'CP'.
wa-sign = 'I'.
wa-low = '123*45'.
append wa to ra_mblnr.


select mblnr into table it from mseg where mblnr in ra_mblnr.

Hi all,

In my module pool programe table control I have created F4 value ( Search help) by FM F4IF_INT_TABLE_VALUE_REQUEST

in Process on value-request.

I am populating internal table to get the values.

but user asks they will put wildcard ( * ) search for the material document to get the list by F4 values.

like 23*09 instead of full material document no.

In my select statement i have used % instead of *. ( 23%09) and with LIKE statement.

I am not getting any data from my data base table.

kindly help me what type of select statement i have to use to get the data list.

Thanks in advance.

sharma

5 REPLIES 5
Read only

Former Member
0 Likes
957

Hi

Use the FM DYNP_VALUES_READ to get the values entered in an input field before PAI triggers.

Then get entry along with the Wild Card Entry and pass it to your select Query.

to know how to use the FM take the help of Where used List

Cheers

Ramchander Rao.K

Read only

sridhar_meesala
Active Contributor
0 Likes
957

Hi,

Try this,

SELECT ...
INTO ...
FROM ...
WHERE material_document = '23%09'.

Thanks,

Sri.

Read only

former_member156446
Active Contributor
0 Likes
957
SELECT name, city FROM customer
WHERE name LIKE '%FT'
Read only

kesavadas_thekkillath
Active Contributor
0 Likes
958

try it with this example


data:ra_mblnr type range of mseg-mblnr.
data:wa like line of ra_mblnr.

wa-option = 'CP'.
wa-sign = 'I'.
wa-low = '123*45'.
append wa to ra_mblnr.


select mblnr into table it from mseg where mblnr in ra_mblnr.

Read only

0 Likes
957

thanks