|
|
This website is not affiliated with, sponsored by, or approved by SAP AG.
Getting total number of pages in the script dynamicallyModerators: thx4allthefish, Snowy, Gothmog, YuriT
6 posts
• Page 1 of 1
Getting total number of pages in the script dynamicallyI have a script consisting of (for example) 5 pages. After printing the layout, each page is folded to get two pages (ie 5 * 2 = 10) total of ten pages . In the footer of each page I have to write " Page 1 of 10, 2 of 10 -----). If I take &SAPSCRIPT-FORMPAGES& or &SAPSCRIPT-JOBPAGES& , I will get answer as 5. But ineffect it has 10 pages.
If you know please share
You can just create a variable and do the calculation and display that variable i.e
TPAG = PAGS * VAR. Where PAGS = &SAPSCRIPT-FORMPAGES& and VAR = the Variable in Your case = 2. In the script you can display as &PAGE& OF &TPAG& KRK
Thank you for ur reply. Could I ask some doubts
1. Is multiplication directly permitted in Sap Script? 2. if we debugg the Script and see the value of &SAPSCRIPT-FORMPAGES& we could see that it is dynamically incrementing, and when last page is reached, the &SAPSCRIPT-FORMPAGES& symbol is replaced by its value. We can't get the total no of pages initially, for doing multiplication If you know please share
I can just think of this.
If you can predetermine the No. of Pages, Eg. If there are 50 Lines in your internal table and you are printing 7 lines in a main window, then it can be predicted that you are going to print a Total of 8 Pages. I can think of only the above, But we will just wait for more inputs. KRK
6 posts
• Page 1 of 1
Return to SAPscript/Smartforms Who is onlineUsers browsing this forum: No registered users and 4 guests |
|