Smartforms For Beginners
Smartforms For Beginners
Company Registration
Online company registration with all related registration starting from just Rs.6899/-
Open
IndiaFilings
Smartforms
Objective
The objective of this section is to introduce Smart Forms. The topics covered include :
As output medium SAP Smart Forms support a printer, a fax, e-mail, or the Internet (by using the
generated XML output).
Advantages
https://www.stechies.com/smart-forms-beginners/ 1/27
11/30/21, 11:11 AM Smartforms for Beginners
Features
SAP Smart Forms allow you to execute simple modifications to the form and in the form logic by using
simple graphical tools.
To print a form, you need a program for data retrieval and a Smart Form that contains the entire form
logic. When activating the Smart Form, the system automatically generates a function module.
You design a form using the graphical Form Painter and the graphical Table Painter. The form logic is
represented by a hierarchy structure (tree structure) that consists of individual nodes, such as nodes for
global settings, nodes for texts, nodes for output tables, or nodes for graphics.
For Web publishing, the system provides a generated XML output of the processed form.
You can insert static and dynamic tables. This includes line feeds in individual table cells, triggering events
for table headings and subtotals, and sorting data before output.
SAP Smart Forms allow you to include graphics, which you can display either as part of the form or as
background graphics.
Global Settings
Form Attributes
Form Interfaces
Global definition
Form Attributes
https://www.stechies.com/smart-forms-beginners/ 2/27
11/30/21, 11:11 AM Smartforms for Beginners
Form Interfaces
We define the form interface to pass the data to the form. In the form interface we can define
import and export parameters, tables and exceptions.
Global Definition
Global definition apply for the entire form. We can use any object defined there in all nodes
of the tree.
https://www.stechies.com/smart-forms-beginners/ 3/27
11/30/21, 11:11 AM Smartforms for Beginners
We can initialize the global data before we start processing the start page. Within the form routines
we cannot access any global data unless we explicitly pass them to the form routine interface.
Order confirmations
Invoices
Account statements
Cheques
Salary statements
Delivery notes
Customs forms
Industry-specific forms
Form printing covers creating and maintaining a form for mass printing in SAP Systems
The layout determines the page structure, that is the number of differently structured pages and the
positions of the output areas on these pages.
The form logic controls the dynamic formatting of the form.
https://www.stechies.com/smart-forms-beginners/ 4/27
11/30/21, 11:11 AM Smartforms for Beginners
1. Pages
2. Windows
3. Addresses
4. Graphics
5. Tables or templates
6. Data and text content
Pages of a form
On the pages of a form you determine the page layout and the sequence of pages with different
structures.
The individual pages in the form may differ in their structure.
We specify the next page to make the page sequence clear. For recursive output call the same page
repeatedly.
Types of windows
On a page there are two different types of output areas for text and data:-the Main window and the
Sub window.
Main Window : In a main window you display text and data, which can cover several pages .We can
define only one window in a page as a main window.
Sub Window : In a sub window you display text and data in a predetermined output area (i.e.
Header, Footer etc).
https://www.stechies.com/smart-forms-beginners/ 5/27
11/30/21, 11:11 AM Smartforms for Beginners
Architecture
https://www.stechies.com/smart-forms-beginners/ 6/27
11/30/21, 11:11 AM Smartforms for Beginners
When we activate the Smart Form, the system generates a function module that encapsulates all
attributes of the Smart Form. As soon as the application program calls the function module, the
Smart Form uses the modules interface (which corresponds to the form interface) to transfer any
table data previously selected and to print the form according to the form description.
For fetching the application data write an ABAP program to retrieve data or include a retrieval routine
into your application. This code consists of statements that select data from the database according
to certain selection criteria. Store the retrieved data in internal tables, structures, or variables and
transfer it to the form in one step.
passed to the form, for output in the form. Formatting data in the form and not in the data retrieval
program allows us to use one data retrieval program for several forms with different formatting
https://www.stechies.com/smart-forms-beginners/ 7/27
11/30/21, 11:11 AM Smartforms for Beginners
routines.
Describe the interface of the form. It results from the application data previously selected.
Create one or more pages. On a page, you can position windows, addresses, and graphics. Within a
window, you can create additional elements.
Create elements (text, graphics, tables, and so on) for each page, using other tools of the Form
Builder:
Use the Form Painterto position windows, graphics, and addresses on a page (the
other elements are displayed in an assigned window).
Use the PC Editorto write your texts.
Use the Table Painterto format your tables.
Form Logic
In the Form Builder you describe a Smart Form by a set of nodes. To do this, you build up a tree
structure on the left side of the user interface:
https://www.stechies.com/smart-forms-beginners/ 8/27
11/30/21, 11:11 AM Smartforms for Beginners
Nodal Flow
The numbering of the nodes also shows the sequence in which they are processed (from top to bottom). The
first node is the root node. The successorsof a node are all nodes included directly under this node in the
hierarchy. For node 5 these are the nodes 6 to 9 (direct successors are only the nodes of the next hierarchy
level, that is 6, 7, and 9).
Nodes in Smartforms
Page
Window
https://www.stechies.com/smart-forms-beginners/ 9/27
11/30/21, 11:11 AM Smartforms for Beginners
Text
Graphic
Template
Table
Command
Loop
Alternative
Folder
Complex Section
Program Lines
Output Areas
Table output
Flow Control
https://www.stechies.com/smart-forms-beginners/ 10/27
11/30/21, 11:11 AM Smartforms for Beginners
Other Nodes
Tools in smartforms
Form Painter
Table Painter
PC Editor
Navigation Tree
Form Painter
Table Painter
https://www.stechies.com/smart-forms-beginners/ 11/27
11/30/21, 11:11 AM Smartforms for Beginners
PC Editor
https://www.stechies.com/smart-forms-beginners/ 12/27
11/30/21, 11:11 AM Smartforms for Beginners
Style Builder
के लिए घर से बाहर
खोलें
निकलने की जरुरत
Paragraph formats including indents and spacing, font attributes, tabs, and outline and numbering
Character formats including effects (superscript, subscript), bar-code and font attributes
https://www.stechies.com/smart-forms-beginners/ 13/27
11/30/21, 11:11 AM Smartforms for Beginners
Field List
All tables, structures and fields passed via the form interface.
Error List
When we check the smart forms and if any error occurs, it will be displayed at the bottom
https://www.stechies.com/smart-forms-beginners/ 14/27
11/30/21, 11:11 AM Smartforms for Beginners
Example
We will be using a smart form to print the details of a Sales order with details like :
Company address
Customer address
https://www.stechies.com/smart-forms-beginners/ 15/27
11/30/21, 11:11 AM Smartforms for Beginners
For the sake of the example, both loop and table nodes are used for printing the item details.
The following slides show the required output and the components of the Form Builder used for
getting the same.
Development Sequence
https://www.stechies.com/smart-forms-beginners/ 16/27
11/30/21, 11:11 AM Smartforms for Beginners
https://www.stechies.com/smart-forms-beginners/ 17/27
11/30/21, 11:11 AM Smartforms for Beginners
https://www.stechies.com/smart-forms-beginners/ 18/27
11/30/21, 11:11 AM Smartforms for Beginners
https://www.stechies.com/smart-forms-beginners/ 19/27
11/30/21, 11:11 AM Smartforms for Beginners
https://www.stechies.com/smart-forms-beginners/ 20/27
11/30/21, 11:11 AM Smartforms for Beginners
https://www.stechies.com/smart-forms-beginners/ 21/27
11/30/21, 11:11 AM Smartforms for Beginners
Table Painter
Source Code
DATA FLAG(1).
https://www.stechies.com/smart-forms-beginners/ 22/27
11/30/21, 11:11 AM Smartforms for Beginners
DATA ZITAB1 LIKE ZITAB OCCURS 0 WITH HEADER LINE.DATA: SVBELN TYPE DDSHRETVAL.TABLES:
VBAK, VBAP.
START-OF-SELECTION.
SELECT * FROM VBAP INTO CORRESPONDING FIELDS OF TABLE ZITABWHERE VBELN = VBAK-VBELN
IMPORTING
FM_NAME= FM_NAME
*EXCEPTIONS
*NO_FORM= 1
*NO_FUNCTION_MODULE= 2
*OTHERS= 3.
IF SY-SUBRC <> 0.
ENDIF.
EXPORTING
VBELN = VBELN
https://www.stechies.com/smart-forms-beginners/ 23/27
11/30/21, 11:11 AM Smartforms for Beginners
KUNNR = KUNNR
FLAG= FLAG
ZITAB= ZITAB
ZITAB1 = ZITAB1.
Summary
The previous slides explained the features, creation and the application of Smart Forms.
Recommended Posts:
ABAP OOP's
ABAP Smartforms
https://www.stechies.com/smart-forms-beginners/ 24/27
11/30/21, 11:11 AM Smartforms for Beginners
ABAP SAPScript
ABAP User Exits, Customer Exits and BADI
Follow Us
Contact Information
Pin :- 122015
Top Tutorials
SAP Tutorial
Android Tutorial
Python Tutorial
Java Tutorial
Hadoop Tutorial
Photoshop Tutorial
https://www.stechies.com/smart-forms-beginners/ 25/27
11/30/21, 11:11 AM Smartforms for Beginners
Interview Questions
SD Interview Questions
Quick Links
Write for us
Sample Resume
Institutes
Classifieds
Recent Articles
Contact Us
About Us
Terms of Use
Privacy Policy
Cookies Policy
https://www.stechies.com/smart-forms-beginners/ 26/27
11/30/21, 11:11 AM Smartforms for Beginners
All the site contents are Copyright © www.stechies.com and the content authors. All rights reserved. All product names are trademarks of their respective
companies. The site www.stechies.com is in no way affiliated with SAP AG. Every effort is made to ensure the content integrity. Information used on this site is at
your own risk. The content on this site may not be reproduced or redistributed without the express written permission of www.stechies.com or the content authors.
https://www.stechies.com/smart-forms-beginners/ 27/27