on 05-09-2007 5:40 AM
Hi,
Their are only 2 windows on my Smartform - MAIN Window and FOOTER Window.
I have a requirement where I need to display the FOOTER window only on the last page after the MAIN Window. But all other pages except the last page should not contain the FOOTER Window.
Now the size of the the MAIN Window should be like it should cover full page on all pages except the Last page. And on Last Page the size of the MAIN Window should be reduced so that it also accommodate the FOOTER Window on Last Page.
I do not know how to reduce the size of the Main Window dynamically only on Last page.
I have tried to use the logic of firing the new Page using the COMMAND node but the problems I have faced here is:
1.) I am not able to determine which is second Last page as the Last Page is determined by SAP only after it writes all the data in the form. In fact SAP itself does not know which is the last page until it writes all the data. So at runtime I am unable to determine the second last page.
2.) Smartform fires the New page as soon as it encounters the COMMAND node. But my requirement is that the New PAge should only be fired after the Processing of the second last page finishes.
If someone has done this earlier, Please tell me how to achieve this.
Regards,
Nitin
I had a similar issue and this is how I solved it. Within the Main Window create a folder say 'Footer_data'. Select the tab 'Events' - In this section select 'Footer with height' and also 'At end of table'. Also set the 'Minimum Height' to be the total of all your footer windows. I had 5 Footer Windows - Amount Totals / Delivery Address / Inco Terms / Payment Terms and Signatories. The total height that they took up was 6cm. This is the figure I put in the Minimum Height. This means that if there is not enough room in the Main Window to print 6cm of data it will page break. Within this 'Conditions' tab of this folder you need to set the 'Only before End of Main Window'.
For the Footer Windows you have created you need to set the 'Only After end of Main Window' option within 'Conditions' tab.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Graham,
Thanks for your response.
I even tried the solution you have sugested. But here it will only give the Page protection. Means if the Footer data will not come into the current page after the contents of the Main Window. Then the FOOTER data will come at the top of the next page. Whereas my requirement is it should come at the BOTTOM of next page.
My requirement is that it should always come at the BOTTOM of the last page. By the method suggested by you it is not coming at BOTTOM of page. It can appear anywhere on a page and the only guareentee is the whole FOOTER will come on 1 single page.
Could you please suggest how it can come only at the BOTTOM.
Regards,
Nitin
Hi Nitin.
You don't put the text into the new folder within the Main Window. All this does is check that you have enough space to print the footer. The existing Footer Windows should intiate the output for the footer. This solution allows you to set the Main Window to overlap all the Footer Windows you have created, so not wasting space on the page.
By the way this requires you to create Windows for your Footer data and not have it in the Footer section of the Main Window.
Cheers
Graham
Message was edited by:
Graham Day
Hi Graham,
The solution given by you works absolutely fine, but if the main window data just has two items and prints on the first page only it still creates a second page with the footer windows.
This is because i have increased the height of the main window to the maximum size of the page. Can u plz tell me how the main window can be dynamically set in order to print the footer details itself on the first page if the line items are less.
Please advise.
Thanks,
Rasika
HI all,
Im facing the same problem.
Here I have 2 windows after main window which will accomadate 2 templates for subtotals(which must
print at the end of main window only).
and 3 footer windows which should print on end of each page
I have tried out the solution given but nothing is working out and window are overlapping.
Please suggest me the solution for this.
Thanks,
Sridhar.
Hi ,
Need urgent help,
There are 2 pages in my smartform.
The first page of the smartform I controlled by using Graham's post, in which a footer wal always to be printed at the bottom of the page and always at the end of the item details only.
But within my first page, I am also triggering the 2nd page on some conditions.
Problem is , when the 2nd page is triggered, the footer on the first page is not printing at all. Please help urgently.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I too had a similar problem.
The solution by Graham really helped me.
Thanks a ton, Graham.
Cheers,
Priya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Graham,
The solution given by you works absolutely fine, but if the main window data just has two items and prints on the first page only it still creates a second page with the footer windows.
This is because i have increased the height of the main window to the maximum size of the page. Can u plz tell me how the main window can be dynamically set in order to print the footer details itself on the first page if the line items are less.
Please advise.
Thanks,
Rasika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Graham,
I am facing the same problem as nitin.
But unfortunately I dont find the at end of table option in the footer folder in my version.
I only find at end of paragraph.
Because of this I only find an empty window in the place where the footer window had to be displayed.
Please help me out.......
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Design new window and same thing like Main window which has Width and height.
Now use condition..like
IF &SFSY-PAGE& = &SFSY-FORMPAGES&
Print your footer window details.
endif.
Reward Points if it is useful
Thanks
Seshu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nitin,
Good scenario.
The solution you can try is this way . Design another PAGE named as LAST page .
For this LAST page the MAIN window height and upper margin you set it as required for the last page .o.k. then also accordingly you set the footer window height and the upper margin.
so till now designing of the LAST page is over.
then insert the COMMAND in the page NEXT .Check the GO TO check box and select the page as LAST page .put the condition as SFSY-PAGE = SFSY-FORMPAGES. Also check the additional event 'Only after the Main window'.
I think this would solve your problem.
Reward if this solves your requirement.
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try to overlap the footer window with the main window. I think this will help and for calling the footer window use the event only after the main window.
reward if helpful..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
use at end even abap program.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi nitin,
In the condition tab of the window. use additional events <u>Only After End of Main Window</u>. it will work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.