cancel
Showing results for 
Search instead for 
Did you mean: 

Doubt regarding templates/tables in Smart Forms

Former Member
0 Kudos

Hi all ,

I'am into Technical (ABAP) as well as functional module - Plant & Maintenance(PM). Now, in our company, Plant level isn't digitalised, so the company has planned to implement SAP ,by entering plant data/reading intp SAP using PM module. Our consultant wants us to develop reports and printouts of those readings (of PM) to be generated in ABAP. For that, he has advised us to use "Templates" in smartforms (rather than "Tables"). Now suggest me a method so that I get to use Tables instead of Templates. If i use Templates, it has a tedious method of using loop and flow logic to fetch the data from the PM module, where as the "tables" method has a simple method of using the table name and field name which needs to be written in the Program.

Can i create a table of those readings which i made in the PM Module so that i use the same instead of using templates? If so, then how do i proceed ?

Points will be rewarded for best answers

Accepted Solutions (1)

Accepted Solutions (1)

naimesh_patel
Active Contributor
0 Kudos

You can use both Templates and Tables in a more efficient way.

Use Tables to print your data.

Use Templates to draw borders, lines, boxes .... etc.

E.g. If you use Tables and in your line types you have activated the borders but those borders will not come where system will not print any data. TO avoid that you need to use the Templates.

Regards,

Naimesh Patel

Former Member
0 Kudos

The output /data will never appear if u execute it through Smart Forms . Data (hard coded ) will appear if i use templates, coz as mentioned it's written hard coded in the template . Where as in tables it fetches data from the SAP standard table . And yes i do know that if i use tables the data will not appear . For the data to be displayed i need to execute it from SE38. Table use ,i feel is much more effecient than templates when we need data ( live) to be displayed, coz it isn't hard coded compared to Templates.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Your requirement is bit confusing.

Let me put my views from the way I understood.

The program can pass on structures or internal tables to the Smartform. Its always recommended to have the data retrieval logic in the program rather than in the form.

Once you have the data in the internal table either you can use a 'Loop' Node and inside the 'Loop' node you can use a 'Template' node to display the data in a tabular format. only exception being the template is static. Else you can use the 'Tables' node by looping through the internal table and display the data.

Former Member
0 Kudos

Now that's exactly what I mentioned - I don't want to use the Loop logic (in Templates) . Tables have an easy method of just mentioning the table and the field name in the Program and using it in the internal table. I then use the same internal table name in the smartforms so that the data gets transferred from the program to the smartforms and viz. My query is - The data / Readings generated in PM module , instead of using it through Templates , can i create an independent table of my own and transfer those readings to that table so that I can call that table name in the program, instead of using flow logic and loops ?

Edited by: Prithvi Sridhar on May 30, 2008 6:50 AM

Former Member
0 Kudos

Hi,

Could you please let us know what do you mean by independent table? Does it means you are creating a customised database table and use the same in the program and smartform?

what ever it is at the end you have write all the logic in the program, fill the internal table of that customised structure, pass the internal table structure to the form and display the data in what ever form logic you want.