cancel
Showing results for 
Search instead for 
Did you mean: 

Search help based on conditions

Former Member
0 Kudos

Hi,

I need to create a search help for a field 'Location'. This search help should depend on the value of plant (LFA1-LIFNR) passed to the view. Only those locations should be displayed which are found in the given plant. Does anyone have a clue ?

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

arjun_thakur
Active Contributor
0 Kudos

Hi Fathima,

You can use the concept of OVS to implement the search help for the reqiured field.

Use this [blog|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/9502] [original link is broken] [original link is broken] [original link is broken]; for guidence.

You can aslo refer to this [wiki|https://wiki.sdn.sap.com/wiki/display/Snippets/OVSsearchhelp

] and refer this standard component WDR_TEST_OVS as well.

I hope it helps.

Regards

Arjun

Edited by: Arjun on Jan 20, 2009 5:15 PM

Former Member
0 Kudos

Hi

Thanks for your replies. I am working with OVS now. I figure the job can be done with it.

Just a small hurdle: Initially when the OVS is called it shows a pop up where the user can enter search criteria and click on "Start Search " button.

I dont want these buttons like Start Search etc to be displayed. I want the search to begin when i click on the field without the user having to enter any input. The required input can be read from the context.

I guess i need to configure something more under

" case ovs_callback_object->phase_indicator ". Am i right ? and if yes, how can it be done ?

Thanks

arjun_thakur
Active Contributor
0 Kudos

Hi Fathima,

As far as i can under stand you want that when user clicks for OVS help, no pop up for serach should open but directly serch result should appear. If you want that to happen, just don't do anything in PHASE 1.

You can refer to this thread as well:

I hope it helps.

Regards

Arjun

Former Member
0 Kudos

Thanks . That helps a lot. I have been able to use OVS as told.

Is there anyway of doing the same using a search help exit ? Can i program the search help to read the value of the field Plant from the context , and display only those locations that are present in that plant.

This was a suggestion given to me.

arjun_thakur
Active Contributor
0 Kudos

Hi Fathima,

If I am not wrong, you want to read a context node which contains some values for the plant location and when the user clicks on the OVS helps button then you want to display those values. Is this what you want? If this is your requirement then you can do this: you must using any select query or FM to get the desired values, instead of doing that just read that node which contains all the values of the plant location. Move the values corresponding to location to any internal table and then bind it to your attribute which is binded to the input field with OVS.

I hope it helps.

Regards

Arjun

Former Member
0 Kudos

HI Arjun

Thanks for answering. I have already done it using OVS and it works just fine. However as OVS requires the use of an external component i have been asked to do the same using a search help instead.

To clarify , here's what i need to do:

I have 2 fields : Plant and Location on screen. I have populated the field Plant as required. Now when the user clicks on the field Location, a dropdown should come and it should be populated with all the Locations which are present in that Plant only. Locations present in other plants should not be displayed.

i hope this is clear. I would like to try this with a search help by using search help exit. Any idea how it can be done?

Thanks,

Fathima

arjun_thakur
Active Contributor
0 Kudos

Hi Fathima,

If you want to use search help then for that you have to create a seach help in SE11 first, then change the Input help mode property of your attribute to Dictionary Search help and mention the name of search help in dictionary search help property. You can try this as well.

You can refer to this link for more detials: http://help.sap.com/saphelp_nw04s/helpdata/en/47/9f724642314aabe10000000a42189b/frameset.htm

Regards

Arjun

arjun_thakur
Active Contributor
0 Kudos

Regarding the location drop down: Do you need to fetch the loaction corresponding to any perticular plant from any data base table?

Arjun

pranav_nagpal2
Contributor
0 Kudos

Hi Fathima,

We have three kinds of search help in WD ABAP... depending on the requirement we can implement any of the following......

1.Using Search help.

If the data element is associated with Search help then you will get the value help automatatically in the Web Dynpro for abap.

http://help.sap.com/saphelp_nw04s/helpdata/en/47/9f724642314aabe10000000a42189b/frameset.htm

2.Freely Programmed. Here we define our custom view for search help... i.e. when you click on search help or press f4 what kind of view you want to see....

http://help.sap.com/saphelp_nw04s/helpdata/en/47/9ef8cc9b5e3c5ce10000000a421937/frameset.htm

3.OVS

http://help.sap.com/saphelp_nw04s/helpdata/en/47/9ef8c99b5e3c5ce10000000a421937/frameset.htm

/people/shruti.rathour/blog/2008/05/05/ovs-help-in-web-dynpro-abap

regards

Pranav