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

Triggering NEW-PAGE in the SAPSCRIPT

Former Member
0 Likes
500

Hi All,

In the SAPSCRIPT for purchase order, in the last page i need to print terms and conditions. For this i have created third page(in MEDRCUK there are two pages) and i am trying to check the following condition.

IF &sapscript-formpages& = &page&

NEW-PAGE THIRD

ENDIF.

But the condition never becoming true. Can somebody tell me how to achieve this.

Thanks in advance

Hi All,

In the SAPSCRIPT for purchase order, in the last page i need to print terms and conditions. For this i have created third page(in MEDRCUK there are two pages) and i am trying to check the following condition.

IF &sapscript-formpages& = &page&

NEW-PAGE THIRD

ENDIF.

But the condition never becoming true. Can somebody tell me how to achieve this.

Thanks in advance

3 REPLIES 3
Read only

manuel_bassani
Contributor
0 Likes
470

Hi,

try:

IF &PAGE& EQ &SAPSCRIPT-FORMPAGES&

regards, Manuel

Read only

Former Member
0 Likes
470

Hi

Your control can't work, becuase the &PAGE& is the current page and &sapscript-formpages& is total number of page, but the system can know this data after loading completly your sapscript.

If you want to know when you are at the last page, check the variable &NEXTPAGE& (for the number of next page), it'll be 0 if you are in the last page.

IF &NEXTPAGE& = '0'

NEW-PAGE THIRD

ENDIF.

Max

Message was edited by: max bianchi

Read only

0 Likes
470

> Hi

>

> Your control can't work, becuase the &PAGE& is the

> current page and &sapscript-formpages& is total

> number of page, but the system can know this data

> after loading completly your sapscript.

>

> If you want to know when you are at the last page,

> check the variable &NEXTPAGE& (for the number of next

> page), it'll be 0 if you are in the last page.

>

> IF &NEXTPAGE& = '0'

> NEW-PAGE THIRD

> ENDIF.

>

> Max

>

>

> Message was edited by: max bianchi

Hi Max,

Thanx for your ur reply. I have tried with IF &NEXTPAGE& = '0' also, now also it is not working. In debug mode i checked the value of &NEXTPAGE&, only when the control leaves main window that time its value becoming ZERO. Actually in the last element of the main window the condition is written.

Regards

Rajavardhana Reddy