cancel
Showing results for 
Search instead for 
Did you mean: 

Editable alv on click of button

Former Member
0 Kudos

Hello Friends...

I am displaying an alv in a view ......now want to make it editable (alll columns ) on click of button ...

how can i do this ....Please provide some reffrence code...

Thanks and Regards...

Priyank Dixit

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

create a attribute READ_ONLY type wdy_boolean inaside the node to which the ALV is bound..

Now for the ALV coulnns create an input field type reference cl_salv_wd_uie_input_field and bind the read only to this attribute..

initially before the table binding -

loop at lt_table into ls_table.
ls_table-read_only = abap_true.    " non editable
modify lt_table from ls_table index sy-tabix.
endloop.

Now on the button handlder,

loop at lt_table into ls_table.
ls_table-read_only = abap_false.    "  editable
modify lt_table from ls_table index sy-tabix.
endloop.

Regards,

Lekha.

Edited by: Lekha on Dec 7, 2009 1:26 PM

Answers (4)

Answers (4)

JurijsP
Explorer
0 Kudos

Hi,

Did you find the solution? If yes please share it. We are facing the same problem.

Thanks!

Former Member
0 Kudos
Former Member
0 Kudos

Hi,

go thru SALV_WD_DEMO_TABLE_EDIT examples this would be help full.

for more go thru these threads

Former Member
0 Kudos

hi,

Refer this tutorial on Editiong ALV :

http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a....

The approach would be :

1. Place input fields inside your ALV to make it editable.

2. Ensure that node binded to ALV has one attribute to make it Editable at runtime.

Rest refer ans by Lekha.