SAP SmartForms Training Material
SAP SmartForms Training Material
0
Smartforms
1 Introduction
2 Syntax Description
3 Demonstration
4 Exercises
5 HelpMe
Smartforms
1 Introduction
2 Syntax Description
3 Demonstration
4 Exercises
5 HelpMe
Introduction
• Purpose
• Use
Purpose
2 Syntax description
3 Demonstration
4 Exercises
5 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. The output of application
document is sent to
printer or mail or fax.
Smartform Development
To develop a smartform object one needs to develop following
objects :
1. Smartform Layout :
Can be developed in the Form Painter
Decides the data format
Transactions to use : Smartforms
Smartstyles - To design our own style.
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.
Smartform Initial Screen
Smartform Builder Components
Smartform screen is divided in following 3 components.
Attributes
General Attributes
Output Options
Conditions
Successors of Node Pages and Windows
As direct successors to root node Pages and windows you can create only page
nodes. The tables below describe these page nodes and the other successors:
Text elements
Text modules
Include texts
Dynamic texts
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.
IF SY-SUBRC <> 0.
<error handling>
ENDIF.
Smartforms
1 Introduction
2 Syntax Description
description
3 Demonstration
4 Exercises
5 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
1 Introduction
2 Syntax Description
description
3 Demonstration
4 Exercises
5 HelpMe
Quick Overview of Node Usage
before starting with exercise
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 :
Layout Specification
2 Syntax Description
description
3 Demonstration
4 Exercises
5 HelpMe
Tips and Tricks in smartform
Field List on / off
1. Debugging smartform
Field List
Additional – Interface parameters in detail
Additional – Interface parameters in detail…
continued
• Required parameters
• Optional parameters
control_parameters
output_options
user_settings
job_output_info, job_output_options
Configuration required for
Smartform
• Output Type : Output type connects the application
program and the layout. The application program
actually retrieves the data and layout defines the
placement of this data. To attach the layout to an
application program output type should be defined.
• How to define Output type : For SD module
SPRO Sales and Distribution Basic Functions
Output Control Output Determination Maintain
output types.
How to migrate the SAP scripts to
Smartforms?
You can convert individual forms on the initial screen of the SAP
Smartforms transaction. Steps for migration are:
1. Enter the ‘smartforms’ in command node. It will take you to smartform
screen.
2. Enter the name of the SAP Smartform to be created in the Form field.
3. Choose Utilities at menu bar and select Migrate SAPscript form .
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 :
Method2.
• In same way we can do it through transaction SE80.