08-31-2007 10:02 AM
i want to give 3 different colors in the top-of-page(there are three different lines each line should disply in different colors)...
plaese tell me how can i do that...........
08-31-2007 10:06 AM
Kranthi,
I don't think it is possible to give colours to top of page in ALV.
K.Kiran.
08-31-2007 10:09 AM
Hi
Try like this...
form build_events.
clear gv_event.
refresh i_events.
Get the ALV events
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = i_events
exceptions
list_type_wrong = 1
others = 2.
if sy-subrc = 0.
sort i_events by name.
endif.
Form for Top-of-Page ---------------------------------*
read table i_events with key name = slis_ev_top_of_page
into gv_event
binary search.
if sy-subrc = 0.
move gc_top_of_page to gv_event-form.
modify i_events from gv_event index sy-tabix.
endif.
Form for End-of-List ---------------------------------*
read table i_events with key name = slis_ev_end_of_list
into gv_event
binary search.
if sy-subrc = 0.
move gc_end_of_list to gv_event-form.
modify i_events from gv_event index sy-tabix.
endif.
Specify the ALV layout
wa_layout-max_linesize = gv_linsz.
wa_layout-min_linesize = gv_linsz.
endform. " build_events
form top_of_page_d.
format color col_heading.
write: / 'Satyanarayana'
format color col_total.
write: / 'Sayana'.
....
...
format reset.
endform.
Satya.