In an SAPscript, some "END OF PAGE" text should be printed on the last page below the footer and it is not. How can I proceed?
In SAPscript, there are a few ways to print text only on the last page. The logical approach depends on whether you are using the MAIN window or a secondary window to print the text. If you are printing this text in the MAIN window, then simply put the words in a text element which prints last. If your footer is outside/below the MAIN window, then you'll want to use a secondary window-based approach.
If using a secondary window, one possibility is comparing the value in SAPscript symbol PAGE with SAPSCRIPT-FORMPAGES. When they are equal, have the text print; otherwise, have nothing print. However, these variables are not exactly the same. To make them 'apples-to-apples', insert a control command in your SAPscript form similar to a formatting command, for example:
/: IF &PAGE(3ZC)& = &SAPSCRIPT-FORMPAGES(3ZC)& * [your END OF PAGE text here] /: ENDIF
Another option is to simply check if &NEXTPAGE& ='0'. This should achieve the same results.
In a Smart Form, you can use a similar MAIN window approach. For a secondary window, you might wish to use a conditional event such as 'Only After End of Main Window' instead.
Dig Deeper on SAPscript and Smart Forms
Related Q&A from Mark Smithson
An SAP user is working with an SAPscript form to create the form development for an Invoice List, and wants to know if it's possible to migrate the ... Continue Reading
An SAP user is looking to fix an error with a packing slip print-out in an SAP Smart Form. Continue Reading
An SAP user is trying to align a barcode in the center of a defined window on an SAP Smart Form. Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.