cancel
Showing results for 
Search instead for 
Did you mean: 

Smartforms: How to save sfsy-formpages in a local variable?

Former Member
0 Kudos

Hi,

that seems stupid, but I'm not able to save the system value of the formpages (sfsy-formpages) in a local variable. If you print it out like Page &sfsy-page& of &sfsy-formpages& the value will be correct! If I try something like max_pages = sfsy-formpages only the current page number will be saved.

How can I do that? All hints and tips in the forum regarding Sapscript...

Thanks in advance,

Christian

Accepted Solutions (0)

Answers (2)

Answers (2)

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Use this

&SFSY-PAGE& of &SFSY-FORMPAGES<b>(3Z)</b>&

This will solve the problem.No need of local variable.

Kindly reward points if it helps.

Message was edited by:

Jayanthi Jayaraman

Former Member
0 Kudos

Hi.

In the window where you have this logic you could try to set the window type as "Final Window" because then the variable SFSY-FORMPAGES has been filled.

BR

Niklas

Former Member
0 Kudos

Hi,

I have to print a complex table with different footer lines, where some of them should only be printed on the last page. So a "Final window" does not help.

So, I see only one option:

Calculate the amount of lines to print and care myself for page breaks... This is a bad solution, because I can't handle unexpected page breaks and my layout will only work in "good" cases.

Shame on Smartforms for missing that simple functionality!

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Did you tried

&SFSY-PAGE& of &SFSY-FORMPAGES<i><b>(3Z)&</b></i>?

Former Member
0 Kudos

Hi Jayanthi,

you didn't get my question. I am not interested in printing out the formpages. I need to save it in a variable....

Former Member
0 Kudos

Perhaps you could extract the "footers" from the complex table and have them in a window at the bottom of the screen, and then have the window as "final window".

Because the only way you will be able to get the true value of sfsy-formpages is in a final window...

Good luck with your problem.

BR

Niklas