on 02-13-2008 5:49 AM
Hi All,
can u tell me diff. between Template and table in smartforms.
Table exteds dynamically.
Template is fixed in size.
template is Output of a table containing static data
these are the Possible direct successors-All except window, page, table,
and template nodes
Table - Output of a table containing application
data and these are the Possible direct successors-as with template node
Template is used for proper allignment of data which table is used for displaying multiple data.
We can say Template is for static data and Table is for dynamic data.
Suppose we have a requirement in which we have to allign the customer address in such a way as shown below:-
Name- Krishna Company- WIPRO Location- Chennai
Desig- S/W Native - Mumbai
Then for proper allighnment we can create a template and split that into 3 columns and 2 rows and create text elements for each cell display a proper allighned data at the output.
When we include a template inside a loop it gives the same property as a table.
When we have mutiple data which is to be extended to the next page like when we display all employee details in a company we use table.
Table has 3 sections , HEADER, ITEM ,FOOTER
The header secntion will be executed once and it will loop at the item level. at the end footer will be executed.
SmartForms Useful links
http://www.sapgenie.com/abap/smartforms.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://help.sap.com/saphelp_46c/helpdata/en/a5/de6838abce021ae10000009b38f842/frameset.htm
http://help.sap.com/printdocu/core/Print46c/en/Data/htm/english.htm
http://www.sap-img.com/smartforms/smart-001.htm
http://www.sap-img.com/smartforms/smartform-tutorial.htm
http://www.sap-img.com/smartforms/smart-002.htm
http://www.sapgenie.com/abap/smartforms.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
Reward if useful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
template is for static data. whereas table is for variable data or dynamic data.
If the data is constant then we use templates. the size of the template is constant in what ever page we display. if the data in a table is not fitted in a main window of a page it can be splitted in to next page.
regards,
kamala.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The difference between tables and templates is tables contain application data where as templates contains static data.
Tables will expand to the pages according to the data. Templates are mainly used for headings.
Thanks
Sarada
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi srinu,
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.
table:
to Displaying Dynamic Table (ITEM_TABLE)
· Create TABLE under the MAIN window node. In DATA Tab, loop through the data internal table.
L_XEKPO is the item table which has all the line item details.
Define the line types based on the positioning of the text in main window. For example: TABLE_HEADER1
is used for positioning Header texts in the table.
· Table is divided into three parts: Header, Main Area and Footer.
· Header is used for printing the Header Title of the table and it at the start of the table on every page.
· Main Area is used to print the line item details of the PO. Create a line (ITEM_DETAIL) of the line type
TABLE_HEADER1. It will dynamically generate number cells based on the line type defined in the table layout.
Name all the cells as per the usage. For each cell create the text node to display the information. For example:
Cell VAL_MATERIAL, Text node MATNR is created which has text element - -matnr.
· Footer is used for printing the information after Main Area data is printed. This can be used for Total
printing or any other information which needs to be printed after all line items are printed. Create line
TLE_CONTR_STP for Contractual Stipulation of the line type LINE which has only one column. Create the
text element to print the information.
hope this can help u. 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.
Hi
templates are static and tables are dynamic.
table can conain any no. of rows in that but in template you can store only as per ur structure of template
Ex. 3 column and 4 row
When we know the what are the data to be stored and how many in that case we go for template.
Ex. let we know that at a time only one employee information is required to store then we go for template OTHERWISE go for TABLE.
Reward if it make sense to yoy.
Thanks
Krushna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
Template is constant and table is fliexible in the smartforms.
that means if u define template in the smartforms then the lenth and width of the output is same always, at the same time if u define table in the smartforms then lenth and width of the window is vary from one input to other input(table we can maintain for the main window in the smartforms because we may have 10 records one time and 100 records another time in the output).
reward points if useful.
seshu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.