cancel
Showing results for 
Search instead for 
Did you mean: 

Value Search Help for Input Fieds in FPM

former_member374952
Participant
0 Kudos

Hi,

I have created a GUIBB with input fields now need to enhance the input fields with  Value search help of other data types via check table  in Floor plan manager.  Need a sample code snippet of feeder class implmenting the value search help for input fields.

Regards,

Vicky

Accepted Solutions (0)

Answers (1)

Answers (1)

AbhishekSharma
Active Contributor
0 Kudos

Hi Vicky,

You can add Search help on any field as follows:

Need to Implement Interface IF_FPM_GUIBB_OVS in your feeder class.

As a result 4 methods will be available :

IF_FPM_GUIBB_OVS~HANDLE_PHASE_0

IF_FPM_GUIBB_OVS~HANDLE_PHASE_1

IF_FPM_GUIBB_OVS~HANDLE_PHASE_2

IF_FPM_GUIBB_OVS~HANDLE_PHASE_3

APPEND INITIAL LINE TO et_field_description ASSIGNING <fs_field_description>.

       <fs_field_description>-name = '<field_ID>'.

       <fs_field_description>-ovs_name = 'OVS_NAME'.

       <fs_field_description>-mandatory  = abap_true.

In Method _0 write below code :

METHOD if_fpm_guibb_ovs~handle_phase_0.

   CASE iv_field_name.

  **********************************************************************

*--> Trigger when COUNTRY F4 help is clicked

**********************************************************************

     WHEN 'COUNTRY'.

       ovs_country(

         EXPORTING

           iv_phase_ind        = if_wd_ovs=>co_phase_0

           ovs_callback_object = io_ovs_callback

       ).

ENDCASE.




Method OVS_COUNTRY will have below code:


CASE iv_phase_ind.

     WHEN if_wd_ovs=>co_phase_0"configuration phase, may be omitted

*   in this phase you have the possibility to define the texts,

*   if you do not want to use the defaults (DDIC-texts)

       lv_window_title cl_wd_utilities=>get_otr_text_by_alias( '<Your LIST Name>' ).

       ovs_callback_object->set_configuration(

                 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    = lv_row_count ).

     WHEN if_wd_ovs=>co_phase_1.

*   set search structure and defaults

       ovs_callback_object->set_input_structure(

           input = ls_search_input ).

WHEN if_wd_ovs=>co_phase_2.

       IF ovs_callback_object->query_parameters IS BOUND.

         ASSIGN ovs_callback_object->query_parameters->*

                                  TO <ls_query_params>.

         lv_country      = <ls_query_params>-country.

         lv_country_desc = <ls_query_params>-country_desc.


Loop lt_country assigning <fs_country>

*--> add country names and description to an Internal table LT_FINAL_COUNTRY

ENDLOOP.



ovs_callback_object->set_output_table( output = LT_FINAL_COUNTRY ).


WHEN if_wd_ovs=>co_phase_3.

*   apply result

       IF ovs_callback_object->selection IS BOUND.

         ASSIGN ovs_callback_object->selection->* TO <ls_selection>.

         IF <ls_selection> IS ASSIGNED.

*--> Set the Country

           ovs_callback_object->context_element->set_attribute(

                                  name  = 'COUNTRY'

                                  value = <ls_selection>-country ).

*--> Set the Country name

           ovs_callback_object->context_element->set_attribute(

                                  name  = 'COUNTRY_DESC'

                                  value = <ls_selection>-country_desc ).

          ENDIF.

       ENDIF.


In IF_FPM_GUIBB_OVS~HANDLE_PHASE_1

again call ovs_country with proper Phase information.

Hope this helps.

Thanks-

Abhishek


former_member374952
Participant
0 Kudos

Hi Abhishek,

I implemented the value search help using USMD_RULE_SERVICE2 Badi .

Regards,

Vicky