cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying field as Radio Button in Table View

Former Member
0 Kudos


Hi,

I need to display a field as radio button in the result table view. The field is char 1 type.

To achieve this I implemented code in Get_P and Get_V methods of the field. The issue is Get_V method of the field is not trigerring and hence not displaying the text on radio button and not allowing it to select it.

Get_P method is trigerring that too is displaying only one radio button without text and in disabled mode. Even Get_I method is not trigerring. I am not sure what could be the reason for this. Please suggest.

Thanks.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Nitesh,

If you can paste your both the getter codes here then you might get a faster response.

Regards,

Shobhit

Former Member
0 Kudos

Hi Shobhit,

The Get_P code is :

method GET_P_COMPETITOR_PROD.

CASE iv_property.
    WHEN if_bsp_wd_model_setter_getter~fp_fieldtype.
      rv_value = cl_bsp_dlc_view_descriptor=>FIELD_TYPE_RADIO.

    WHEN if_bsp_wd_model_setter_getter=>fp_group.
      rv_value = 'R1'.

    WHEN if_bsp_wd_model_setter_getter=>fp_radio_cols.
      rv_value = 1.                                         "#EC NOTEXT

    WHEN if_bsp_wd_model_setter_getter=>fp_onclick.
      rv_value = 'RADIOBUTTON'.

  ENDCASE.

The Get_V code is :

method GET_V_COMPETITOR_PROD.
  DATA : lt_ddlb TYPE bsp_wd_dropdown_table,
                wa_ddlb like line of lt_ddlb.


wa_ddlb-key = '2'.
wa_ddlb-value = 'Competitor Product'.
append wa_ddlb to lt_ddlb.

wa_ddlb-key = '0'.
wa_ddlb-value = 'Non Competitor Product'.
append wa_ddlb to lt_ddlb.


IF gr_ddlb1 is not bound.
  CREATE OBJECT gr_ddlb1 EXPORTING iv_source_type = '2'.
  CALL METHOD gr_ddlb1->set_data_element
      EXPORTING
        iv_data_element = 'COMT_PR_COMP'.
endif.

  rv_valuehelp_descriptor = gr_ddlb1.

endmethod.

The issue is Get_V method is not trigerring.

Please suggest.

Thanks,

former_member188346
Active Participant
0 Kudos

Hi Nitesh,

There is no reason that the get V method should not get called. i suggest to re-generate all getter setter methods and implement all code again.

Also, I have a question: why you have used: '2' in the below line. Shouldn't it be 'T' ?

CREATE OBJECT gr_ddlb1 EXPORTING iv_source_type = '2'.

CREATE OBJECT gr_ddlb1 EXPORTING iv_source_type = 'T'.

Also, in get P method, just give it a try and put :

WHEN if_bsp_wd_model_setter_getter=>fp_radio_cols.

      rv_value = 2. instead of 1 here to make radio button visible, just a try

Regards,

Bhushan


Former Member
0 Kudos

Hi Bhushan,

I tired this but same result. Get_V still not trigerring. I tried to de-bugg Get_V_Struc but it is not calling Get_V for all the fields.

Thanks,

NItesh

Former Member
0 Kudos

Can you try to edit your code with highlighted changes and check again. Some changes Bhushan has already pointed out but still I have included below.

Get_P code:

method GET_P_COMPETITOR_PROD.

CASE iv_property.
    WHEN if_bsp_wd_model_setter_getter~fp_fieldtype.
      rv_value = cl_bsp_dlc_view_descriptor=>FIELD_TYPE_RADIO.

    WHEN if_bsp_wd_model_setter_getter=>fp_group.
      rv_value = 'R1'.

    WHEN if_bsp_wd_model_setter_getter=>fp_radio_cols.
      rv_value = 2.                                         "#EC NOTEXT

    WHEN if_bsp_wd_model_setter_getter=>fp_onclick.
      rv_value = 'RADIOBUTTON'.

  ENDCASE.


Get_V code:

method GET_V_COMPETITOR_PROD.
  DATA : lt_ddlb TYPE bsp_wd_dropdown_table,
                wa_ddlb like line of lt_ddlb.


wa_ddlb-key = '2'.
wa_ddlb-value = 'Competitor Product'.
append wa_ddlb to lt_ddlb.

wa_ddlb-key = '1'.
wa_ddlb-value = 'Non Competitor Product'.
append wa_ddlb to lt_ddlb.


IF gr_ddlb1 is not bound.
  CREATE OBJECT gr_ddlb1 EXPORTING iv_source_type = 'T'.
  gr_ddlb1->set_selection_table( lt_ddlb ).
endif.

  rv_valuehelp_descriptor = gr_ddlb1.

endmethod.


Regards,

Shobhit

Former Member
0 Kudos

Hi Shobit,

Thanks for your reply. I tried this but didn’t help.

Actually the requirement is to edit one of the column COMPETITOR_PROD
in PRD01QR/SearchHelpResult view and make this field as pick list or Radio
button so that user can search and change the value at runtime.

I read blogs stating that result view is always display only and
can’t be changed at runtime.

Please suggest is there any possible to achieve this requirement
or any alternative ?

Thanks & regards,

Nitesh

Former Member
0 Kudos

I suggest try row selection or OCA for this requirement.