In an SAPscript, some "END OF PAGE" text should be printed on the last page below the footer and it is not. How...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
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
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.