‎2006 Mar 17 10:27 PM
Our customized PO SapScript form was a copy of SAP standard form MEDRUCK.
The page sequence is First -> Next, Next -> Next.
The sequences of next->next is necessary because of the possibility of multiple pages per PO.
I tried to add a new page and want to print this new page at the end of "Next" loop. It seemed to me that SapScript won't recognize my new page and the new page won't print.
How can I tell "Next" page to go to my new page at the end of its looping?
Your advise is appreciated!
‎2006 Mar 17 10:45 PM
Hi,
if you declare a MAIN window in pages FIRST and NEXT when the line items printed overflow page FIRST it will automatically continue in page NEXT.
Best regards.
‎2006 Mar 17 10:45 PM
Hi,
if you declare a MAIN window in pages FIRST and NEXT when the line items printed overflow page FIRST it will automatically continue in page NEXT.
Best regards.
‎2006 Mar 17 11:00 PM
Hi,
just make sure that when you declare page <u>FIRST</u> in tab "<b>Standard Attributes</b>" you have the following values:
page = INIT
next page = NEXT
and for page <u>NEXT</u>:
page = NEXT
next page = NEXT
Regards.
‎2006 Mar 17 11:25 PM
Hi,
if you want to force a page-break you have to declare the following FM in the right place of your print program:
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
COMMAND = 'NEW-PAGE'
EXCEPTIONS
UNOPENED = 1
UNSTARTED = 2
OTHERS = 3.
Regards.
‎2006 Mar 17 11:41 PM
Hi ,
Use FM START_FORM & END_FORM to trigger that page after the next page.
‎2006 Mar 20 7:13 PM
Big thanks to everyone for answering my question!
I may not make myself clear, so let me reframe my question and condition:
I would like to define a new page in our customized PO form and print this new page after a looping page whose name is Next. It seemed to me that the SapScript form will not print the new page after a looping page without changing the print program which is a standard SAP program.
Is there any way to print the new page after a looping page without changing the print program? Is that possible to add a new page to a SapScript form which is a copy of MEDRUCK, which has First page and Next page, and print this new page after page Next? Can I achieve this from just modifying SapScript form but no change the print program?
Besr regards,
Fisher Li
‎2006 Mar 20 7:18 PM
I feel it is not possible without making any changes in print program. If you need to just add this code to print last page, better to copy in a Z program. Make the settings in Customizing and add the change.
‎2006 Mar 20 7:20 PM
Hi Fisher,
In the layout page 'NEXT'.You can put a condition
/: IF &PAGE& EQ &SAPSCRIPT-FORMPAGES(C)&
/: NEW-PAGE LAST
/: ENDIF.
LAST is your last page to be printed after NEXT page.
‎2006 Mar 20 7:22 PM
create a page NPAGE and then make the settings,ie,
for page NEXT : next page - > NPAGE.
for page NPAGE: next page - > NPAGE.
Hope it helps,
Regards,
Bikash
‎2006 Mar 21 2:41 PM
Hi Fisher
If you want to print another page after NEXT page, you have to use NEW-PAGE statament.
You have only two way to do that:
- In program (but you don't want to change it)
- In Sapscript
In the last way you can only insert the NEW-PAGE statament in the MAIN windows of the NEXT PAGE.
So you should insert that statament in the last text element you have to print.
Infact NEW-PAGE command should be the last command you have to do in the NEXT-PAGE.
This can be a problem for you because if all text elements of MAIN are printed several times.
Anyway insert in the main
NEW-PAGE <PAGE>.
Where <PAGE> is the name of the new page you've created.
You can try to check the system symbol &NEXTPAGE& to know when it's on last page
Max
‎2006 Mar 21 2:09 PM
Hi Fisher,
the only solution i see for your problem is to copy your print program to a Z and then within this Z add the necessary code to print an additional page.
someone in the former posts has indicated the use of variable LASTPAGE which is very useful in this case.
Best Regards.
‎2006 Mar 21 4:06 PM
Thanks again for everyone's help on this topic!
I made a quick trial on the ideas from Phani Kiran Nudurupati and Max Bianchi. Even it didn't work but I really like the recommendation and will try it later with some twist. Thanks again!