Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

template and table

Former Member
0 Likes
1,186

hi,

could any body update me what is the main difference between table and template in smartforms.

Regards,

Koti Reddy

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,108

Hi Koti Reddy,

The main difference between a table and a template is tha you cannot have a text flow in template.

For e.g. if you have to show 5 items of a Sales Order in the samrtform and only two fit on a page.

Then if you use a template the data will truncate and you will not be able to show the next 3 itmes on the next page.

But if you use a table then the data flow will continue and the next 3 items will get displayed in the next page.

Also the other difference is that you cannot have a LOOP node in a template. (The internal table cannot be looped in a template). Whatever has to be displayed in a template has to be predefined (with its posiotion fixed: no. of line and no. of colmn )

Whereas an internal table can be looped inside a Table Node

It automatically increments the line no. based on the number of records in the table.

Regards,

harshada

7 REPLIES 7
Read only

Former Member
0 Likes
1,108

hi,

Check page 8 of this PDF.

http://help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF

and

Template Displays texts for table cells of a static table

Table Display table contents

and also

when you define a table, in fact you define row type.

After that, you use a row type with data.

when you define a template, you have the whole struture in statitc.

Example: you have items, but for some item, you would like to print text. The row type will be different, you don't know the size (number of line) of your text. So you can only use the table.

Regards,

Shiva

Read only

Former Member
0 Likes
1,108

Hi,

In simple terms, in table rows can be increased dynaically depending on the no. of records, whereas in template if we define in the layout the template to have three rows. it displays only three rows irrespective of the no. of rows or records passed into that template.

Hope this is helpful to you. If you need further information, revert back.

Reward all the helpful answers.

Regards

Nagaraj T

Read only

Former Member
0 Likes
1,108

Hi ,

Table is like internal table, where as the template is fixed window with spcified no of rows and cloumns.

Please rewards if useful

Thanks,

Aditya

Read only

Former Member
0 Likes
1,108

Hi,

Template: Displays texts for table cells of a static table

Table Display table contents

chk this link for more detailed info.:

http://www.sap-press.com/downloads/h955_preview.pdf

Template :

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

Table :

1. No of cols are fixed, u can have 'n' no of rows.

2. it has header & footer concept

Regards

Kiran Sure

Read only

Former Member
0 Likes
1,109

Hi Koti Reddy,

The main difference between a table and a template is tha you cannot have a text flow in template.

For e.g. if you have to show 5 items of a Sales Order in the samrtform and only two fit on a page.

Then if you use a template the data will truncate and you will not be able to show the next 3 itmes on the next page.

But if you use a table then the data flow will continue and the next 3 items will get displayed in the next page.

Also the other difference is that you cannot have a LOOP node in a template. (The internal table cannot be looped in a template). Whatever has to be displayed in a template has to be predefined (with its posiotion fixed: no. of line and no. of colmn )

Whereas an internal table can be looped inside a Table Node

It automatically increments the line no. based on the number of records in the table.

Regards,

harshada

Read only

Former Member
0 Likes
1,108

Hi kotireddy nanda...

if u want to assign a table table statically you can use Template

if u want to assign a table dynamically you can use

table option.

Hope this solve your problem.

Please rewards points if found helpful.

Thanks and regards.

Rajeshwar.

Read only

Former Member
0 Likes
1,108

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