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: 

how to gve the colors to the TOP-OF-PAGE in ALV Grid Disply..

former_member799868
Participant
0 Kudos

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...........

2 REPLIES 2

kiran_k8
Active Contributor
0 Kudos

Kranthi,

I don't think it is possible to give colours to top of page in ALV.

K.Kiran.

Former Member
0 Kudos

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.