cancel
Showing results for 
Search instead for 
Did you mean: 

DISABLE/ENABLE Particular Row in ALV Table

Former Member
0 Kudos

Hello All.....

I haven't got required solutions with the previous posts on this topic

I have an ALV table on that I am applying Read Only property on all the fields as per requirment I did this.

My another Requirment is I need to ENABLE or DISABLE a particular record based on one active flag comming back end. I created one attribute ENABLE in context of type WDY_BOOLEAN while populating data I am setting value for that attribute. I have one Button on the tool bar to trigger action.

The problem I am facing is I couldn't able to set DISABLE property to the ALV configuration model.

I used IF_SALV_WD_TABLE_SETTINGS~GET_ENABLED( abap_false ) but with this the entair table is becomming DISABLED but what I need is DISABLE/ENABLE for a particular row.

Thanks,

Venkat.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

It is not working because you are setting the wrong property. Go through this link at the end it is described how you can enable or disable entire row.

lr_input->set_enabled_fieldname( value = 'enabled' ).

[http://wiki.sdn.sap.com/wiki/display/WDABAP/HowtoeditconditionallyrowofaALVtableinWebDynproforABAP|http://wiki.sdn.sap.com/wiki/display/WDABAP/HowtoeditconditionallyrowofaALVtableinWebDynproforABAP]

Former Member
0 Kudos

Hi Bhaskeran,

Thank you very much for your inputs, I got a solution with your approach below code worked for me

LOOP AT lv_columns INTO ls_column.

lr_column = ls_column-r_column.

CREATE OBJECT lr_input

EXPORTING

value_fieldname = ls_column-id.

CALL METHOD lr_column->set_cell_editor

EXPORTING

value = lr_input.

lr_input->set_read_only_fieldname( value = 'READ_ONLY' ).

lr_input->set_enabled_fieldname( value = 'ENABLE' ).

ENDLOOP.

Former Member
0 Kudos

Hi,

My requirement is in the same row if i am selecting first column with the same row ( I am using drop down) based on the value

my 5 column in the same row to be cahnged to READ ONLY.

pl help .

how to put logic to get this.

Thanks in advance.

Dav

Answers (0)