on 07-30-2015 3:14 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.