You are on page 1of 3

Open all |

Close all

Add Footer functionality to ALVgrid


report

SAP
Development
ABAP In order to add a footer which is always displayed on screen to an ALV grid report you need to perform
Reporting
the steps below. Please note this will not be displayed in the printed output
ALV
Step 1. Update 'REUSE_ALV_GRID_DISPLAY' FM call to include parameter
ABA 'i_callback_html_end_of_list'
P Reporting
Step 2. Create new FORM 'END_OF_LIST_HTML' for building footer
SAPs
cript
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
Jetfor
i_callback_program
= gd_repid
m
i_callback_top_of_page = 'TOP-OF-PAGE'
General
i_callback_html_end_of_list = 'END_OF_LIST_HTML'
ABAP
is_layout
= gd_layout
it_fieldcat
= fieldcatalog[]
SAP
i_save
= 'X'
Module Areas
tables
SAP
t_outtab
= it_ekko
Databases
exceptions
program_error
=1
SAP
others
= 2.
Enhancements
Transact
ion codes
Tables *&------------------------------------------------------------------*
*&
Form end_of_list_html
Program *&------------------------------------------------------------------*
s
*
output at the end of the list - not in printed output
*
Function *&------------------------------------------------------------------*
Modules
FORM end_of_list_html USING end TYPE REF TO cl_dd_document.
Upgrade DATA: ls_text TYPE sdydo_text_element,
- SAP ERP
l_grid
TYPE REF TO cl_gui_alv_grid,
f(14)
TYPE
c VALUE 'SET_ROW_HEIGHT'.
Netweav
er Dev
ls_text = 'Footer title'.
Java dev
* adds and icon (red triangle)
SAP
CALL METHOD end->add_icon
Learning
EXPORTING
Country
sap_icon = 'ICON_MESSAGE_ERROR_SMALL'.
Issues
Security * adds test (via variable)

CALL METHOD end->add_text


EXPORTING
text
= ls_text
sap_emphasis = 'strong'.
* adds new line (start new line)
CALL METHOD end->new_line.
* display text(bold)
CALL METHOD end->add_text
EXPORTING
text
= 'Bold text'
sap_emphasis = 'strong'.

Error
handling
Custom
Apps
Discussi
on
Links
Advertis
e
Jobs
CV /
Resume
SAP
Books
SAP
Store

* adds new line (start new line)


CALL METHOD end->new_line.
* display text(normal)
CALL METHOD end->add_text
EXPORTING
text
= 'Normal text'.
* adds new line (start new line)
CALL METHOD end->new_line.
* display text(bold)
CALL METHOD end->add_text
EXPORTING
text
= 'Yellow triangle'
sap_emphasis = 'strong'.
* adds and icon (yellow triangle)
CALL METHOD end->add_icon
EXPORTING
sap_icon = 'ICON_LED_YELLOW'.
* display text(normal)
CALL METHOD end->add_text
EXPORTING
text
= 'More text'.
*set height of this section
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = l_grid.
CALL METHOD l_grid->parent->parent->(f)
EXPORTING
id
=3
height = 14.
ENDFORM. "end_of_list_html.

For more information refer program : DD_STYLE_TABLE

You might also like