05-28-2007 11:27 AM
Hi ,
i am doing a alv tree display. in which i want to display the average amount .but i find only do_sum. is there any possiblity to do average.
thanks,
madhu
05-28-2007 11:28 AM
05-28-2007 11:30 AM
In the 'end_of_list' event of the ALV you can calculate the avarage and display.
Ex:
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE'
i_callback_html_end_of_list = 'END_OF_LIST_HTML'
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
i_save = 'X'
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
&----
*& Form end_of_list_html
&----
output at the end of the list - not in printed output *
&----
FORM end_of_list_html USING end TYPE REF TO cl_dd_document.
calculate the avarage and display.
ENDFORM. "end_of_list_html.