cancel
Showing results for 
Search instead for 
Did you mean: 

change dropdown to f4 help in search result view

former_member267851
Participant
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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.

former_member267851
Participant
0 Kudos

Thanks for replay.

But my requirement is different .

If u see there dropdown is coming but there is no get_v or get_p method is implemented .

It is happening dynamically and I want to know where the code is written

Regards

Alok


RaviTejaGuptha
Active Participant
0 Kudos

Hi Alok,

Just generate the GET_V and GET_P method for that attribute. May be the values are getting from the domain. When you create the above methods you can alter the behavior.

Thanks,

Ravi

former_member267851
Participant
0 Kudos

Hi,

I implemented get_v and get_p method , write the code for f4 help nothing is working .

Pls suggest some helpful answer ....

Regards

Alok


dharmakasi
Active Contributor
0 Kudos

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.

former_member267851
Participant
0 Kudos

Thanks Dharmakasi.

I solved my issue already.

I gave u point bcz ur answer is correct.

Regards

Alok

RaviTejaGuptha
Active Participant
0 Kudos

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