cancel
Showing results for 
Search instead for 
Did you mean: 

SAPscript - Number of pages

Former Member
0 Kudos

Hello,

I have a small Problem. I need the number of page in a window on the first site. SAPSCRIPT-FORMPAGES isn't helpful because its not fully filled until the end of the document. Is there a possibilty to get the total number of pages? Depending on number of pages is a window filled with special code.

THX for your answers.

Sven

Accepted Solutions (1)

Accepted Solutions (1)

former_member196280
Active Contributor
0 Kudos

It is not possible to capture the value of number of pages in the first page itself.

But if you have driver program in your control, try to read number of lines in the internal table that is passed to the main window.

For example your each main window is holding 16 line items and your internal table is having 25 line items.

page = 25 / 16. "1.56

page = CEIL ( page ). "2 pages

I hope this will helpyou.

Reward points if useful.

Regards,

SaiRam

Former Member
0 Kudos

Hello Sai Ram,

thanks for your answer. I will take a similar solution. I calculate the pages in subject to positions in the invoice.

kind regard,

Sven

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

1) &SAPSCRIPT-FORMPAGES& using the total number of pages

2) To add a graphical window and place it at you want the logo

<b>Reward points</b>

Regards

Former Member
0 Kudos

&SAPSCRIPT-FORMPAGES& isn't helpful.

Debugging:

Page First - Window Barcode

SAPSCRIPT-FORMPAGES = 0.

Page Next - Window Barcode

SAPSCRIPT-FORMPAGES = 2. -> the correct Value - this value i need in page first, but there is the value 0

Former Member
0 Kudos

Hi

I think you can't capture the total number of pages of script in the first page itself.

As you said the varaible SAPSCRIPT-FORMPAGES is not filled by that time.

The avialble variables for page numbers are

&PAGE&

&NEXTPAGE&

&SAPSCRIPT-FORMPAGES&

&SAPSCRIPT-JOBPAGES&

You have to use them

<b>Reward points for useful Answers</b>

Regards

Anji

Former Member
0 Kudos

It is possible

Just use command

p1 &SAPSCRIPT-JOBPAGES& -> make sure that window should be for only first page.

I have tested sucessfully

Thanks

Seshu