2008 May 20 7:19 AM
hi experts
what is the difference between template and internal table in smart form?
2008 May 20 7:31 AM
Template :
Template is static
1. No of rows & coloumns are fixed.
2. u can directly mention, which data has to be fill in which row & coloumn.
3. Templates are used, where u r having static no of data.
( ex : Name, rollno, age, sex)
4. No header & footer
template:
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.
· Create Template under the INFO window node. Create > Template.
The template layout is used to determine the following,
1. The number of lines and cells
2. The height of each cell
3. The width of each cell
4. The alignment of the table in the window
5. Whether and where to display separator lines or frames
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: (TLE_CONTACT)
The template node defines the table layout. The successor nodes of the template determine the data to be
displayed in the table cells.
In General Attributes choose Text type Text Element. In editor, type DTE Contact.
In Output Options, define the output structure LINE 5 and Column 1.
Similarly all other information for each cell can be filed using the text module and address module.
chk this link for more detailed info.:
http://www.sap-press.com/downloads/h955_preview.pdf
https://forums.sdn.sap.com/click.jspa?searchID=11959116&messageID=5113357
Regards,
If helpful reward with points(Don't forget).
2008 May 20 7:23 AM
template is a fixed content ie you will create only once.
table is variable content even at runtime it can be changed.
2008 May 20 7:26 AM
Hi,
Template is a static content so that itz layout cannot be changed dynamically.Eg.Tax forms etc..
Table is a dynamic content whose layout doesn't have fixed size ie.dynamic..eg..internal table contents..
TABLES=>
In forms of business procedures you usually want to list details such as open items of an invoice. You can use a Smart Form to display this data in a table. You can design the layout of the table independent of the number of lines it will contain. The size of the table depends on how much data the application program passes to the form at runtime (unlike with templates, where you specify the number of columns and lines explicitly). The table can cover one or more pages, depending on the number of lines. This is why you display tables in the main window.
TEMPLATES=>
Use node type Template to display a table whose layout and size (number of lines and columns) is determined before the runtime of the application program. For this reason, a template is also called a static table.
To create a template, define a table layout to determine the cell structure for each line. The cells are used to display the contents of the inferior nodes of the template node. This allows you to position text and a graphic side by side (see Displaying Graphics in Templates).
The template node is also suited for label printing.
GO THROUGH THIS LINK
http://help.sap.com/saphelp_nw04/helpdata/en/4b/83fb4edf8f11d3969700a0c930660b/content.htm
Regards,
Raj.
2008 May 20 7:26 AM
Hi,
Template gives a format, how the data will be diaplayed. It doesnt contain data, whereas , an internal table contains data.
In case of Internal table, you can set header, data and footer, which is not in case of template.
2008 May 20 7:31 AM
Template :
Template is static
1. No of rows & coloumns are fixed.
2. u can directly mention, which data has to be fill in which row & coloumn.
3. Templates are used, where u r having static no of data.
( ex : Name, rollno, age, sex)
4. No header & footer
template:
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.
· Create Template under the INFO window node. Create > Template.
The template layout is used to determine the following,
1. The number of lines and cells
2. The height of each cell
3. The width of each cell
4. The alignment of the table in the window
5. Whether and where to display separator lines or frames
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: (TLE_CONTACT)
The template node defines the table layout. The successor nodes of the template determine the data to be
displayed in the table cells.
In General Attributes choose Text type Text Element. In editor, type DTE Contact.
In Output Options, define the output structure LINE 5 and Column 1.
Similarly all other information for each cell can be filed using the text module and address module.
chk this link for more detailed info.:
http://www.sap-press.com/downloads/h955_preview.pdf
https://forums.sdn.sap.com/click.jspa?searchID=11959116&messageID=5113357
Regards,
If helpful reward with points(Don't forget).
2008 May 20 7:41 AM
hi,
A template as the name suggests allows to print data in a particular format. It contains placeholders for printing the data. The data is ultimately printed using Text nodes. The main features of a Template are:
Tabular layout for printing data (tabs in SAP Script)
Static - number of rows & columns are known before runtime and are fixed.
The structure of the row of the template is defined using a Line type. The height of a line and number of columns that will occur in the line are defined using the Line type. The rows that will use the specified structure of line is also specified. The width of the line type (sum of width of all cells in line type) should be the same as the total width of the template.
The Line Type can be built graphically using the Table Painter. The pattern of the grid to be drawn around the template (if required) can also be selected.
Data retrieval program sends the data through the internal table in the form interface
To display, internal table data is to be processed in a loop
Following Node Types offer Data tab which can be used to read internal table lines in a loop
The following nodes can be used to print recurring data (data stored in an internal table):
Loop u2013 Allows to loop through internal table and retrieve data of every loop pass into work area. The printing however needs to be done manually. No print formatting options are provided.
Table u2013 Allows to loop through internal table and print the data in a tabular format. The concept of Line type is used for the formatting of the print.
Complex section u2013 This node can be set to work like a Table, Template, Loop or to print in an unstructured manner.
pls reward if helpful.