cancel
Showing results for 
Search instead for 
Did you mean: 

Smartforms

Former Member
0 Kudos

hi all,

what is the difference between Template and Table.

please give me a clear picture on both of those two.

thanks

Satish

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos

hi satish,

Use node type template to display a table whose layout and size is determined before the runtime of the print program.

To create a template define a table layout to determine the cell structure for each line. The cells are used to display the cell structure for each line. The cells are used to display the contents of the successor nodes of the template node. This allows one to position text and a graphic side by side.

The template node is also used for label printing. To use a template one must do the following:

Ø Define the table layout

Ø Display the contents in the table cells

Define the table layout:

The table layout is used to determine the following,

Ø The number of lines and cells

Ø The height of each cell

Ø The width of each cell

Ø The alignment of the table in the window

Ø Whether and where to display separator lines or frames

Create a template node and maintain the attributes width, horizontal alignment and vertical alignment.

Use the table control on the template tab to define the layout of the lines. Each line of the template must have a definition.

Use the pattern box to select the desired table pattern.

Displaying contents in cells:

The template node defines the table layout. The successor nodes of the template determine the data to be displayed in the table cells.

regard,

keerthi

Former Member
0 Kudos

Hi Satish,

Actually Tables and Templates are used to display the data in the tabular form.

If the data to be inserted into this tabular form is fixed ,i.e. known, it is better to go for the Templates

But in case, the data changes dynamically, i.e. while the data is not fixed, it is better to go for the Tables bcoz, while updating the data in tables the rows are created automatically, so the tables is best for dynamically changing data.

Hope this will help you.

Reward well all the heplful answers

Regards

Former Member
0 Kudos

hi

In SAP SmartForms, templates (from template node) define the format of the columnar output but they are just structures which can used to set how the columns in the output are placed. Whereas as tables actually contain rows to hold data. The Template contains a fixed number of rows and columns, where the output is fixed. The Table can have variable number of rows

The application data is selected in the application program and transferred to the form using the form interface. In contrast to the template node, the table node has another tab called the Data tab. On this tab, you enter the internal table whose data is to be output. The data is read to a work area in row format.

The table layout is determined using row types (this is same for templates).

A header area (for table headers), main area (for items of the table), and footer area (for whole sums, or similar) are table output areas. Table rows are created as subnodes of these areas.

SAP provides a special node for addresses called ADDRESS node, this has nothing to do with templates.

For example I have included here picture of LB_BIL_INVOICE smartform which prints invoices. In the main window you can see there are templates as well as one table nodes. The templates are used to print fixed legal texts like terms of payment which will always not exceed more than a fixed number of rows of output. On the other hand invoice items have to use table node so as to print variable number of rows.

Image from LB_BIL_INVOICE smartform

-charitha

Former Member
0 Kudos

hi

good

The Template contains a fixed number of rows and columns, where the output is fixed.

The Table can have variable number of rows

thanks

mrutyun^

Former Member
0 Kudos

hello,

i want to add some more here to ravi,

in the template when u want to insert a text element -->u need to specify the column number and row number for text elment -->output options, and if the text is more then the width of the cell then that will be truncated. while in the table it will automatically increase the hieght.

in the table u will be having 3 parts HEADER and MAIN AREA and FOOTER...

HEADER and FOOTER will trigger only only once for thatable along with this these will be triggered at new page(HEADER) and endof page(FOOTER).. the MAINAREA is the actual loop of tyhe table.

Former Member
0 Kudos

Hi!

They can be used for the same.

Tables has more options, because tables have not only lines, but header and footer parts.

Regards

Tamá

former_member181962
Active Contributor
0 Kudos

In very simple words, a TEMPLATE has fixed number of rows and columns.

A Table has fixed number of columns, but the number of rows is not limited.

Regards,

Ravi