cancel
Showing results for 
Search instead for 
Did you mean: 

Need help in printing text in footer

Former Member
0 Kudos

Hi Friends,

I need help from all you guys. I am working on SmartForms, and need help. Please look into the below situation, and appreciate if you can help me out.

The Literal “**DATA CONTINUED ON NEXT PAGE**” is to be displayed at the bottom of the

page in the Footer only if the data rolls onto second page.

Thanks,

Nikhil

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi

In your table footer

you will find a output options there keep the check box for only at

end of table.

Thanks,

Phani.

Former Member
0 Kudos

But the issue is that in the main window, we may not know how many lines it will print. Sometimes it may print 10 lines, and sometimes 12....and if the data does not roll onto the second page, text should not be printed on the current page. It comes dynamically. Can we use SFSY-FORMPAGES, and SFSY-PAGE system variables and approach this logic. If yes, how can we do that. Can you please help me out please.

Thanks,

Nikhil

Edited by: NIkhil Reddy on May 12, 2008 11:26 PM

valter_oliveira
Active Contributor
0 Kudos

Hello again.

Yes, you can.

Try this.

Create a text node in the footer section of the table, and create a condition like SFSY-PAGE = 1. This will avoid to print that text in second, or third ... pages ... (solves a piece of the problem, let's say, part one).

Now, if the form will only have 1 page, you don't want the text to appear (problem part two). So, in the footer section attributes, you have a printing time section with two options:

- in page break

- after main window

You should only mark in page break (unmarking after main window will solve problem part two.

Best regards.

Valter Oliveira.

Former Member
0 Kudos

Hi,

define the two variables in the global definition as

g_cnt type sy-tabix.

g_flg type c .

->in the initialization tab pass the internal table that is the main window.

g_cnt = lines( the table name which you are using in the main

window before the footer).

Now you have the total no of lines in the g_cnt.

in the loop which is in main window create the program line pass the output parameter as g_flg.

in the condions tab give the condition as g_cnt = sy-tabix.

in the source code of that program lines

g_flg = 'X'.

now for the footer where you are displaing the text coutinued on next page for in codition tab give the condition as g_flg = space.

Thanks,

NN.

valter_oliveira
Active Contributor
0 Kudos

Hello.

In your MAIN window, you are writing lines from a table?

Inside a table, you have a footer block. In that block, you can validate if you are in the first page when that block is reached, using sfsy-page and choose if the text should appear or not.

Also in the print time view, unmark at end of table.

Best regards.

Valter Oliveira.