cancel
Showing results for 
Search instead for 
Did you mean: 

SFSY-FORMPAGES and SFSY-PAGE values in program lines of SMARTFORMS.

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi Friends,

It works fine using Final Window.

Thanks to all specially LOKESWARA.

raymond_giuseppi
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Hi,

in the conditions tab, check the condition before end of main window.

regards,

Sakshi

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi,

How many pages you have created in your smartform? If it is more than one, does the content of table in main window spreads over til the last page?

Thanks

Nitesh