ALV print total amout of pages 1/2 2/2...

Development (ABAP Development WorkBench, ABAP/4 programming)

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

Post Reply

ALV print total amout of pages 1/2 2/2...

Post by H.A » Mon Mar 24, 2003 11:55 am

Hi there
Anyone out there that knows how to print the total amount
of pages, that will be printed, on every page.

Page 1 / 10
Page 2 / 10 <--- 10 is the total amout of pages

I currently use the TOP-OF-PAGE to write information of SY-PAGNO on
each page. This is not enough to be ok for the government. The total amount of pages is needed for contracts and so on.

Best regards

Posts: 2012
Joined: Tue Oct 22, 2002 12:51 pm
Location: Basel, Switzerland

Post by kumar » Mon Mar 24, 2003 12:29 pm

A not so elegant solution will be to determine the No. of lines in your ITAB before calling the ALV FM and calculating How many pages it will run into and assigining that in your TOP-OF-PAGE.


H.A pages in ALV-grid printout...

Post by H.A » Tue Mar 25, 2003 1:51 am

Thankyou for your reply KRK.

I've thought about that way to deal with it, but It's not a good way, since it always depends on what kind of paper that is used during the printout A4 or A3 (yes, they do use different types in this case). :(

The SY-PAGNO get's its value just before printing, since its dependent on if I use a pre-page or not. And from the printout screen I'm also able to print "page X to Y". So in the background there should be some system parameter that contains the total amount of pages (dependent on the type of format that is selected during printout).

Another way around would be to use Sapscript instead, there I think there is a system-parameter for the total amount of pages.

But, again, the best way would be if I in a correct way could put a parameter with the total amount of pages, that I can rely on. :roll:

Best reg

Post Reply