04-17-2007 7:37 PM
Hi All,
I have a problem displaying the ALV header using REUSE_ALV_GRID_DISPLAY_LVC.
Any input on how?
Thanks,
Jim
04-17-2007 9:56 PM
Hi,
add the field to the table declaration.
DATA cellstyles TYPE lvc_t_styl .
now tell the layout about this styling field.
ps_layout-stylefname = CELLSTYLES.
DATA ls_listrow LIKE LINE OF pt_list(the displayed table) .
DATA ls_stylerow TYPE lvc_s_styl .
DATA lt_styletab TYPE lvc_t_styl .
here the seatmax(carrid) is not editable if the value is'XY' and planetype(connid) is editable if the value is '02'
LOOP AT pt_list INTO ls_listrow .
IF ls_listrow-carrid = 'XY' .
ls_stylerow-fieldname = 'SEATSMAX' .
ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled .
APPEND ls_stylerow TO lt_styletab .
ENDIF .
IF ls_listrow-connid = '02' .
ls_stylerow-fieldname = 'PLANETYPE' .
ls_stylerow-style = cl_gui_alv_grid=>mc_style_enabled .
APPEND ls_stylerow TO lt_styletab .
ENDIF .
INSERT LINES OF lt_styletab INTO ls_listrow-cellstyles .
MODIFY pt_list FROM ls_listrow .
ENDLOOP .
hope this helps.
regards,
bhaskar
04-19-2007 7:28 PM
06-05-2013 2:13 PM