cancel
Showing results for 
Search instead for 
Did you mean: 

alv column with suggestive search

0 Kudos

i have editable alv now i need to give suggestive search on one of its column

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

use class  cl_salv_wd_uie_input_field method

0 Kudos

can you please paste code i'm new to webdynpro

Former Member
0 Kudos

1. Get all the columns to make row editable
  CALL METHOD lv_value->if_salv_wd_column_settings~get_columns
    RECEIVING
      value = lt_columns.
2. Now loop the columns table and change the cell editor of a column
LOOP AT lt_columns INTO ls_columns.

 

  CREATE OBJECT lr_column_type
      EXPORTING
        value_fieldname = ls_columns-id.

CASE ls_columns-id.

    WHEN  <column name>.


        DATA : lo_material_descrip TYPE REF TO cl_salv_wd_uie_input_field.

        CREATE OBJECT lo_material_descrip
          EXPORTING
            value_fieldname = ls_columns-id.


        ls_columns-r_column->set_cell_editor( lo_material_descrip ).


        CALL METHOD lo_material_descrip->set_suggest_values
          EXPORTING
            value = abap_true.

endcase.

endloop.

Answers (2)

Answers (2)

amy_king
Active Contributor
0 Kudos

Hi Rajkamal,

I haven't tried this myself, but I believe the logic is sound...

Take a look at this document, .

After setting InputField (cl_salv_wd_uie_input_field) as the cell editor for a column (steps 14 and 15 in the document), you can use method cl_salv_wd_uie_input_field->set_suggest_values to enable suggested values for the InputField. Note the other requirements for enabling Proposals for InputFields should also be met.

Cheers,

Amy

former_member184578
Active Contributor
0 Kudos

Hi,

Which version of Netweaver you are on..? From Netweaver 7.02, Suggest Values feature is available.

Check DEMO_VALUE_SUGGEST program.

Help Doc: http://help.sap.com/saphelp_nw73ehp1/helpdata/en/8c/20efbd1b0a463ba5914356f01de03f/frameset.htm

Hope this helps u.,

Regards,

Kiran