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: 

Display Header Using REUSE_ALV_GRID_DISPLAY_LVC

Former Member
0 Kudos

Hi All,

I have a problem displaying the ALV header using REUSE_ALV_GRID_DISPLAY_LVC.

Any input on how?

Thanks,

Jim

3 REPLIES 3

Former Member
0 Kudos

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

Former Member
0 Kudos

Solved it on my own.

0 Kudos

can you explain how you sold cause i have same problem too