Skip to Content

Search GUIBB with OVS:-

If you need ovs on search GUIBB this can be possible by implementing interface IF_FPM_GUIBB_OVS  .

Step to create search GUIBB with OVS.

  1. create search GUIBB .

    use below link for how to create simple search GUIBB

.  

  http://scn.sap.com/people/jitendrayadav/blog/2012/12/06/search-component-with-feeder-class-iffpmsearch

  1. interface tab enter IF_FPM_GUIBB_OVS interface it will implement method

1.JPG

  1. in order to assign fields OVS . go in method IF_FPM_GUIBB_SEARCH~GET_DEFINITION assign class name in attribute ovs_name .

     

Code :-

  ls_descr_attr-name = ‘CARRID’.
  ls_descr_attr-
text = ‘the carrier id’.
  ls_descr_attr-ovs_name =
‘ZSEARCH_WITH_OVS’.
 
APPEND ls_descr_attr TO et_field_description_attr. 

    

  1. Implement PHASE_0.  

Code: –

  DATA:  l_text          TYPE wdr_name_value,
         l_label_texts  
TYPE wdr_name_value_list,
         l_column_texts 
TYPE wdr_name_value_list,
         l_window_title 
TYPE string,
         l_group_header 
TYPE string,
         l_table_header 
TYPE string.

  l_text-name = ‘CARRID’
  l_text-
value = ‘carrier id’.
 
APPEND l_text TO  l_label_texts.
 
append l_text TO  l_column_texts.
 
  l_text-name =
‘CONNID’.
  l_text-
value = ‘connid id’.
 
APPEND l_text TO  l_label_texts.
 
append l_text TO  l_column_texts.

  l_window_title = ‘ovs in search GUIBB’.
  l_group_header =
‘ovs in search GUIBB’.
  l_table_header =
‘ovs in search GUIBB’.

  io_ovs_callback->set_configuration(
            label_texts  = l_label_texts
            column_texts = l_column_texts
            group_header = l_group_header
            window_title = l_window_title
            table_header = l_table_header
            col_count    = 1
            row_count    =
5 ).

  1. Implement PHASE_1.

     

Code :-

    BEGIN OF t_stru_input,*   add fields for the display of your search input here
       carrid
TYPE s_carr_id,
       connid
type s_conn_id,
    
END OF t_stru_input .data: l_search_input  TYPE t_stru_input.

  io_ovs_callback->context_element->get_static_attributes(
      IMPORTING static_attributes = l_search_input ).*     pass the values to the OVS component
  io_ovs_callback->set_input_structure(
     
input = l_search_input ).

  1. Implement PHASE_2.

Code :-

  begin of t_stru_list,*   add fields for the selection list here
    carrid
type s_carr_id,
      connid
type s_conn_id,
 
end of t_stru_list .

FIELD-SYMBOLS: <query_params> TYPE t_stru_input.
 
DATA: l_select_list   TYPE STANDARD TABLE OF t_stru_list,
        ls_list
TYPE t_stru_list,
        ls_select_list  
TYPE t_stru_list.

  ASSIGN io_ovs_callback->query_parameters->*
                         
TO <query_params>.
 
IF  <query_params> IS ASSIGNED.

    SELECT carrid connid FROM sflight INTO CORRESPONDING FIELDS OF TABLE l_select_list WHERE carrid = <query_params>-carrid.
 
ENDIF.

  io_ovs_callback->set_output_table( output = l_select_list ).

  1. Implement PHASE_3.

   Code :-

FIELD-SYMBOLS: <selection>    TYPE t_stru_list.

  ASSIGN io_ovs_callback->selection->* TO <selection>.

  IF <selection> IS ASSIGNED.

    io_ovs_callback->context_element->set_attribute(
                           name  = IV_WD_CONTEXT_ATTR_NAME
                           value = <selection>-carrid ).

  ENDIF.

Result will be :-

2.JPG

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

  1. RIMI DE

    HI Jitendra,

    I have implemented the same. But facing some problem. I have more than one or two fields for search criteria. The search is also work fine. But if I delete any search criteria without erasing that io_ovs_callback will still hold the value. This is not correct.

    http://scn.sap.com/message/13716165#13716165 here i have attached the screen shot.

    One more problem: I have tried to set the title, But still it is not coming in the UI although io_ovs_callback is holding the value.

    Thanks,

    Rimi

    (0) 

Leave a Reply