Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ALV OO Set cells editable but not deletable

Former Member
0 Kudos

Hello there,

i have again a question regarding ALV, i know how to set cells to editable state and i know how to set a row to not deletable. What i don#t know is how to realize both.

when i pass the arguments like


 lt_celltab-style = cl_gui_alv_grid=>mc_style_no_delete_row.
  
  lt_celltab-style2 = cl_gui_alv_grid=>mc_style_enabled.

rows are not deletable but cells not editable. If i change the code vice versa cells are editable but rows deletable.

I can kick out the delete Button, but DEL is still working, i can't do a

layout-no_rowmark = 'X'.

because the user needs to select single or multiple rows....

any hints, links, solutions

thanks in advance

Mathias

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

You can try using NO_ROWINS option of Layout.

layout-no_rowins = 'X'.

3 REPLIES 3

former_member188685
Active Contributor
0 Kudos

You can try using NO_ROWINS option of Layout.

layout-no_rowins = 'X'.

naimesh_patel
Active Contributor
0 Kudos

You can achieve both by setting the layout like:


* To avoid delete
ls_layout-NO_ROWINS = 'X'.
* pass this to g_grid->set_table_for_first_display or g_grid->SET_FRONTEND_LAYOUT.


* Do the same thing for the Change
lt_celltab-style = cl_gui_alv_grid=>mc_style_enabled.

Regards,

Naimesh Patel

0 Kudos

Thanks a lot guys you've saved my weekend