on 10-22-2014 7:59 AM
Hi experts,
I have a requirement in search result view of service component : BT116S_SRVO .
I need to change field type to f4 help of service org type select in dropdown.
Here Service org in dropdown , I need to change to f4help.
Can anybody help me to find out how it dynamically change the properties of field?
Regards
Alok
Hello,
Step 1: Create a Search help using SE11 transaction and provide the needed table, input and output params.
Step 2: Go to the component BT116S_SRVO and Redifine GET_V method of Service Organization attribute.
Step 3: Inside the GET_V method create the Object for rv_valuehelp_descriptor. Below is the code:
data: lt_in type if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping_tab,
ls_in type if_bsp_wd_valuehelp_f4descr=>gtype_param_mapping.
if <CONDITION_1> = abap_true. "F4 Help
ls_in-context_attr = 'struct.cat_id'.
ls_in-f4_attr = 'CAT_ID'.
append ls_in to lt_in.
create object RV_VALUEHELP_DESCRIPTOR type CL_BSP_WD_VALUEHELP_F4DESCR
EXPORTING
iv_help_id = '<YOUR SEARCH HELP>' "Search help created from SE11
iv_help_id_kind = if_bsp_wd_valuehelp_f4descr=>help_id_kind_name
iv_input_mapping = lt_in
iv_output_mapping = lt_in.
elseif <CONDITION_2> = abap_true. "Dropdown List
* DATA: lr_ddlb TYPE REF TO cl_crm_uiu_ddlb,
* lt_ddlb TYPE bsp_wd_dropdown_table,
* ls_ddlb TYPE bsp_wd_dropdown_line,
* lt_uname TYPE TABLE OF char15,
* ls_uname LIKE LINE OF lt_uname.
*
* SELECT DISTINCT created_by FROM (TABLE) INTO TABLE lt_uname.
* IF sy-subrc = 0.
*
* CREATE OBJECT lr_ddlb
* EXPORTING
* iv_source_type = 'T'. " Single-Character Flag
*
*
* LOOP AT lt_uname INTO ls_uname.
* ls_ddlb-key = ls_uname.
* ls_ddlb-value = ls_uname.
* APPEND ls_ddlb TO lt_ddlb.
* ENDLOOP.
* INSERT INITIAL LINE INTO lt_ddlb INDEX 1.
* lr_ddlb->set_selection_table( it_selection_table = lt_ddlb ).
*
* rv_valuehelp_descriptor ?= lr_ddlb.
* ENDIF.
endif.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alok,
For displaying f4 help or dropdown get_v and get_p methods are not useful.
You have to use get_dquery_definitions method in search view impl class, you can find sample code in this method for standard fields. So you can follow the same steps to provide search help for your field.
Best Regards,
Dharmakasi.
Hi Alok,
Try to add the code in GET_P and GET_V method of the Service Org in Query view and result view as well.It will work.
Cheers,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.