2007 Jan 24 7:21 AM
hi,
i want to display a valuein footer, say for example v_sum is my data object and it contains value 345,
in footer of my alv i want to display it as
Total of primum: 345.for this i have coded like this......
this is first way:
wa_event-name = 'END_OF_LIST'.
wa_event-form = 'END_OF_LIST'.
APPEND wa_event to v_event.
CLEAR wa_event.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
is_layout = w_layout
it_fieldcat = it_field
it_sort = it_sort
it_events = v_event[]
TABLES
t_outtab = it_final.
FORM END_OF_LIST.
WRITE: 'TOTAL:', v_sum.
ENDFORM.second way:
WA_foOTER-TYP = 'S'.
CONCATENATE 'TOTAL : ' v_sum INTO WA_FOOTER-INFO.
APPEND WA_FOOTER TO IT_FOOTER.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_callback_html_end_of_list = 'END_OF_LIST'
is_layout = w_layout
it_fieldcat = it_field
it_sort = it_sort
it_events = v_event[]
TABLES
t_outtab = it_final.
FORM END_OF_LIST.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_FOOTER.
ENDFORM.but the problem is it is creating a footer but it is not displaying nothing can anybody suggest me where i am going wrong..please..................
Thanks and regards,
kamala
hi,
i want to display a valuein footer, say for example v_sum is my data object and it contains value 345,
in footer of my alv i want to display it as
Total of primum: 345.for this i have coded like this......
this is first way:
wa_event-name = 'END_OF_LIST'.
wa_event-form = 'END_OF_LIST'.
APPEND wa_event to v_event.
CLEAR wa_event.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
is_layout = w_layout
it_fieldcat = it_field
it_sort = it_sort
it_events = v_event[]
TABLES
t_outtab = it_final.
FORM END_OF_LIST.
WRITE: 'TOTAL:', v_sum.
ENDFORM.second way:
WA_foOTER-TYP = 'S'.
CONCATENATE 'TOTAL : ' v_sum INTO WA_FOOTER-INFO.
APPEND WA_FOOTER TO IT_FOOTER.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_callback_html_end_of_list = 'END_OF_LIST'
is_layout = w_layout
it_fieldcat = it_field
it_sort = it_sort
it_events = v_event[]
TABLES
t_outtab = it_final.
FORM END_OF_LIST.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_FOOTER.
ENDFORM.but the problem is it is creating a footer but it is not displaying nothing can anybody suggest me where i am going wrong..please..................
Thanks and regards,
kamala
2007 Jan 24 7:28 AM
2007 Jan 24 7:34 AM
refer this link,
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_endlist.htm
Full coding list
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_enhanced.htm
This will solve ur problem, reward points and close the thraed if ur problem got solved.
2007 Jan 24 7:35 AM
Try by giving line-count
REPORT test NO STANDARD PAGE HEADING
LINE-SIZE 240
LINE-COUNT 66(4).
2007 Jan 24 8:19 AM
HI,
data is not displaying in footer.. can any body help me....
i have folled this link also...
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_endlist.htm
this is my code.....
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
* i_callback_html_end_of_list = 'END_OF_LIST_HTML'
is_layout = w_layout
it_fieldcat = it_field
it_sort = it_sort
it_events = v_event[]
i_save = 'X'
TABLES
t_outtab = it_final
EXCEPTIONS
program_error = 1
OTHERS = 2.
FORM end_of_list_html USING end TYPE REF TO cl_dd_document..
DATA: ls_text TYPE sdydo_text_element,
l_grid TYPE REF TO cl_gui_alv_grid,
f(14) TYPE c VALUE 'SET_ROW_HEIGHT'.
ls_text = 'total'.
v_prim1 = v_prim.
CONCATENATE ls_text v_prim1 INTO ls_text.
* 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.
*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_htmlplease help me it is urgent....
2007 Jan 24 8:34 AM
Hi
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_callback_html_end_of_list = 'END_OF_LIST'
is_layout = w_layout
it_fieldcat = it_field
it_sort = it_sort
it_events = v_event[]
i_save = 'X'
TABLES
t_outtab = it_final
EXCEPTIONS
program_error = 1
OTHERS = 2.
FORM end_of_list USING end TYPE REF TO cl_dd_document..
DATA: ls_text TYPE sdydo_text_element,
l_grid TYPE REF TO cl_gui_alv_grid,
f(14) TYPE c VALUE 'SET_ROW_HEIGHT'.
WRITE: 'Total' to ls_text,
V_TOTAL CURRENCY <CURR> TO LS_TEXT+6..
* 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.
*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.Max
2007 Jan 24 9:57 AM
hi max,
it is not displaying max....pls. check this....
wa_event-name = slis_ev_end_of_list.
wa_event-form = 'END_OF_LIST'.
APPEND wa_event TO v_event.
CLEAR wa_event.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_callback_html_end_of_list = 'END_OF_LIST'
is_layout = gd_layout
it_fieldcat = it_field
it_sort = it_sort
it_events = v_event[]
i_save = 'X'
TABLES
t_outtab = it_final
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM. " ALV_DISPLAY
FORM end_of_list USING end TYPE REF TO cl_dd_document..
DATA: ls_text TYPE sdydo_text_element,
l_grid TYPE REF TO cl_gui_alv_grid,
f(14) TYPE c VALUE 'SET_ROW_HEIGHT'.
WRITE: 'Total' to ls_text,
V_prim TO LS_TEXT+6.
* 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.
*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.
2007 Jan 24 10:04 AM
Hi,
Y u have commented
* i_callback_html_end_of_list = 'END_OF_LIST_HTML'Uncomment this if you have commented.
After
CONCATENATE ls_text v_prim1 INTO ls_text.
* adds new line (start new line)
CALL METHOD end->new_line.
* 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.After doing the above chanegs if you are not getting the correct output, try adjusting the height in the footer.
2007 Jan 24 10:07 AM
no it is not comming.......if u can pls. tell me what to do...
2007 Jan 24 10:23 AM
second way:
WA_foOTER-TYP = 'S'.
CONCATENATE 'TOTAL : ' v_sum INTO WA_FOOTER-INFO.
APPEND WA_FOOTER TO IT_FOOTER.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
i_callback_html_end_of_list = 'END_OF_LIST'
is_layout = w_layout
it_fieldcat = it_field
it_sort = it_sort
it_events = v_event[]
TABLES
t_outtab = it_final.
FORM END_OF_LIST.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
IT_LIST_COMMENTARY = IT_FOOTER
<b> I_END_OF_LIST_GRID = 'X'</b>.
ENDFORM.
you have to define end of list here
regards
shiba dutta