Application Development and Automation 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: 
Read only

ALV

rahul2000
Contributor
0 Likes
921

Dear all,

In all my reports I have been using I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'

Here in print preview i can see top of page

But In one of my reports i used

I_CALLBACK_HTML_TOP_OF_PAGE..

Here when print preview i am unable to see the top of page..

What is the problem?

Dear all,

In all my reports I have been using I_CALLBACK_TOP_OF_PAGE = 'TOP_OF_PAGE'

Here in print preview i can see top of page

But In one of my reports i used

I_CALLBACK_HTML_TOP_OF_PAGE..

Here when print preview i am unable to see the top of page..

What is the problem?

9 REPLIES 9
Read only

Former Member
0 Likes
904

Hi,

call function 'REUSE_ALV_GRID_DISPLAY'

exporting

  • I_INTERFACE_CHECK = ' '

  • I_BYPASSING_BUFFER = ' '

  • I_BUFFER_ACTIVE = ' '

i_callback_program = p_repid

  • I_CALLBACK_PF_STATUS_SET = ' '

  • I_CALLBACK_USER_COMMAND = ' '

i_callback_top_of_page = 'TOP_OF_PAGE'

  • I_CALLBACK_HTML_TOP_OF_PAGE = ' '

  • I_CALLBACK_HTML_END_OF_LIST = ' '

  • I_STRUCTURE_NAME =

----


  • Form TOP-OF-PAGE *

----


  • ALV Report Header *

----


form top_of_page.

  • Declare your top of page statements here

endform. "TOP_OF_PAGE

Regards,

V.Balaji

Read only

0 Likes
904

i have done like that only

Read only

Former Member
0 Likes
904

Hi,

Here is the solution --> http://www.saptechnical.com/Tutorials/ALV/TopofPage/Solution.htm

Regards

Sudheer

Read only

0 Likes
904

Dear Sudheer,

The problem is not with display...the problem is when i hit the standar PRINT PREVIEW BUTTTON

Read only

0 Likes
904

While viewing in Print Preview, Only I_CALLBACK_TOP_OF_PAGE form is called and I_CALLBACK_HTML_TOP_OF_PAGE is not called.

That's why you won't see the header information displayed thru form passed to I_CALLBACK_HTML_TOP_OF_PAGE parameter not getting displayed in Print Preview.

Hope this helps.

Thanks,

Balaji

Read only

0 Likes
904

Dear Balaji,

Exactly....what can be done in that case..

Read only

0 Likes
904

This could sound strange... but pass both I_CALLBACK_HTML_TOP_OF_PAGE and I_CALLBACK_TOP_OF_PAGE parameters. But it works.


Pass
i_callback_htnl_top_of_page = 'HTML_TOP_OF_PAGE'
i_callback_top_of_page = 'TOP_OF_PAGE'

form top_of_page. 

<<Populate the it_list_commentary with the required data 
same as what is populated in html_top_of_page routine>>
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
  EXPORTING
   it_list_commentary       = it_list_commentary[]
   i_logo                   = 'ENJOYSAP_LOGO'
*   i_end_of_list_grid       =
.
endform.


I think this will help you.

Thanks,

Balaji

Read only

Former Member
0 Likes
904

If function module REUSE_ALV_COMMENTARY_WRITE is not used in the form for I_CALLBACK_TOP_OF_PAGE, the form routine must be passed in parameter I_CALLBACK_HTML_TOP_OF_PAGE for the online mode. The form should then have the following format:

 form top_of_page using cl_dd type ref to cl_dd_document. 

In the form, you can, for example, use methods of class CL_DD_DOCUMENT to display text in HTML format.

Hope this helps.

Thanks,

Balaji

Read only

Former Member