Beruflich Dokumente
Kultur Dokumente
Smartforms
Introduction
Syntax Description
Demonstration
Exercises
HelpMe
Smartforms
Introduction
Syntax Description
Demonstration
Exercises
HelpMe
Introduction
Purpose
Use
Purpose
Smartform is a template that simplifies the process
of designing business forms. You need smartform to
print, distribute or display business forms.
Smartform tool includes utilities for designing forms
and for defining the interface to the application
programs that use forms for data output. The output
of application data is placed into a dynamically
expandable table where the size and layout of the
output table is determined by the number of records
being retrieved.
Use of Smartform
Smartforms are used for designing and printing various types of
application documents across the various SAP modules like SD, FI, PU, IM,
WM etc. Smartforms are used for mass printing like monthly invoices sent by
telecom companies or salary statements.
Smartforms
Introduction
Syntax description
Demonstration
Exercises
HelpMe
Syntax Description
Smartform has 3 driving components : Print Program, Layout
Set and Function module.
1.
Application Data is
fetched by the Print
Program from the
database depending upon
the selection screen
parameter.
2.
Function module of a
Layout Set is generated
when the smartform is
activated.
3.
Smartform Development
To develop a smartform object one needs to develop following
objects :
1. Smartform Layout :
2. Print Program :
Performs data selection based on selection criteria
Passes data to the smartform function module
Transaction to use : SE38 to develop a print program.
Navigation Menu
Maintenance Frame
Form Painter
-Table
-Windows
-Template
-Graphics
-Flow Logic
-Folder
- Address
Attributes
General Attributes
Output Options
Conditions
Pages
On the pages of a form you determine the page layout and
the sequence of pages with different structures.The page
layout includes the page format (for example, DIN A4, Letter,
DIN A5 landscape) and the position of the windows on a
page.
Subwindows
In a subwindow you display text and data in a
predetermined output area. There is no flow text
display with page break. If you position a
subwindow with the same name on several pages,
the system displays the contents of this
subwindow on each page.
Text and data that do not fit into the subwindow
are truncated and not displayed.
Text Type
Parameterized Text
In order to avoid hardcoding we can use the concept of
parameterized text. Here you can assign a text or value to a
variable or pass in a ztable and then use this variable (or table
field) directly instead of hardcoding the text or value.
e.g.
In the above example we can also pass &nast-spras& or &sylangu& instead of hardcoding the language as EN
Conditions:
You can define
conditions for
individual nodes, or
for whole sub
hierarchies of the
context.
Global Definitions All the variables that are global across the
smartform are declared here. Here we have five tabs
Global
Data Types
Initialization Field
Symbols
Form Routines.
The name of the generated function module is unique only within one
system. Therefore, always call the function module first that uses the form
name to determine the current name of the generated function module.
Procedure to carry out in Print Program:
First define the form interface in your form and activate the form.
In the form builder call the function Environment Function Module
Name and copy its name.
In the application program define a variable of type RS38L_FNAM for the
name of the generated function module:
data fm_name type RS38L_FNAM
Call function module SSF_FUNCTION_MODULE_NAME . It returns the
name of the generated function module:
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME
= '<form name>'
IMPORTING
FM_NAME
= fm_name
EXCEPTIONS
NO_FORM
=1
NO_FUNCTION_MODULE = 2
OTHERS
= 3.
IF SY-SUBRC <> 0.
<error handling>
ENDIF.
Smartforms
Introduction
Syntax Description
description
Demonstration
Exercises
HelpMe
Configuration
- The basic configuration required to do for smartform is creating
output type and attaching the smartform to the output type.
- NACE is the transaction to set the output type.
- In this transaction first the application is selected ( e.g.V1 Sales, V2
Shipping etc)
- Then output type is selected. Sometimes output type is created
newly if driver program and smartform are custom program and not
SAP standard ones.
- Whenever new output type is created , 3 parameters are required.
They are :
- Smartform Name
- Driver Program Name
- ENTRY routine name.
- Incase of FI forms, configuration is done using BTEs (Business
Transaction Events) since NACE cannot be used to configure FI
forms.
Smartforms
Introduction
Syntax Description
description
Demonstration
Exercises
HelpMe
Exercises
Let us design one smartform for Billing Document. The layout
specifications and data retrieval logic has been explained in these
word documents.
Layout Specification :
Transactions
SMARTFORMS
Create Smartform
SMARTSTYLES
Create style
SO10
SE38
SE78
Upload Logo
Smartforms
Introduction
Syntax Description
description
Demonstration
Exercises
HelpMe
1. Debugging smartform
2. Adding variables in text
node
Field List
control_parameters
output_options
user_settings
job_output_info, job_output_options
2.
Enter the name of the SAP Smartform to be created in the Form field.
3.
4. The program first tries to find the SAPscript form in the current client ; if
the form does not exist there the system looks in client 000.If you
choose Enter form is migrated.
Downloading of Smartform
1. Go to Smartforms transaction. Specify a form name that you
want to download.
2. Select to Utilities->Download Form at menu bar. You will get a
popup to specify the location where you want to download.
3. On click on Save , smartform will be downloaded in .XML format
to a specified location.
Uploading of Smartform
1. Go to Smartforms transaction. To upload smartform , enter the
smartform name in Form
field and select Utilities->Upload Form.
2. You will get a popup to specify .XML file . Specify the file
name from which you want to create a smartform.
Smartforms - Advantages
Smartform offers following advantages :
Creating and maintaining forms require half the
time.
Adapting to forms without any programming
techniques due to GUI.
Web publishing using generated XML output.
High performance when printing in large quantities.
Open the third Include and set the Break-Point wherever necessary
Method2.
In same way we can do it through transaction SE80.