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

Smartforms

Former Member
0 Likes
776

What is the purpose of Program lines and Templets? give some examples how to use them?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
757

Hi,

Program lines is just like our ABAP editor , where we can write code for selecting data etc...

One important use of program lines is...

In one program lines we can set flags when sy-subrc is succes for any event...

We can use the same flag condition in any other program lines after that...

This will be very helpful sometimes....

Templates are something like a fixed windows , where we can position the text elements appropriatly...

In a single template we can define define different columns with various dimensions..

Hope this will add a few more inf..

Thanks

Rajiv

6 REPLIES 6
Read only

Former Member
0 Likes
757

Program Lines - Place where you can write the code

Templates - If you want to display some data in a structured manner in the same line, then you go for a template.

Take a look at this link

http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.h...

http://www.esnips.com/doc/13b7ae7a-b32c-4b96-b588-881859d4ac99/Template,Table,Loop,Command-in-Smartf...

Regards,

Ravi

Note - Please mark all the helpful answers

Read only

Former Member
0 Likes
757

Hi,

<b>Program lines</b> that depend on a layout condition (current page = 1) or on a layout-specific event (page break). Example: Changing a global variable that is dependent on the current page number.

<b>Template</b> Displays texts for table cells of a static table

For Learning :Check this

<a href="http://www.allsaplinks.com/smartform_example.html">http://www.allsaplinks.com/smartform_example.html</a>

<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/3b/bb186ddb4441a7875a11d46ea6580d/content.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/3b/bb186ddb4441a7875a11d46ea6580d/content.htm</a>

Regards,

Raghav

Read only

Former Member
0 Likes
757

hi,

Template is used to print static information, i.e number of lines are fixed, one cannot print more than the lines mentioned in the templete.

check these for more info...

http://www.sap-img.com/smartforms/smart-006.htm

http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm

also check

http://www.sapgenie.com/abap/smartforms_described.htm

http://www.sapgenie.com/abap/smartforms_detail.htm

http://www.sapgenie.com/abap/smartforms_sapscript.htm

hope this helps !!

Cheers

Alfred

Read only

Former Member
0 Likes
757

You use program lines nodes to enter free ABAP coding. If you insert program lines at the appropriate position in the tree structure, you can use it, for example, to calculate subtotals and totals in tables.

On the General Attributes tab use the tables Input parameters and Output parameters to pass global fields. Within the ABAP coding you can access only those global fields that you enter in these tables.

The program lines node corresponds to the Initialization tab of the node Global Definitions.

Use node type Template to display a table whose layout and size (number of lines and columns) 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 contents of the successor nodes of the template node. This allows you to position text and a graphic side by side.

Smart Form PDF Link

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

http://sap.ionelburlacu.ro/sap0/sapsf001.htm

I hope it helps.

Best Regards,

Vibha

*Please mark all the helpful answers

Read only

Former Member
0 Likes
758

Hi,

Program lines is just like our ABAP editor , where we can write code for selecting data etc...

One important use of program lines is...

In one program lines we can set flags when sy-subrc is succes for any event...

We can use the same flag condition in any other program lines after that...

This will be very helpful sometimes....

Templates are something like a fixed windows , where we can position the text elements appropriatly...

In a single template we can define define different columns with various dimensions..

Hope this will add a few more inf..

Thanks

Rajiv