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

Search Help Exit

Former Member
0 Likes
1,600

Hi,

We are using elementary search help USER_ADDR for our requirement to search users. It has First Name and Last name field in it. Now user wants to make these fields "Starts With" Or "Contains" by default in background.

i.e. When user searches user id with some part of the First/Last name field, it should return the users those contain the value we have given in input.

Can any one suggest how to achieve this?

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,430

Hi,

Try creating a customized search help (as a copy of USER_ADDR ).

Then against the MC_NAMEFIR and MC_NAMELAS there is a column name 'Default'. In that cell, give input as per your requirement.

Ex: If the search help has to return all the names starting with 'MA' in MC_NAMEFIR , then

give the values in 'Default' as 'MA*' against the MC_NAMEFIR.

Regards,

Sharin.

Hi,

Try creating a customized search help (as a copy of USER_ADDR ).

Then against the MC_NAMEFIR and MC_NAMELAS there is a column name 'Default'. In that cell, give input as per your requirement.

Ex: If the search help has to return all the names starting with 'MA' in MC_NAMEFIR , then

give the values in 'Default' as 'MA*' against the MC_NAMEFIR.

Regards,

Sharin.

9 REPLIES 9
Read only

Former Member
0 Likes
1,430

Ginger,

put * as a wild card selector...

search for *inger and you can find Ginger

Read only

0 Likes
1,430

Hi Soumyaprakash,

Users are not used with wildcard operator and hence not willing to use. And this is the reason we want to enhance the search help in some other way.

please help.

Thanks.

Read only

0 Likes
1,430

Ginger,

in that case, if you have custom screen, go for a custom search help.

else, if it is a standard screen where you want to do all these, then you need to enhance the search help exit and change the parameter SHLP-SELOPT[].

it will have a row(s) like,

USER_ADDR	|| MC_NAMELAS||	I	||EQ	|| INGE||

in the enhancement, change that to I, CP, INGE as

USER_ADDR	|| MC_NAMELAS||	I	||CP	||*INGE*||

Read only

Former Member
0 Likes
1,431

Hi,

Try creating a customized search help (as a copy of USER_ADDR ).

Then against the MC_NAMEFIR and MC_NAMELAS there is a column name 'Default'. In that cell, give input as per your requirement.

Ex: If the search help has to return all the names starting with 'MA' in MC_NAMEFIR , then

give the values in 'Default' as 'MA*' against the MC_NAMEFIR.

Regards,

Sharin.

Read only

0 Likes
1,430

Hi Sharin,

The search help is used in one of our screen field F4, which searches the users. If I will default the value, it will return the value which is defaulted.

My Requirement is, when I write 'Gin' in the first name field, it should return all the users those starts with or contains 'GIN', i.e

Ginger

Ginny

Ginough

etc.

Please help if possible and let me know if my understanding is incorrect.

Thanks.

Read only

0 Likes
1,430

Ginger,

Did you try the option which i told you? this works

more over, if its a custom screen, better to have a custom search help. and if you want a custom search help then you can copy it from USER_ADD and add the code which i told you.

Read only

0 Likes
1,430

Hi Sowmyaprakash,

I am trying to find the exit for USER_ADDR. Can you please help how to see the row that you have shown in your last reply?

Thanks.

Read only

0 Likes
1,430

which version of SAP are you using? do you have enhacnement framework for your editors?

if you open the search help in Se11, you will find the search help exit: F4IF_SHLP_EXIT_USER_ADDR (function module)..

go inside the function module and click on enhance.. then goto edit-> enhancement operation-> show implicit enhancement options.

then on the first line itself you will find a line as

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(1) Function Module F4IF_SHLP_EXIT_USER_ADDR, Start

on this right click and enhancement operation and create implementation... select 'Code'. and you can add your code here..

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
1,430

You can edit the elementary search help without any access key. Put your own search help exit for this( There is already a search help exit for this search help, you have to tyr to incorporate the logic in in too ) . In the search help exit concatenate % symbol and do the filtering.