cancel
Showing results for 
Search instead for 
Did you mean: 

Printing total at the end of main window in Smartform

Former Member
0 Kudos

Hi Guys,

               I have a requirement to print Total at the end of the main window in smartform.

I am printing it in the footer of a table.

But when few lines output, the Total is displayed immediately after the items not at the very end of the main window.

Main window height is 13 CM, I tried output conditions for the footer row, like at the end of the main window, before end of the window, page break but nothing bring the output I wanted.

Thanks

Sam

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello,

  If you want to display total at the end of main window but with some distance then create a template for Total and put your logic there. You can choose option in Condition tab to call only at the end of Main window.

Regards,

Deepti

Former Member
0 Kudos

Hi Deepti,

                It won't work because it has to be displayed only on the last page.

Cheers

Sam

Former Member
0 Kudos

I am not sure..i think it should work. I did this way only.

Dont use footer of table. Create a template just after main window and choose select checkbox 'AT the end of Main window' .

I guess you need to calculate total number of pages and put that in condition tab to restrict total to be printed on last page.

Regards,

Deepti

Former Member
0 Kudos

Counting total no. of pages is a good idea.

Can you tell me how it can be done.

Thanks

Sam

Former Member
0 Kudos

SFSY-PAGE is used for page numbering of current page and

SFSY-FORMPAGES shows the total number of pages in a SAP Smartform document.

Check if this will help you to resolve your issue.

Regards,

Deepti

Former Member
0 Kudos

This won't work because in the code the counters both move up at run time so page is always equal to formpages, check it in debug.

I have just had the same issue where I had to print a text in a box outside of Main only on the last page, before terms and conditions and there were several pages of T&Cs.

I was able to use the footer of the table in main which was called at End of table, it is important to check you dont have at Page Break checked.  Here I created some program lines to set a flag I could then check with my own condition against the text.  Not that elegant but it is working...

I could not use only after end of main check box (which does work) because the multi page terms and conditions had to be printed after and the only way I could get the large standard text to flow over the pages was by extending main over the last page.  That means of course Main does not end when I need it to...

Former Member
0 Kudos

Hi Sam,

Better to take one secondary window for footer information.

please see the below screen.

here check the ONLY AFTER END OF MAIN WINDOW.

Regards,

Venkat.

former_member209818
Active Contributor
0 Kudos

Hi,

I think there is one more option.. Only on Last page.. try that checkbox.