Hi,
In OOPS world u have to use Event handler for class "cl_gui_alv_grid" and event name is "print_top_of_page" and "print_end_of_page".
Go to this example BCALV_GRID_01.
This program illustrates how the events for print processing PRIINT_TOP_OF_PAGE,
PRINT_END_OF_PAGE,
PRINT_TOP_OF_LIST,
PRINT_END_OF_LIST are handled.
thanks!!