05-04-2011 6:54 AM
Hi ,
Could any one please let me know how i can print footer text at the bottom of the alv Grid.
i am not using alv classes. i am using REUSE_ALV_GRID_DISPLAY funtion module.
i've tried passing values to it_events parameter aswell.
Regards,
chinna
05-04-2011 7:16 AM
Hi Chinna,
You can use the event 'End-of-Page' in the parameter 'It_events' in the function module 'REUSE_ALV_GRID_DISPLAY'.
But it will only execute when print is taken. So take a printout and check whether End of page is working or not.
As another option you can try the event 'End-of-coverpage' in the parameter 'It_events' in the function module 'REUSE_ALV_GRID_DISPLAY'.
Thankyou,
Jerry
05-04-2011 7:28 AM
What is the event you're using to achieve this?
An ALV Grid is displayed in a screen container & there is no "page-break" in the custom container. Hence END-OF-PAGE cannot be used.
You should rather use I_CALLBACK_HTML_END_OF_LIST to display the footer in online mode, but bear in mind you cannot print it.
You can try the END-OF-LIST event if you want to print the footer.
BR,
Suhas
05-04-2011 8:01 AM
Hi Jery,
I've passed table it_events to the parameter.
IT_EVENTS = IT_EVENTMAIN
my code is ...
FORM lt_events4 .
CLEAR wa_eventmain.
wa_eventmain-name = slis_ev_end_of_coverpage.
wa_eventmain-form = 'END_OF_COVERPAGE'.
APPEND wa_eventmain TO it_eventmain
CLEAR wa_eventmain.
ENDFORM.
FORM END_OF_COVERPAGE.
WRITE:/ ' Stock Value in Thousands'.
ENDFORM.
...
But still not working....
.
.
.
suhas,
I've tried END_OF_LIST already. its not working...
to the parameter I_CALLBACK_HTML_END_OF_LIST i have passed 'IT_EVENT'
And i've written following code....
FORM it_event.
WRITE:/ ' Stock Value in Thousands'.
ENDFORM.
its giving a short dump now.
Regards,
Chinna
Edited by: Chinna guntur on May 4, 2011 12:32 PM
05-04-2011 8:28 AM
Hi.,
if u write using write statement it wont display as it is in container not a list display., try this.,
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_html_end_of_list = 'END_OF_LIST_HTML'
is_layout = gs_layout
it_fieldcat = fieldcatalog[]
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
Form Footer.
FORM end_of_list_html USING end TYPE REF TO cl_dd_document.
CALL METHOD end->add_text
EXPORTING
text = 'Number in Thousands:'.
ENDFORM.
hope this helps u.,
Thanks & Regards
Kiran
05-04-2011 9:59 AM
Hi Kiran,
Good one. i can display the text as footer now.
BUT....
its not displaying right afer the last row of the grid. the text is being shown in a seperate block at footer.
will it be possible to display the text right after the last rwow of the GRID and rigth corner of the GRID.
Thank you.
Regards,
Chinna
05-04-2011 11:34 AM
Hi,.
End-of Page means it will come at bottom only.. but u can set height for footer., try this.,
Form Footer.
FORM end_of_list_html USING end TYPE REF TO cl_dd_document.
DATA: l_grid TYPE REF TO cl_gui_alv_grid,
f(14) TYPE c VALUE 'SET_ROW_HEIGHT'.
CALL METHOD end->add_text
EXPORTING
text = 'Number in Thousands:'.
Set height for footer
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = l_grid.
CALL METHOD l_grid->parent->parent->(f)
EXPORTING
id = 3
height = 14. " u can increase or decrease height.
ENDFORM.
So., end of page will display at bottom only.. If U want after the last row of grid append it to ur internal table..
like .,
loop at itab into wa.
populate to final internal table itab_fin.
endloop.
ls_tab-f1 = 'Number of thousands:'.
append ls_tab-f1 to itab_fin.
now send itab_fin to ALV.
hope this helps u.,
Thanks & regards
Kiran
05-04-2011 12:26 PM
Hi Kiran,
Thank you for your support.
I dont want to print the text at END-OF-PAGE
I want it to be printed right after the last row of an internal table i.e. last line of the GRID.
it should be like : amout in words row (ex for Rs.10510. The amount in words is : rupees ten thousand fivehundred and ten only)
the code above you've given is not working..
Regards,
Chinna
Edited by: Chinna guntur on May 4, 2011 4:57 PM
05-04-2011 3:11 PM
05-05-2011 5:28 AM
Hi.,
As I said End Of Page Display footer at bottom only.. U can append that text to ur internal table . but since it is little bit long text u can see that in one column.,
As an alternative.,, u go to module pool programming., create a screen and create a custom container and at the bottom of custom container create text and use cl_gui_alv_grid->set_table_for_first_display() to display ALV and at the bottom set that text.
hope this helps u.,
Thanks & Regards
Kiran
05-06-2011 7:56 AM
Hi Kiran,
If i Use classes, i can able to Crete screen and i can be able to display at the bottom without any prob...
here i am not using any clasess and screens...
Rob,
though i've passed value to parameter I_END_OF_LIST_GRID in REUSE_ALV_COMMENTARY_WRITE... its still not working...
as i didnot find any solution....
I've convinced the team. by....... passing value to the parameter i_grid_title in REUSE_ALV_GRID_DISPLAY...
Now the titile of the grid is "Stock Valu in Thousands"
Thank you all for your support....
Regards,
Chinna...