on 09-06-2007 7:28 AM
Hi All,
In my PO form, I have two pages of terms&conditions at the end. I need to print TOTAL on the PO before these T&C pages, but after all PO lines are printed. If I can find the total number of pages at the runtime, I can print TOTAL on a page which is two less than the total number of pages. But SAPCRIPT-FORMPAGES stores only the current page number at runtime, not the total number of pages.
Is there any way to identify the total number of pages in a form while runtime?
Or is there any way to identify whether the last PO line in a PO has been printed or not during runtime? We are using Z-copy of PO form but print program is standard (SAPLMEDRUCK)
Thanking you in anticipation.
Mark
Hi!
Unfortunately there's no way to get the total pages number in SAPScript, and even in Smartforms it is NOT possible.
Maybe you can use the &PAGE& and the &NEXTPAGE& variables in your SAPScript, and using them, you can tell, is there a next page or not...
OR you can define exactly f.e. 5 pages (FIRST, SECOND, THIRD, FOURTH, FIFTH). YOu can set the next page to SECOND in your FIRST and so on... And with this way, you can tell the all pages: there will be always 5 pages.
Regards
Tamá
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tamas,
Thanks for your response.
Depending on the number of line items, my PO pages will vary. Lets say for example, PO have 12 items and span to 3 pages in the form. In addition to these three pages, there will be 2 pages of Terms & conditions also getting printed. So total form pages will come 5.
Now, during runtime at anypage i need to know whether the form is going to end after two pages(last 2 pages are T&C) or not. If at any page i can find that after two pages the form is going to end, I can print the total in the current page.
Is that idea a weired?
Mark,
I dunno if there is a better way,
But here is what we once did.
Since it is a script. W ran the script the first time suppressing the actual print(using a parameter in OPEN_FORM), counted the number of pages
that would print. Stored this number of pages in a variable.
The second time we ran it(enabling print)using the count variable to print the total number of pages on each page.
This is not the best way i know. But it is fool proof.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.