Hi,
I want to print the text "Contd...." on all pages except the last page of a document using SMARTFORMS. I am using the condition SFSY-FORMPAGES <> SFSY-PAGE. But the text "Contd...." is printing on every page.
I checked the values of SFSY-FORMPAGES and SFSY-PAGE in program lines and found that on every page the values of SFSY-FORMPAGES and SFSY-PAGE is the same. Eg: while printing page 1 SFSY-FORMPAGES = 1 and SFSY-PAGE = 1 and while printing page 2 SFSY-FORMPAGES = 2 and SFSY-PAGE = 2.
Kindly assist.
Thanks.
I want to print the text "Contd...." on all pages except the last page of a document using SMARTFORMS. I am using the condition SFSY-FORMPAGES SFSY-PAGE. But the text "Contd...." is printing on every page.
I checked the values of SFSY-FORMPAGES and SFSY-PAGE in program lines and found that on every page the values of SFSY-FORMPAGES and SFSY-PAGE is the same. Eg: while printing page 1 SFSY-FORMPAGES = 1 and SFSY-PAGE = 1 and while printing page 2 SFSY-FORMPAGES = 2 and SFSY-PAGE = 2.
Hi Kumar ,
Do lke this
in the bottom of the page create one window of type copy window (not secondary window)
in that window create one text element with text "contd.... "
For that text element put the condition as SFSY-FORMPAGES # SFSY-PAGE
If u create copy window SFSY-FORMPAGES value will be 3 if the output pages 3 (in the copy window only u will get the correct value of the SFSY-FORMPAGES )
Hope u will resolve u r issue .
Let me know if u have any concerns.......
Regards,
Lokesh.
Hello,
You can check the number of entries that are being printed in the main table using describe table.
Pass this value into a varible say lv_temp.
You can pass this value from driver program to the smartfrom using Form interface.
In the conditions for the page display text (sfsy-formpages) add another condition
lv_page NE lv_temp.
Regards,
Radhakrishnan
The field SFSY-FORMPAGES only reach correct value at the end of the form, then Smartforms update the already generated print data with this value ([Note 359009 - Postprocessing and query of the total number of pages|https://service.sap.com/sap/support/notes/359009]) so this field is not advisable to use in code node.
Try to check the box "only before end of main window" in the condition tab, or define your window as a "late processing window"
Regards,
Raymond
Add a comment