Wednesday, March 9, 2011

STYLE in ALV .........

In many requirements we are asked to make a particular cell editable based on some condition or make a particular cell as push button....So all this stuff can be done by ALV style segment .....
1. Add one field say STYLE type lvc_t_styl into the output table structure.
2.The field whose cell you want to make editable based on some condition , make its field catalog editable
  say ls_field_cat-edit = 'X'.
3.Now in layout pass style field name like ls_layout-stylfname = 'STYLE'.
4  w_style-fieldname = 'COMMODITY' .
w_style-style = cl_gui_alv_grid=>mc_style_enabled .
  APPEND w_style TO wa-cellstyles.
  MODIFY itab FROM wa INDEX 1 TRANSPORTING cellstyles.
Now if you see the italic and bold line ....the row inwhich we want to enable or diable
we can insert the style stuff in the same line. 









1 comment:

Anonymous said...

Play Blackjack at a Casino! - Microgaming - Microgaming
A classic card game is a thrilling goyangfc.com and engaging 토토 blackjack herzamanindir.com/ game at Microgaming. This fun game 토토사이트 is now available for your device! septcasino.com