Application Development 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: 

how to add keyword functionality as a search tool in a program

Former Member
0 Kudos

Hi!

Good day.

I would like to inquire as to how I can add a search tool using certain keywords in a program? You see, the program I am developing stores data in a custom table. However, I am assuming that sooner or later the table will have plenty of data that it will be difficult to search for a particular data. That is why I am asking how to use search using keywords.

For example: For data "Car Manufacturer Information", I want that I will just input "Manufacturer" on the search field then the program will display all data that has the word "Manufacturer". How can this be done?

If there is a function module or an ABAP program for this, please let me know.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Try to use function module HELP_VALUES_GET_WITH_TABLE.

In this function module just pass field name on which you want to search, then this can check that particular word in that field value for all the records.

ALso table name, and search criteria.

Thanks & Regards,

Dipika.

6 REPLIES 6

Former Member
0 Kudos

Hi,

Try to use function module HELP_VALUES_GET_WITH_TABLE.

In this function module just pass field name on which you want to search, then this can check that particular word in that field value for all the records.

ALso table name, and search criteria.

Thanks & Regards,

Dipika.

0 Kudos

Hi!

We tried using the function module youe mentioned but it is already an obsolete function module. Do you happen to know of other function modules that can help us with the keyword functionality?

former_member223537
Active Contributor
0 Kudos

Hi,

Write a select query:

Select * from ZTABLE into itab
where text cp 'Manufacturer'.

Best regards,

Prashant

0 Kudos

Hi! I have tried placing a select query but there's an error that occurs. The error states that "CP is not a valid comparison operator" when it was placed in the WHERE clause of the SELECT statement. How can this be corrected?

former_member191735
Active Contributor
0 Kudos

Hi gino,

Select -


where text CP 'Manufacturer' is right answer. If you get error on that statment, you would probably check the field that is used in where clause.

or try the following statement. Hope this will helps.

select -


where text = '%manufacturer%'.

I think it will then become a performance issue. Explain it clearly that what exactly you want and where is this being used.

Do you want some thing like search help? Example: customer number search from any customer field. If so try to create a search help and add the same to your custom field.

0 Kudos

Hi!

Actually, what I am trying to do is add something like a search help in the program. The data being stored in a custom table will have something like a keyword which can be used by the user as a search help.

For example, if my table has the ff data:

Cologne for Men

Body Spray for Men

Ladies Magazine

Men of the Year

When I input the word "Men" on the selection field, I want that all the data containing the word "Men" will be displayed. In this way, it kind of acts like a search help or something.