2008 Dec 11 6:11 AM
hi friends,
i need to display some text beside the grand total in my alv.i am using 'reuse_alv_grid_display'.
please give sugestion.
thanks & regards,
urmila.T
hi friends,
i need to display some text beside the grand total in my alv.i am using 'reuse_alv_grid_display'.
please give sugestion.
thanks & regards,
urmila.T
2008 Dec 11 6:13 AM
Use ALV header as follows:
&----
*& Form TOP_PAGE
&----
Used to give heading at top
----
form top_page. "#EC CALLED
refresh it_listheader.
wa_listheader-typ = c_listheader_typ.
wa_listheader-info = text-011. "Table Information - View(011)
append wa_listheader to it_listheader.
clear wa_listheader.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = it_listheader.
endform. "TOP_PAGE
FM to create ALV report
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = sy-repid
i_callback_top_of_page = 'TOP_PAGE'
it_fieldcat = it_fieldcat
tables
t_outtab = it_dd03l_dd04t.
2008 Dec 11 6:13 AM
SEARCH in SCN with Grand total text you will get lot of posts.
2008 Dec 11 6:17 AM
Hi Urmila,
Are you using Normal ALV_GRID_DISPLAY function module? If yes, i dont think it is possible to change the Grand Total text.
I think it is automatically generated by the function module. There is an event which helps to change the SUBTOTAL Text in case of ALV_LIST_DISPLAY. But i dont think that works for ALV-GRID display.
Instead, a short cut that you can use is, introduce a column in your internal table at first position. Fill all the rows with the "text" that you want for Grand Total. Sort the table based on First Column and Display. This would get you the desired text you want in the Grand Total.
Best Regards,
Ram.
Edited by: ram Kumar on Dec 11, 2008 7:21 AM
2008 Dec 11 6:18 AM
Hi Urmila,
check this wiki..
https://wiki.sdn.sap.com/wiki/display/Snippets/DisplaytotaltextinOO-ALV
i think it will help you.
Regards,
Lokesh
2008 Dec 11 6:18 AM
HI,
While defining the layout, you need to use the below code:
gs_layout-totals_text = 'TOTAL TEXT'.
And pass the gs_layout to ALV FM.
Thanks,
Sriram Ponna.
2008 Dec 11 6:21 AM
2008 Dec 11 6:36 AM