‎2006 Dec 13 5:42 AM
hi
in my script i want to print page no/total no of pages how to print in scripts
‎2006 Dec 13 5:51 AM
‎2006 Dec 13 5:46 AM
In your case where you want to increment the value of the total number of pages always use &SAPSCRIPT-JOBPAGES& and for the individual page &PAGE&.
Since you have to increment the value of the total number of pages, pass the value to a variable increment the variable and then display that variable.
: PERFORM CHECK_PAGE IN PROGRAM Z_SCRIPT
: USING &SAPSCRIPT-JOBPAGES&
: CHANGING &WS_PAGE&
: ENDPERFORM
FORM check_page TABLES p_page STRUCTURE itcsy
p_page1 STRUCTURE itcsy.
READ TABLE p_page INDEX 1.
IF sy-subrc = 0 .
p_page1-value = p_page-value + 1.
MODIFY p_page1 INDEX sy-tabix.
ENDIF.
ENDFORM. "check_page
Now your total number of pages would have been increased by 1 and display this variable in the script. But one point is dont declare the variable WS_PAGE in the driver program. If you declare the value will be reset. It will work believe me it works.
Regards,
Shanmuga
‎2006 Dec 13 5:46 AM
Use &PAGE& for current page number
&SAPSCRIPT-FORMPAGES& for total no of pages
Regards
Wenceslaus
‎2009 Aug 19 10:41 AM
‎2009 Sep 01 1:21 PM
Hi,
I have a SAP script in which i need to display the currect page number and copy number of the form. How can this be done ...
eg. Copy 1 of 4 ,copy 2 of 4 like that.
The total no. of copies will come from NAST table , but i don't know where the currect number will come from .. plzz help..
thanks in advance ,
Anil.
‎2006 Dec 13 5:47 AM
Hi,
you can go to text editor - menu-insert-symbol-system symbol
select these two symbols and write like this
<b>&page& /&formpages&</b>
Regards,
pankaj singh
reward if helpful
‎2006 Dec 13 5:48 AM
Hi ,
You can use the follwing command
&PAGE& / &SAPSCRIPT-FORMPAGES&
Regards
Arun
‎2006 Dec 13 5:48 AM
Hello,
To print the Pageno:
Command:&PAGE&
TO print total no of pages:
Command:&SAPSCRIPT-FORMPAGES&
So in script u can write like this
&PAGE& /&SAPSCRIPT-FORMPAGES&
Check and let me know if u face any problem.
Regards
‎2006 Dec 13 5:49 AM
‎2006 Dec 13 5:51 AM
‎2006 Dec 13 5:52 AM
hi,
to find the total number of pages check the value of variable NAST-ANZAL.
‎2006 Dec 13 6:07 AM
L PAGE:&PAGE& / &SAPSCRIPT-FORMPAGES(C)&here L is ur paragraph format .
maintain this in ur page window .
regards,
vijay