OVS Search Help in GUIBB’s

Posted on Updated on

This tutorial explains how to set OVS as a search help option for the fields that are created through GUIBB’s (Feeder class). With the normal input field which we are creating at the UI level we set the search help option of the particular field as ‘OVS’ by setting the search help mode property of the context attribute that we are binding to the input field.

In case of Generic UIBB’s neither the UI element nor the context node is being created at design level to be modified. The UI elements and corresponding context are created through the configuration provided in the feeder class. Hence it takes a quite little effort more than usual to set the OVS Search help to those fields.

In this tutorial I have taken a field from Search GUIBB created in earlier tutorial and set OVS Search help for the field carrid.

For information on OVS search help visit the link.


Pre-requisites: A Search GUIBB component designed already.


For an OVS Search help to be implemented a class needs to be constructed which implements the interface IF_FPM_GUIBB_OVS. This Interface contains all the four phases of OVS and is called at pre-defined runtime. All we need to do is fill out the logic that are carried out in each phases in the corresponding method.


Write the coding’s in the method as follow:

Note: Nothing is new is being done here. All the codes that are executed in the OVS Search help within the case statement are split into different methods. Compare with the code in OVS Search Help.

Construct a class and implement the interface IF_FPM_GUIBB_OVS.


Write the methods in the coding as below.


types : begin of lty_stru_input,
carrid type sflight-carrid,
end of lty_stru_input.

types:  begin of lty_stru_list,
carrid type sflight-carrid,
connid type sflight-connid,
end of lty_stru_list.

data: ls_search_input  type lty_stru_input,
lt_select_list   type standard table of lty_stru_list,
ls_text          type wdr_name_value,
lt_label_texts   type wdr_name_value_list,
lt_column_texts  type wdr_name_value_list,
lv_window_title  type string,
lv_group_header  type string,
lv_table_header  type string.

field-symbols: <ls_query_params> type lty_stru_input,
<ls_selection>    type lty_stru_list.

ls_text-name = `CARRID`.
ls_text-value = `Airline ID`.
insert ls_text into table lt_label_texts.

ls_text-name = `CARRID`.
ls_text-value = `Airline ID`.
insert ls_text into table lt_column_texts.

ls_text-name = `CONNID`.
ls_text-value = `Connection Number`.
insert ls_text into table lt_column_texts.

lv_window_title = 'OVS Search Help'.
lv_group_header = 'Flight Information'.
lv_table_header = 'Flight details'.

label_texts  = lt_label_texts
column_texts = lt_column_texts
group_header = lv_group_header
window_title = lv_window_title
table_header = lv_table_header
col_count    = 2
row_count    = 20 ).



types : begin of lty_stru_input,
          carrid type s_carr_id,
        end of lty_stru_input.

data: ls_search_input  type lty_stru_input.

name  =  io_ovs_callback->context_attribute   " NAME
value =  ls_search_input-carrid   " DATA

io_ovs_callback->set_input_structure( exporting  input = ls_search_input ).


types : begin of lty_stru_input,
         carrid type sflight-carrid,
        end of lty_stru_input.

types:  begin of lty_stru_list,
         carrid type sflight-carrid,
         connid type sflight-connid,
        end of lty_stru_list.

data: lt_select_list   type standard table of lty_stru_list.

field-symbols: <fs_query_params> type lty_stru_input.

assign io_ovs_callback->query_parameters->* to <fs_query_params>.

select carrid connid 
           from sflight 
           into table lt_select_list 
           where carrid = <fs_query_params>-carrid.

io_ovs_callback->set_output_table( output = lt_select_list ).


types:  begin of lty_stru_list,
          carrid type sflight-carrid,
          connid type sflight-connid,
        end of lty_stru_list.

field-symbols: <ls_selection>    type lty_stru_list.

assign io_ovs_callback->selection->* to <ls_selection>.
if <ls_selection> is assigned.

value = <ls_selection>-carrid ).


That’s it! The implementation of the class for OVS search help is done. Now we need to assign this search help class as OVS to the field attribute.

Go to the GET_DEFINITION method of the feeder class and fill the exporting parameter ET_FIELD_DESCRIPTION_ATTR with the component OVS_NAME for the corresponding attribute.

append INITIAL LINE TO et_field_description_Attr ASSIGNING <fs_desc_attr>.
<fs_desc_attr>-name              = 'CARRID'.
<fs_desc_attr>-ovs_name          = 'ZCL_CSK_CARRID_OVS'.




Test the application: