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: 

SAP Script Last Page Printing

Former Member
0 Kudos

Hi All,

I have a SAP Script which is having two pages FIRST and NEXT. There is a window on the FIRST Page by name SIGN but it is not present in NEXT page.

Now the problem is if the layout exceeds more than one page then the signature is getting printed only on the first page which should not be the case it should get printed on the last page.

Could someone tell me how to get this printed on the last page of the layout.

Thanks & Regards,

YJR

1 ACCEPTED SOLUTION

former_member182371
Active Contributor
0 Kudos

Hi Joseph,

1.- the window SIGN must be declared in both pages FIRST and NEXT

2.- within window SIGN do:

/: IF &NEXTPAGE& = 0

HERE GOES YOUR CODE

/: ENDIF

Note that the key here is &NEXTPAGE& = 0

Best regards

3 REPLIES 3

former_member182371
Active Contributor
0 Kudos

Hi Joseph,

1.- the window SIGN must be declared in both pages FIRST and NEXT

2.- within window SIGN do:

/: IF &NEXTPAGE& = 0

HERE GOES YOUR CODE

/: ENDIF

Note that the key here is &NEXTPAGE& = 0

Best regards

Former Member
0 Kudos

Please check whether window SIGN is difined on both pages means First and Last.

IF you want to print SIGN on last page.

Include a condition as based on page no of Next page

&NEXTPAGE&

Value of this symbol to out put next page.

Please note that the value of this field symbol is 0 in each window other than main.

So you have to set a IF condition in SIGN window.

Hope this will help

Former Member
0 Kudos

hi

In scripts only main windows have the functionality of printing in the next page if a page exceeds.

the other windows doesnt have the functionality.

in order to do that u can as well declare that window on the next page and put some logic as to know if the entire signature(check if the last line is printed on that page) is not printed then increment the page by 1. you can know the page number by using the symbol &page&.

Regards.

Lavanya