Search Page: Search Attributes customization
we have a basic requirement.
On a Product Search page. For the Search Attribute eg. Configurable, for this by default we have search criteria as is, is not, start with, ... like that, how to restrict this criteria to eg: only is.
And how to set a particular value eg: Yes/NO to selected value.
In this case, you need to build the dropdown value help for this custom attribute.
Redefine the GET_P method of this custom attribute and implement this code:
CASE iv_property. WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype. rv_value = cl_bsp_dlc_view_descriptor=>field_type_picklist. ENDCASE.
The above code is to make this field as dropdown help type.
After this, Redefine the GET_V method of this attribute and implement this code:
DATA: ls_ddlb type bsp_wd_dropdown_line, lt_ddlb type bsp_wd_dropdown_table, gr_ddlb type ref to CL_CRM_UIU_DDLB. ls_ddlb-key = 'X'. ls_ddlb-value = 'Yes'. insert ls_ddlb into table lt_ddlb. ls_ddlb-key = ' '. ls_ddlb-value = 'No'. insert ls_ddlb into table lt_ddlb. if not gr_ddlb is bound. create object gr_ddlb exporting iv_source_type = 'T'. endif. gr_ddlb->set_selection_table( it_selection_table = lt_ddlb ). rv_valuehelp_descriptor = gr_ddlb.
Hope this helps.