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

SAPScript Issue

Former Member
0 Likes
690

Hii

I need to print sum of all line items in a SAPScript at the last page of the script. I am able to get that figure in SAPSCRIPT structure in the layout . But when i compare this with PAGE attribute to check the last page .its not working.

How could this functionality be achieved ?

Thanks & Regards

Ajitabh

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
645

Hi Ajitabh

use &NEXTPAGE& = 0. this ensures its the last page of the script.

Thanks

Kapil

5 REPLIES 5
Read only

Former Member
0 Likes
645

H many pages are u having in ur script.And where exactly u want to print the sum.

Regards

Read only

0 Likes
645

Hii Ravi

I want to print the sum at the last page of the script. Right now i have put a condition as

&PAGE& = &SAPSCRIPT-FORMPAGES& in the script window to check the last page of script and if the condition is true then print the Sum .But this is not working.

Hope you got my question Now?

Ajitabh

Read only

0 Likes
645

To my understanding

U can do one thing if u are printing the sum in the main window itself, then keep text element for sum.Then in print program use at last event and put the write_form in this particular event.

For more details, let me know.

Regards

Read only

Former Member
0 Likes
645

Hi,

After the main window processing comepleted, then create a element and call that element if you want to change the Driver program, if you do not want to change the Driver program, After the minwindow, just write like

/: IF &PAGE& = &SAPSCRIP-FORMPAGES&

Write your lines over here

/: ENDIF.

Make sure you don't use any dots with your IF / ENDIF-statements

Regards

Sudheer

Read only

Former Member
0 Likes
646

Hi Ajitabh

use &NEXTPAGE& = 0. this ensures its the last page of the script.

Thanks

Kapil