Skip to Content

Search GUIBB (IF_FPM_SEARCH).

Search GuiBB used to create  for displaying search queries and search results.

In component FPM_OIF_COMPONENT , FPM_GAF_COMPONENT , or FPM_OVP_COMPONENT you can use search UIBB as initial screen.

Structure

The following figure shows how a search component might look at runtime:

1.JPG

Step to Create SEARCH GUIBB:-

Coding part: –

1).        Create a class ‘ZCL_SEARCH’.

2).        Go into interface tab and enter ‘IF_FPM_GUIBB_SEARCH’  press enter.

2.JPG

3).        Above step will implement various method of  interfaces ‘IF_FPM_GUIBB’ and ‘IF_FPM_GUIBB_SEARCH’

Note : –

          Go in each method and activate.

4).        go in method ‘GET_DEFINITION’  implemented from interface  IF_FPM_GUIBB_SEARCH.

Useful  parameter of  ‘GET_DEFINITION’  .

EO_FIELD_CATALOG_ATTR

Is of type CL_ABAP_STRUCTDESCR. The components of this object are the available search attributes. The simplest way to provide a field catalog is to create a flat DDIC structure containing all search attributes and then get the field catalog via

Code –

      eo_field_catalog_attr ?= cl_abap_structdescr=>describe_by_data( <name of DDIC structure> ).

ET_FIELD_DESCRIPTION_ATTR – Here you can provide additional information for search attributes. 

This is table type of FPMGB_S_SEARCHFIELD_DESCR.

     

      Usefull attribute of structre  FPMGB_S_SEARCHFIELD_DESCR.

NAME – Name of the search attribute.

TEXT – Text for the search criteria that is displayed.

DDIC_SHLP_NAME – DDIC F4 help used for assigning search help.

OVS_NAME – OVS name use for assigning ovs .

VALUE_SUGGEST –  suggest value

Code :-

ls_descr_attr-name = ‘CARRID’.
  ls_descr_attr-
text = ‘the carrier id’.
  ls_descr_attr-value_suggest = abap_true.
 
APPEND ls_descr_attr TO et_field_description_attr.

EO_FIELD_CATALOG_RESULT

Contains the columns that are possible to choose from during configuration of the result table.

Code :-

eo_field_catalog_result ?= cl_abap_tabledescr=>describe_by_data( <name of DDIC structure> ).

ET_FIELD_DESCRIPTION_RESULT

Here you can provide additional information for the columns of the result table, e. g. the column text.

You can use EO_FIELD_CATALOG_RESULT for column and set their column text.

Code :-

ls_descr_result-name = ‘CONNID’.
  ls_descr_result-
text = ‘the connection id’.
 
APPEND ls_descr_result TO et_field_description_result.

EV_RESULT_TABLE_SELECTION_MODE –

This parameter determines the selection mode of the result table, such single line selection or multiple line selection.

4.JPG

EV_MESSAGE  – Messages that will be displayed on the error page.

EV_ADDITIONAL_ERROR_INFO – Additional information about error messages.

ES_OPTIONS –  Here you can adjust properties for the Search UIBB, e.g. Modify standard texts .

5).        Now your definition part is over

6).        Go in method ‘PROCESS_EVENT’ implemented from  interface ‘IF_FPM_GUIBB_SEARCH’ . this execute whenever event trigger.

 

Attribute ‘io_event->mv_event_id’ hold triggered event.

When we click on search button on screen event ‘FPM_EXECUTE_SEARCH’ trigger.

7).        when event ‘FPM_EXECUTE_SEARCH’ trigger  call static method ‘TO_ABAP_SELECT_WHERE_TAB’ of  class ‘CL_FPM_GUIBB_SEARCH_CONVERSION’

 

code :-

cl_fpm_guibb_search_conversion=>to_abap_select_where_tab( EXPORTING          it_fpm_search_criteria = it_fpm_search_criteria
        iv_table_name          =
‘SFLIGHT’
        io_field_catalog      = mo_field_catalog
       
IMPORTING et_abap_select_table  = lt_where_string ).

Here  mo_field_catalog is same as  eo_field_catalog_attr we create in ‘get_defination’.

it_fpm_search_criteria hold enter value of field on screen.

iv_table_name hold table name       

it return where condtion in lt_where_string .

8).        you can use lt_where_string as where condition in select statement.

Code :-

Select * from sflight into table mt_sflight up to iv_max_num_results rows where (lt_where_string).

9).        In method ‘GET_DATA’ implemented from interface IF_FPM_GUIBB_SEARCH .

   You can use  fetch result in variable mt_sflight  from above step.

Configuring search guibb with configuration editor:-

1).    In UIbb under main add 

COMPONENT –  FPM_SEARCH_UIBB

WINDOW NAME – SEARCH_WINDOW

CONFIGURATION NAME – <name your configuration>

5.JPG

2).        now create your search configuration  In new window.

6.JPG

3).        when you click create system ask for package and description.

4).        After saving package and description system ask for feeder class . give name of class you created above and click on edit parameter.

7.JPG

5).        Now add field and column in result as per your need.

  8.JPG

Search Criteria            –  add field you need for selection on screen

Column of Result List –  add column you need as output column

6).  There are two alternatives when defining a result list:

·        Use the standard result list from the Search UIBB

if you use ‘Column of Result List’  option This list is very simple; it has no toolbar. If you want to use this list, define the

parameters EO_FIELD_CATALOG_RESULT and ET_FIELD_DESCRIPTION_RESULT in the method GET_DEFINITION.

      The reset functionality works automatically.

   

  ·        Use a separate List UIBB

  You can either create a separate list in the floorplan or you can use the Composite Search. When you use a List UIBB, you must implement the

  reset functionality and you are also responsible for the communication between the Search UIBB and the result list. You can use wiring, for

  example, for this communication.

  you can add a List UIBB by clicking List UIBB .  

  if you create a list uibb then you have to trigger an event and handel in list feeder class

To report this post you need to login first.

Be the first to leave a comment

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

Leave a Reply