Skip to Content

HCM Processes & Forms: Web Dynpro ABAP Search Helps

After reading (and relying on) the many excellent blogs by Chris Solomon and the recent one by Derrick Banks, I thought it only fair to share some knowledge on an area that I find most useful (and previously frustrating) – search helps.

 I came across the WDA search helps while implementing a bespoke version of the E-recruiting Requisition form (form scenario S_HRMSSRCF_REQUISITION).   On this form there are two buttons ‘Select Template’ and ‘Select Position’. These both trigger Web Dynpro ABAP (WDA) search helps and return the data selected to the form. Since then, I have used this to apply WDA type search helps to several other forms with huge success.















How it works in a nutshell




 and the search help implements IF_HRASR00_FORM_WINDOW as an interface.




The onMouseDown event of the button has code used by the WDDOMODIFYVIEW method of the FORM_EDIT view of WDA component HRASR00_PROCESS_EXECUTE. (I am sure you know this well as the main WDA HCM P&F component).

The WDDOMODIFYVIEW method uses the value used for the HRASR_FORM_WINDOW field and calls the popup window of that component. The data is then displayed according to how the component has been developed (OADP or ALV component usage probably) and selected. The values are then returned to the HRASR00_PROCESS_EXECUTE component via the interface node VALUE_HELP_DATA.


How it works in detail

To expand on the above:

1. The onMouseDown event of the button must pass the name of the Web Dynpro ABAP component

In the example, this is HRRCF_C_POSITION. It must also pass the name of the ISR_EVENT as USER_EVENT_POPUP.


This is because the 2 values are processed by the WDDOMODIFYVIEW method of the FORM_EDIT view of WDA component HRASR00_PROCESS_EXECUTE. (I am sure you know this well as the main WDA HCM P&F component) and the search help popup window is displayed with the special data being passed though the method’s interface.

   DATA      component_name    TYPE string.
 CONSTANTS hrasr_form_window TYPE qisrdfieldname VALUE ‘HRASR_FORM_WINDOW’.
 CONSTANTS user_event_popup  TYPE string         VALUE ‘USER_EVENT_POPUP’.
 CONSTANTS user_event_check  TYPE string         VALUE ‘USER_EVENT_CHECK’.

 DATA node_value_help_data   TYPE REF TO   if_wd_context_node.
 DATA value_help_datas       TYPE TABLE OF qisrsspecial_param.
 DATA value_help_data        TYPE          qisrsspecial_param.

*    Evaluate name of search component
      component_name = wd_comp_controller->isr_interface->get_special_data_with_index(
                          i_fieldindex = 1
                          i_fieldname  = hrasr_form_window ).
    CATCH cx_root.

  IF NOT component_name IS INITIAL.

*   Launch popup and Initialize variable for help component name so
*   that help popup is only launched once.
                         i_fieldindex = 1
                         i_fieldname  = hrasr_form_window
                         i_fieldvalue = space ).
    wd_comp_controller->raise_popup( component_name = component_name ).
      CATCH cx_root.

2. The MAIN window of the search help component will then display the data requested

 In the case of the HRRCF_C_POSITION search help, this is via an OADP component usage. A row is selected via an interface method and the data is returned to the calling WDA via the CLOSE_POPUP event on the component controller by populating the VALUE_HELP_DATA interface node. 

  *   send selected position back to form fields
    value_help_data-fieldname   = ‘POSITION_ID’.
    value_help_data-fieldindex   = 1.
    value_help_data-fieldvalue = wd_this->position_id.
    APPEND value_help_data TO value_help_datas.
    value_help_data-fieldname   = ‘POSITION_TEXT’.
    value_help_data-fieldindex   = 1.
    value_help_data-fieldvalue = wd_this->position_text.
    APPEND value_help_data TO value_help_datas.

*   fill context for fields
    node_value_help_data = wd_context->get_child_node( name = wd_this->wdctx_value_help_data ).
    node_value_help_data->bind_table( value_help_datas ).

3. The second half of the WDDOMODIFYVIEW is then valid:

  IF wd_comp_controller->cmp_form_window IS BOUND.
*   Write data from the search compoinent back to ISR context
    node_value_help_data = wd_context->get_child_node( name = wd_this->wdctx_value_help_data ).

        table = value_help_datas ).
    node_value_help_data->invalidate( ).
    IF NOT value_help_datas IS INITIAL.
      LOOP AT value_help_datas INTO value_help_data.
        wd_comp_controller->isr_interface->set_special_data_with_index( EXPORTING
                                                  i_fieldindex = value_help_data-fieldindex
                                                  i_fieldname  = value_help_data-fieldname
                                                  i_fieldvalue = value_help_data-fieldvalue ).

*     Refresh ISR context
      wd_comp_controller->isr_interface->call_isr_process_event( i_eventname = user_event_popup ).
      wd_comp_controller->isr_interface->call_isr_process_event( i_eventname = user_event_check ).
      wd_comp_controller->isr_interface->call_isr_process_event( i_eventname = user_event_popup ).


Therefore, this is how the search help, the main WDA and the form communicate.

The example shown above shows one of the standard search helps that is probably in your system already, the following table showing all of them. All the HRRCF prefixed ones are for erecruiting.


 Search Help for Org. Unit
 Search Help for Position
 Search Help for Qualification Block
 Search Help for Branch
 Search Help for Position
 Search Help for Branch


I have written several bespoke search helps, both using OADP component usage and ALVs and they are now the method of choice if anything more than a dropdown is required. 

You must be Logged on to comment or reply to a post.
  • This is a nice tip for those wishing to expand the capability of lookup or hit-list or whatever you want to call it. Last week I spent some time trawling through CSS notes only to discover that there isn’t a definitive position on hit-lists. Whilst users can configure their hitlists up to a point, the reality is that SAP standard config steers you away from being able to retrieve lists in excess of 5,000 items an in some cases recommends you not exceed 500 or 1,500 depending on the application area.  It would be interesting to understand how frequently people actually use these lookups in reality. FOr high speed data processors, they generally know the data that they are looking for already and don’t use lookups I would think.
    • Thanks Clinton.

      It was while implementing a bank details form on my first project (EhP2) that I came across the restriction you mention. We couln’t expect the employees to scroll through such a huge hit list, so the F4 help was removed instead.

      My current project is EhP3 (and the next on 1st March, Ehp4) so at least they will be available for the forseeable future.

  • Geez, you and Derrick are really putting the pressure on me now eh? haha GREAT blog and great info. I have typically developed “search helps” within the form in a round about manner, but this gives me more options. Your write up is straight forward and seems simple enough. Can’t wait to try it out! Thanks again.
    • Thanks Chris. I am currently writing an article on how to develop a bespoke ALV search help with all of the steps and code required. Most is there, just need to get the time to complete it. I move onto my next project on Monday (EhP4 – excellent!). Lot’s of SAP_PD forms and mass processing – maybe I’ll write a blog on these – when I understand it all!
  • This is a great write up and something that I’ve experienced working with in the past few months. Thanks for shedding more light on the topic and we look forward to more blogs from you!
    • Thanks Derrick.

      I thought your blog on the workflow aspect of HCM P&F was superb as detailed in the comments. I will be steering the new team towards it if they do not already know about it.


  • I try to using this solution it’s working very good. But I face the problem with value help search using dropdown list. symptom is when I add this solution into my form. And then I test to run the form click on button to call web dynpro abap value help is working fine when I close this window the value in dropdownlist is lost!!! .Please tell us for the solution.
  • Very nice blog. Thanks!
    Can somebody tell me if its possible to submit some custom event round trip to back end SAP_PA and Generci Services after selection is made in the Search Help and “OK” selected
    • Thanks Oleg.

      It depends on what EhP and SP you are on!  If you are on EhP3 or EhP4 SP<20/21 you will be fine in triggering the user event as we were doing just that by having the trigger in the click event of the button. Since upgrading to SP21 this doesn’t work anymore. I currently have an OSS request in for this. I’ll update the blog when I get an answer.


      • Thanks Ian.
        We are Ehp4 22. Can you give me little more details. Right now on click there is javascript ContainerFoundation_JS.SendMessageToContainer(, “submit”, “”, “”, “”, “”);. How you specify custom event? or you mean it was triggering round trip before automaticaly after “ok” selected but stop working with SP > 20


          • Ian,

            One more question. Before when you were able to submit. What kind of event was it? Standard Initialize or Check. What if we want to send user event that we configured? Is there a way to do it?

          • Hi Oleg

            We sort of found a solution in SAP note 1035630. If you use the scripting at the bottom of the note, it may help out (it worked on one form for us but not the second – odd!)


          • Apologies, Oleg.

            I rechecked with my colleague and it does not work for the WDA search help after all. It was a standard search help he was also testing with that now works.

            If we find a solution to the WDA roundtrip, I will post it but be more thorough in my testing next time…

  • Hi Ian,

    I have tried the similar scenario of calling the ORG UNIT help on the Adobe Form. I have put these two lines behind the mouse down event

    I am getting the Org Unit pop up and search result but when I click OK I don’t get the selected value on my Adobe form Org Unit field.
    Am I missing some thing?

    • Hi Vivek

      Have you named the field in your config the same as the one transferred from the WDA?

      Check the CLOSE_POPUP event on the component controller and make sure your fieldnames match.


  • Hi Ian,

    I’m trying to implement a custom HCM Form. In my form process I have 2 different scenario steps. In the first step the field instructions is hidden.In the second step the field instructions is editable. 

    This is working just until I use a WDA value help for a field. After the submit event all data in the UI_Attributes is cleared and All fields are visible.

    What is going wrong?


    • Hi Joachim

      Apologies but I’ve only just seen this. I don’t seem to get notifications, so I’ll have to recify that.

      I assume you solved your issue?


  • Do you ever tried to call this kind of webdynpro pop-up a second time after a first selection?

    For us, the second time, the pop-up appears BEHIND the form, any idea?

    • Hi Emanuel

      As above, I have just seen this.  Again ,did you solve your issue?  I recall (it’s over 2 years since I worked with HCM P&F) that the popup could be called multiple times but I’ve never heard of it being rendered behind the form. 


  • Hi Ian,

    A wonderful blog!!.

    It almost solved all my doubts but still i have one doubt in you’re above example (which is related to Recruitment Requisition Request) after selecting position i need to click on next to bring salary band, task & requirement. So could you tell where the next button code is exactly written.As i searched couldn’t find out the location but couldnt get it.

    Thanks in Advance,


    • You don’t click a “next” button. You would either (1) create your own button on the form with your own “user event” behind/for it. (2) similar to #1, on the selection of the position (drop down or input field) bind a user event to that “action” and do the same.

      • Christopher,

        There is already a standard FPM ‘next’ button in Recruitment Requisition Request form which actually brings certain values onto the form based on position.So is it possible to execute the next button event after selecting the position.Below is the screenshot.


  • Glad you liked the blog, Bob, and many thanks for stepping in and helping Bob out, Chris.

    It’s been such a long time I’m not sure I would have remembered the solution!