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: 

Header display in ALV to appear only on one page in spool

Former Member
0 Kudos

Hi,

I have used ALV to display my report output. Now, when I run the report in background and check the spool , the header that I am printing using gt_list_top_of_page[] , repeats on all the pages.

How can I stop this in ALV? I just want the header to appear once in the spool.

Thanks & Regards

4 REPLIES 4

Former Member
0 Kudos

Please go through the document in the below link...

http://www.erpgenie.com/sapgenie/docs/Using%20ALV.pdf

you will get all the relevant information.

Former Member
0 Kudos

In ur top of page routine u a static variable to control it.

Pl. see this code block:

FORM top_of_page.

    • Local variable declaration*

STATICS: l_comm TYPE i. " Store user command

l_comm = l_comm + 1.

  • Check for print or print preview

IF ( sy-ucomm = c_prin OR

sy-ucomm = c_rnt_prev OR

sy-ucomm = c_rnt ).

IF l_comm = 1.

  • Write top of page info

ENDIF. " l_comm <> sy-ucomm

else. " << This is for normal display

  • Write top of page info

ENDIF.

ENDFORM. " top_of_page

0 Kudos

thanks!!

it worked !!

Just need one more thing - user does not want the column names also to appear on each page. Basically he just wants column names to appear only once on starting of the list display in the spool.

Is it feasible to handle this in ALV?

Thanks & Regards

Former Member
0 Kudos

Did any body got the answer for this.