cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic window on bottom of a smartform

Former Member
0 Kudos

Hello people,

I would like to create a "Comments" window on the bottom part of my first and single page.

The particularity of this window is that I want to use all the space left on the page.

How can I do it ?

Does someone had the same problem ?

Regards,

Aprigio

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hi Aprigio,

Another option to draw u2018a box after main window with all the space leftu2019 is, you can add an extra horizontal line at end of the main window (which will act as upper border line of u2018Commentsu2019 window).

Then create a comments window from bottom with height including main window (you can avoid the upper border of this window).

This way main window will overwrite the comments window and appears like separate footer window with all the space left.

Tyr this.

Regards,

Ashish

Former Member
0 Kudos

Hello Sandra,

You're right, I want to draw a box in the main or after the main but this box must fill all the space left.

Sandra_Rossi
Active Contributor
0 Kudos

the "simplest" solution I found is to use a loop on dummy itab (which contains initially one line), with a header template (left, top, right borders), a middle template (left and right borders) and a bottom-of-page template (left, bottom, right borders). All print a <32> text (blank).

The middle template is conditioned to output only on %PAGE1. If condition is true, it prints a <32> text as I said and appends a new line to the dummy itab.

%PAGE1 next page is %PAGE2.

When %PAGE2 is reached, the loop terminates (as it is based on an itab which is no more filled).

At this point, you have what you want in page 1 and a dummy page 2.

Either print the first page, or retrieve the OTF and delete the last page if you want to preview or generate a PDF.

Edited by: Sandra Rossi on Mar 19, 2010 11:00 PM

I forgot to say that I had to define templates with a very little height (0.1 MM) so that lines are well drawn (with a height of 1 CM or 1 MM I had a space at the bottom of the left and right borders)

Sandra_Rossi
Active Contributor
0 Kudos

Here is an addendum to my previous post which shows how it will look like, to make things clear.

First, global data (itab and wa can be of any type, they are just used to loop endless until &#37;PAGE2 is reached):


DATA wa TYPE tline.
DATA itab TYPE tline_tab.

Initialization (add one line so that the loop in Main window can start):


APPEND wa TO itab.

Nodes:


|__ &#37;PAGE1 (next = &#37;PAGE2)
|   |__ MAIN window
|       |__ whatever you want
|       |__ LOOP (at itab into wa) (event header at start of table and at page break) 
|           |         (event footer height 0.1 MM at page break)
|           |__ Header
|           |   |__ TEMPLATE1 (height: 0.1 MM) (borders: left, top, right)
|           |       |__ text <32>
|           |__ TEMPLATE2 (height: 0.1 MM) (borders: left, right) (condition: print only on page %PAGE1)
|           |   |__ text <32>
|           |   |__ code (APPEND wa TO itab)
|           |__ Footer
|           |   |__ TEMPLATE3 (height: 0.1 MM) (borders: left, bottom, right)
|           |       |__ text <32>
|__ &#37;PAGE2 (next = &#37;PAGE2)
    |__ MAIN window

Again, as I said, when spool/OTF has been generated, you have to get rid of the last excedentary page (which contains

Other remarks:

1) it looks nice on preview but I didn't print it

2) because of 0.1 MM template heights, it would generate 1000 loops for a box of 10 CM high, thus spool may be a little bit big

3) the solution works for the parameters above, but is very sensible to any change, and might not work correctly if you, for example, increase template height, or if you uncheck event header at page break, or for some other changes I am not aware of.

Sandra_Rossi
Active Contributor
0 Kudos

You mean you want to draw an empty box (with frame), starting after the MAIN window?