2005 Sep 21 6:46 PM
hi folks,
To display the page numbers in the form like
Page: 1 of 5 in this format, I used &sfsy-page(4Z)& OF &sfsy-formpages(4Z)&
It is displaying correct values for pages less than 10 like 'Page : 1 of 9' but when it reaches two digit numbers
it says Page: 1 of * Where is the error coming here?
There is enough space in the text window in the form too.
Why is it happening?
Thanks in advance.
Vinu
I don't remember having seen before that someone had to specify the lenght of the field in order to have the page functionality work correct. But maybe you have to.
Regards,
Rich HEilman
2005 Sep 21 6:48 PM
Sorry I used
I used &sfsy-page(Z)& OF &sfsy-formpages(Z)& what is the difference out here?
should I be using '4Z' value there and only then it works?
Vinu
2005 Sep 21 6:51 PM
2005 Sep 21 6:53 PM
2005 Sep 21 7:01 PM
Do you mean to say that I do not need to use '4Z'? without using that I had an issue and then it was working but now it is not. I want to understand the logic behind that as to why it occurs like that ?
Vinu
2005 Sep 21 9:00 PM
Hi,
The smartforms are designed to give the total pages only if the total number of pages is a single character eg:7. But if it exceeds 1 character,eg. 13, it just displays *. For this you need to declare explicitly the number of characters for total number of pages.
eg: &SFSY-FORMPAGES(3ZC)& or &SAPSCRIPT-FORMPAGES(3ZC)&
So in your program you need to declare the way given above.
Hope this helps you.
Vamsi
2005 Sep 21 9:37 PM
what difference it makes if we declare it as
&SFSY-FORMPAGES(4Z)& or &Sfsy-FORMPAGES(4Z)&
Can anyone explain If this is not right, should we declare it as
&SFSY-FORMPAGES(3ZC)& or &Sfsy-FORMPAGES(3ZC)&
what '3ZC' means?
Thanks
Vinu
2005 Sep 21 9:45 PM
4Z --> 2 digit output
3ZC --> 3 digit output
Good luck,
Suresh Datti
2005 Sep 21 10:38 PM
when I give '3ZC' it is not displaying the number of pages
it shows
Page 1 of blank why is it taking that way?
2005 Sep 21 7:00 PM
This is a bug in SMARTFORM.
Define a Global Variable FPAGE TYPE CHAR4.
In the window where you print the page info , make it a "FINAL WINDOW".
Add an ABAP code before your TEXT node
( FPAGE SHOULD BE IN OUTBOUND PARAMMETERS ON ABAP NODE)
WRITE SFSY-FORMPAGES TO FPAGE LEFT-JUSTIFIED .
In the text you may use
&sfsy-page(4Z)& OF &FPAGE4Z)&
You amy also CHECK OSS 588352.
Cheers.
2005 Sep 22 2:12 AM
what difference it makes if we declare it as
&SFSY-FORMPAGES(4Z)& or &Sfsy-FORMPAGES(4Z)&
No Difference
Can anyone explain If this is not right, should we declare it as
&SFSY-FORMPAGES(3ZC)& or &Sfsy-FORMPAGES(3ZC)&
It is right way to declare but will not work if you are on WAS610 or above . Read the OSS I mentioned in the thread earlier.
what '3ZC' means?
3 - No Of Places reserved for Printing the Variable
Z - Omit the leading zeros for numeric field
( SYSY-FORMPAGES in INT4 field . Check in SE11
fro SFSY )
C - Omit the leading spaces for character fields i.e. a
left justified output.
If you dont get the total page number follow the procedure mentioned earlier and also read the OSS.
Cheers.
2005 Sep 22 3:23 PM
Thanks Sanjay for your explanation. It really helped I have not tried that yet, I shall go ahead and use that piece of code, and will award the points to you.
Vinu.
2005 Sep 22 4:45 PM
2013 Feb 20 1:42 AM
I was able to use this thread in solving the same issue. Setting the window type to "FINAL" got it working properly. Thanks!
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |