Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Printing header isse with html_top_of_page

Former Member
0 Kudos

Hi,

I have written a code which gives a formatted top of page text, hence i have used html_top_of_page in alv grid display.

The problem is arising when i am giving the print out, the header text is not printing.

Kindly help.

Cordially,

Hasan

8 REPLIES 8

Former Member
0 Kudos

You need to handle the print event separately.

For an example if you are using classes to display ALV Grid then can define the event as below...

  • Handle events

SET HANDLER w_event_receiver->handle_print_top_of_page FOR w_grid.

0 Kudos

Hi Ali,

Thanks for your reply, however i am using 'REUSE_ALV_GRID_DISPLAY' and I need a formatted header in top_of_page, which includes 4 to 5 columns where some text is cernter lined and some is right aligned. Please provide an appropriate solution.

Cordially,

Hasan

0 Kudos

Hi Hasan,

Check these links:

Regards,

Swarna Munukoti

0 Kudos

Hi Swarna,

Thank you very much for your reply,I have written a code which gives a formatted top of page text, hence i have used html_top_of_page in alv grid display, i cannot achieve it through top-of-page.

0 Kudos

Hi Hasan,

It is not possible to print the header when you use html_top_of_page. May be you can follow the other alternatives as suggested in the below link:

Regards,

Swarna Munukoti.

0 Kudos

Hi Swarna,

Thank you for your reply. Do you have any idea of the FM - 'REUSE_ALV_GRID_COMMENTARY_SET'. Can you provide me any good example or explain the use of this FM.

Cordially,

Hasan

0 Kudos

Hi Hasan,

May be this link is useful for you:

Also for more details you can use sdn search with this function module name.

Regards,

Swarna Munukoti

0 Kudos

hi,

You can use the following: This part of code shows how the display the current date at to of page.

data : li_header type slis_t_listheader,

wa_header type slis_listheader,

lv_line like wa_header-info.

concatenate sy-datum6(2) sy-datum4(2) sy-datum(4)

into lv_line separated by '.'.

  • Data to be displayed

wa_header-typ = 'S'.

wa_header-key = 'Current Date:'.

wa_header-info = lv_line.

append wa_header to li_header.

call function 'REUSE_ALV_COMMENTARY_WRITE'

exporting

it_list_commentary = li_header.

Hope this helps you.

Regards,

Pramod