cancel
Showing results for 
Search instead for 
Did you mean: 

Change the selected dropdown only in ALV

former_member672218
Participant
0 Kudos

Hello All,

i had implemented a dropdown field in alv and it works fine. My requirement is to choose any single record and click on the chnage button and then particular

row's dropdown field alone is to be made editable. The problem is that when i choose and click on the change button, all the row's dropdown field is editable.

The other fields in the row are in display mode but the dropdown field in each row is made editable. I have impleneted the same change mode logic for normal

input field and that works fine, meaning whichever row i choose that row's input field alone is editable but in dropdown that is not the case. Can someone

help pls?

Regards,

Venkat

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi venkat,

->depending up on columns u have to create attributes attributes in alv context.(Ex:  5 column  then u have to create 5 atributes of type WDY_BOOLEAN).

->after that u have to set the attributes to cell design of each column

  data: lr_column1 TYPE REF TO cl_salv_wd_column,,

            l_value   TYPE REF TO cl_salv_wd_config_table .

  lr_column1 = l_value->if_salv_wd_column_settings~get_column( 'COLUMN1').
  lr_column1->set_cell_design_fieldname( value = 'ATTRIBUTE1).

like u have to do every column.( 6 columns with  6 attributes.)

-> After that u have to create mehtod for dropdown selectedkey Event for method.

->Depending up on Condition U have to set the values for attributes in alv context......

It may be helpfull.....

If it is wrong correct me...

Regards,

Venkat.

chengalarayulu
Active Contributor
0 Kudos

Venkat,

You can try in this way....

1. Add one more attribute to yur ALV Node EDIT_DROP and make it invisible using table config settings.

2. maintain binding with this attribute while inserting cellEditor for ALV by the help of below method..

     Class:   CL_SALV_WD_UIE_DROPDOWN_BY_IDX

     Method: SET_READ_ONLY_FIELDNAME - Here you should export EDIT_DROP as field name.

3. Now follow with your code... Just read selected record on Change action.

4. Get index also, the make EDIT_DROP as True at selected index..

5. use set_static attributes, here you should export Index also.

6. Now test the application. It should work.

former_member672218
Participant
0 Kudos

Any suggestions?

Regards,
Venkat

Former Member
0 Kudos

In ALV you can change modes or set properties for a Column and not for Row's , your requirement doesn't seem to be possible. The other way to achieve this is use a table control UI in Webdynrpo which you will able to handle based on your requirement.

Thanks

Phani