on 06-06-2007 8:29 PM
Thanks for a wonderful forum. I have used the seach feature extensively while learning SAPScript.
My question deals with the &PAGE& of &SAPSCRIPT-FORMPAGE&
I have a 2 last pagex with the PO number & date, the "page of pages" and the T&C verbiage.
These pages are printed by placing
call function 'START_FORM' " Start a new page
exporting
startpage = 'LAST'. " Direct access to page Last
call function 'WRITE_FORM'
exporting
window = 'TERMS'. " Final page (T&C)
call function 'END_FORM'
call function 'START_FORM' " Start a new page
exporting
startpage = 'LAST2'. " Direct access to page Last2
call function 'WRITE_FORM'
exporting
window = 'TERMS2'. " Final page (T&C)
call function 'END_FORM'. " End of printing page LAST2
before the call function 'CLOSE_FORM' in my print program
The challenge I am facing is that the &Page& &sapscript-formpages& are reset when I call START_FORM.
If I have a PO that is 4 pages (including the T&C), I need the pages to read
1 of 4
2 of 4
3 of 4
4 of 4
When using the above method, I get
1 of 2
2 of 2
1 of 1
1 of 1
By using &SAPSCRIPT-JOBPAGES&, I can get
1 of 4
2 of 4
1 of 4
1 of 4
How do I manipulate the data to get the proper page count for the final 2 pages of teh PO??
Thanks much!
Hi,
In order to sort out your issue you may follow the following procedure:-
1) Define all terms & conditions via SO10 with say text name= 'ZPO_TERMS_AND_CONDITIONS', test id = 'ST' & language = 'EN'
2) In the same form define a new element say FOOTER in the main window
3) IF you want to start terms & conditions starting from new page, then in element FOOTER first statement should be /: NEW-PAGE
Second line should be
/: INCLUDE ZPO_TERMS_AND_CONDITIONS OBJECT TEXT ID ST LANGUAGE EN
Just before close_form write this element (FOOTER) by using write_form.
Now since your terms & conditions are part of the same form you won't have any problem using &PAGE& / &SAPSCRIPT-JOBPAGES&
I hope this helps
Regards
Raju Chitale
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am also facing the same problem. If any one can help me pls mail to ferryanand@yahoo.com
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We found a solution.
In ZMEDRUCK, create a new page (LAST) with windows defined (we had trmpg & terms).
In TRMPG:
/: DEFINE &TERM_PAGE1& := &SAPSCRIPT-JOBPAGES&
/: PERFORM GET_TERMS_PAGE IN PROGRAM
/: ZP2P_FM06PE03_PO_ADDITIONAL
/: USING &TERM_PAGE1&
/: CHANGING &TERM_PAGE1&
/: ENDPERFORM
then display >&TERM_PAGE1 and >&SAPSCRIPT-JOBPAGES&
In SE80 we created the program ZP2P_FM06PE03_PO_ADDITIONAL that contains various subroutines we needed for ZMEDRUCK.
form get_terms_page tables
in_tab structure itcsy
out_tab structure itcsy.
loop at in_tab.
if sy-tabix = 1.
l_last_page = in_tab-value.
endif.
endloop.
l_page1 = l_last_page + 1.
loop at out_tab.
if sy-tabix = 1.
out_tab-value = l_page1.
shift out_tab-value left deleting leading '0'.
modify out_tab index 1 transporting value.
endif.
endloop.
endform.
So, can I award myself points???
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.