on 05-22-2007 9:39 AM
hi,
how to calculate page by total in smart form.
If u want to write somthing like page x 0f y then u can write as &sfsy-page& of &sfsy-formpages&. At the end of the smartform when its about to print the SAP system updates the value of sfsy-formpages field and u get the proper output.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is no way to calculate the total number of pages in a smartform. There is a structure called as SFSY. This structure has two fields namely page and formpages.
Page by definition means the current page in the smartform and formpages by definition means the total number of pages to be printed in the smartform. But the problem occurs at runtime.
At runtime the value of the sfsy-page and sfsy-formpages is the same and is equal to the current page number of the smartform. Its only at the end when the SAP system is about to print the smartform that the values of the above two fields are updated.
So there is no way to know the number of pages in the smartform. At the max what u can do is check for the page where the main window printing gets over and u can get the number of pages from this value.
Reward if useful.
Cheers,
Sharadendu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I hope you want to dispaly total number of pages in samrt form.
In this case you can use systen fields as follows:
&SFSY-FORMPAGES& Displays the total number of pages for the currently processed form. This allows you to include texts such as
Page x of y into your output.
&SFSY-JOBPAGES& Contains the total page number of all forms in the currently processed print request.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.