Purpose:
Demonstrate the scenario of providing custom search help for the fields in standard webdynpro application.
Scenario:
Here I consider the scenario to attach OVS search help for an attribute FIRSTNAME in context node PERSONALDATA of component HRRCF_C_PERSONL_DATA_UI
Pre-requisite:
Basic knowledge of Webdynpro ABAP & OVS search help
The existing output screen of standard application
Step1:
Open the standard application HRRCF_C_PERSONL_DATA_UI in t-code SE80 and click on Enhance ( Ctrl + f4 ) button to creation enhancement implementation as below
Step2:
A dialog box appears for creating enhancement implementation and provide the name and description as below
Step 3:
Create the component usage OVS_HELP by using standard ovs component WDR_OVS as shown below
Step 4:
Open view VW_PERSONALDATA and click on enhance ( ctrl + f4 ) button as show below
Step 5:
Chose the enhancement implementation YDEMO_OVS_HELP as shown below
Step 6:
Click on the Create component usage button to create component usage OVS_HELP in view as shown below
Step 7:
Choose the OVS_HELP component from the list as below
Step 8:
We are going to consider the attribute FIRSTNAME of context node PERSONALDATA for attaching OVS value help as shown below
Step 9:
Go to methods tab of view and create event handler by using OVS_HELP as show below
Step 10:
Use F4 key to open list of components available as below
Step 11:
Select the OVS_HELP and event OVS and the event handler is successfully registerd for an event OVS as below
Please refer the below sample code to populate the value list
| ovs_firstname |
|---|
METHOD ovs_firstname . DATA: ls_search_input TYPE lty_stru_input, FIELD-SYMBOLS: <ls_query_params> TYPE lty_stru_input, CASE ovs_callback_object->phase_indicator. WHEN if_wd_ovs=>co_phase_0. "configuration phase, may be omitted
ls_text-name = `SECONDNAME`. APPEND LINES OF lt_column_texts TO lt_label_texts.
ovs_callback_object->context_element->get_static_attributes(
IF ovs_callback_object->query_parameters IS NOT BOUND. * call business logic for a table of possible values "============================================= CLEAR ls_select_list. APPEND ls_select_list TO lt_select_list. CLEAR ls_select_list. APPEND ls_select_list TO lt_select_list.
IF ovs_callback_object->selection IS NOT BOUND. ASSIGN ovs_callback_object->selection->* TO <ls_selection>. ovs_callback_object->context_element->set_static_attributes( ENDIF. ENDMETHOD. |
Step 12:
Now we need to create POST EXIT for method WDDOMODIFYVEW as shown below
Step 13:
Write the code in post exit of method WDDOMODIFYVIEW as shown below
Please refer the below sample code
| POST_EXIT |
|---|
METHOD _pst_dqxnmttuzezeszudlnztqzh4u .
CHECK first_time EQ abap_true.
" Get node ref " get node info reference |
Output:
Use F4 key to get the value help for field FIRST NAME as below
Chose the record from value list and value of field FIRSTNAME is getting filled as below












