‎2007 May 07 2:33 PM
In smartforms I need to design a table with fixed no of rows to be output. Is there a way to do this. The data in the rows will be variable though. Should I use a template ?
‎2007 May 07 2:39 PM
Hi,
In Smart Forms, although templates still have a fixed number of rows, the number of rows in a Smart Form table can be dynamic.In both Smart Form templates and tables, you can determine how many cells a line of a table output should have using the Table Painter's row types
The Template contains a fixed number of rows and columns, where the output is fixed.
The Table can have variable number of rows
Regards
Sudheer
‎2007 May 07 2:55 PM
In my main I need to create a table of exactly 15 rows and this will display the invoice information. If the invoice has less than 15 items then the remaining rows will be left blank else if the invoice has more than 15 items then the next page should have 15 rows and the rest of the items should be displayed on the next page
‎2007 May 07 3:06 PM
Hi,
Check the following link:
http://www.sap-img.com/smartforms/display-a-contents-of-a-table-on-smartform-with-loop.htm
Regards,
Bhaskar
‎2007 May 07 3:43 PM
I dont think using a template will work. I need to use a table but merely display 15 rows fixed. Is there a way to do that ?
‎2007 May 07 3:59 PM
Hi Megan,
Template in smartforms is having fixes no of rows.The data in that template are also of fixed lenth. for ur requirement use table.
U create a internal table of 15 records and pass that table into ur
smartform
e.g. data : begin of itab occurs 0,
.........
end of itab.
Reward points if helpful.
Regards,
Hemant
‎2007 May 07 4:04 PM
In my Data tab in Table Node I say Loop Internal Table mytable into itab Row 1 to 999999
Should I change this to Row 1 to 15 ?
I dont think this would change anything
‎2007 May 07 4:10 PM
You can try adjusting the height of your Main Window so that only 15 rows will fit. Then if there are more than 15 rows in your table, it will print the remaining rows on page 2 (assuming you have the Next Page of your First Page set up correctly).
‎2007 May 07 4:12 PM
The problem I have is I want to print 15 rows even if there isnt enough line items
If my invoice has 5 line items, 15 rows should be printed with 5 populated
If my invoice has 20 line items, 15 rows should be printed on first page all populated and the rest 5 should be printed on the next page
‎2007 May 07 4:17 PM
If you adjust the height of your Main Window to fit 15 rows then when you loop through your data if there are only 5 line items, only 5 will be displayed.
If there are 20 line items only 15 will be displayed because the Main Window is only big enough to support 15 lines. The other 5 will be displayed on page 2.
You could also use a Program Lines node to count the number of lines that are output. When this count reaches 15, clear it and set a flag.
In a Command Node go to page 2 if the flag is set.
Message was edited by:
Matt Nagel
‎2007 May 07 4:54 PM
My page is set to landscape and I set the height of the main window to 18.00 cm, it still does not print blank rows. Basically I need to be able to display blank rows using table . thanks
‎2007 May 07 4:58 PM
I'm not sure I understand. How can you print something that is blank?
Is the problem that you need borders around blank cells?
‎2007 May 07 5:01 PM
‎2007 May 07 5:10 PM
I think you are going to need to add some logic in a Program Lines node.
Something like this:
DESCRIBE TABLE i_itab LINES v_lines.
v_mod = v_lines MOD 15.
DO v_mod TIMES.
APPEND wa_itab TO i_itab.
ENDDO.
you can use "APPEND INITIAL LINE TO i_itab" also.
Message was edited by:
Matt Nagel