Documente Academic
Documente Profesional
Documente Cultură
Smartform:
1.Client independent
2.multiple page format is possible
3.Text can be written in various color
4.There is an option to print a mixture of portrait and landscape format
5. Smartforms allows only one main window on page
6.This is online support.
Windows are defined in form maintenance. They represent areas that are positioned on
pages – as page windows – and in which at a later time text is printed. You must define at
least one window for each form. Otherwise, SAPscript cannot format the text.
You can assign window names and window types. However, note that you can define only
one main window per form.
Use one of these window types:
MAIN WINDOW:
Main window in which continuous text is printed. This is the window used by dialog users of
a print program and form. For example, the body text of a letter would be entered in MAIN.
The text in the main window can extend over several pages. If the text fills one page, output
continues in the window of the next and subsequent pages, as long as MAIN has been
defined for these pages.
VARIABLE WINDOW:
Window with variable contents. The text can vary on each page in which the window is
positioned. Variable windows are formatted for each page.
To every window you can assign text, which is printed in the corresponding window when
the form is formatted. To assign text, use text elements, which are stored with the form.
To create and maintain text elements with the SAPscript Editor, choose Text elements. For
more information, see Text Elements.Should the text selected for the window exceed the
window size, then the text is cut off.
CONSTANT WINDOW
Window with constant contents that is formatted only once.
Currently, constant windows are processed in the same way as VAR windows. You should only use
windows of type VAR.
SAP Smart Forms is introduced in SAP Basis Release 4.6C as the tool for creating and maintaining
forms.
SAP Smart Forms allow you to execute simple modifications to the form and in the form logic by using
simple graphical tools; in 90% of all cases, this won't include any programming effort. Thus, a power
user without any programming knowledge can configure forms with data from an SAP System for the
relevant business processes.
To print a form, you need a program for data retrieval and a Smart Form that contains the entire from
logic. As data retrieval and form logic are separated, you must only adapt the Smart Form if changes
to the form logic are necessary. The application program passes the data via a function module
interface to the Smart Form. When activating the Smart Form, the system automatically generates a
function module. At runtime, the system processes this function module.
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.
You can check individual nodes as well as the entire form and find any existing errors in the tree
structure. The data flow analysis checks whether all fields (variables) have a defined value at the
moment they are displayed.
SAP Smart Forms allow you to include graphics, which you can display either as part of the form or as
background graphics. You use background graphics to copy the layout of an existing (scanned) form
or to lend forms a company-specific look. During printout, you can suppress the background graphic,
if desired.
Also read SAP Note No. 168368 - Smart Forms: New form tool in Release 4.6C
To make changes, use Drag & Drop, Copy & Paste, and select different attributes.
These actions do not include writing of coding lines or using a Script language.
Using your form description maintained in the Form Builder, Smart Forms generates a function
module that encapsulates layout, content and form logic. So you do not need a group of function
modules to print a form, but only one.
For Web publishing, the system provides a generated XML output of the processed form.
Smart Forms provides a data stream called XML for Smart Forms (XSF) to allow the use of 3rd party
printing tools. XSF passes form content from R/3 to an external product without passing any layout
information about the Smart Form.
•
Q) How can we build Web forms using Smart Forms?
• Smart Forms can be generate HTML based on XML output, with the help of the SAP Web
Application Server 6.10. This permits the integration of interactive Web Forms in Web
applications.
• The layout of a Web Form is a look alike of the printed version. Printed forms which are already
used in a business process are promptly recognized.
• By turning a switch the existing Smart Forms used for printing can also be reused for Web
applications. Without showing them in your printed version, you can add HTML input elements
to your Smart Form.
• For evaluating the user entries on a Web Form, these are required to be integrated in some kind
of Web application infrastructure. SAP suggests you to utilize Business Server Pages for doing
this.
•
Q) Which Basis Release do I need to use SAP Smart Forms?
As of R/3 Basis Release 4.6C, SAP Smart Forms is available. It cannot be used in Basis
Releases before 4.6C as it uses SAP kernel technologies and these do not exist in previous
releases. Incase you deploy the appropriate kernel in a, for instance in, 4.6B system its
impossible to use Smart Forms as the tools were still under development around that time.
Q) Have heard that Smart Forms replaces SAPscript. What does the term "replace" mean?
Replace does not mean that the SAPscript has been removed from the Basis shipment. Even as
of Basis Release 4.6C, SAPscript remains a part of the SAP standard and as of now there are
no plans to remove it. In fact, few transactions of SAPscript are reprocessed by SAP Smart
Forms (for instance in the graphical or font maintenance). Since Smart Forms is presently the
tool for form maintenance formySAP.com solutions,we will focus on Smart Forms, and not
on SAPscript (of course, we will continue to support the existing functionality of SAPscript for
the maintenance contracts.) The term "replace"mirrors the hope that you will like Smart Forms
as quite a few customers already do and use it instead of SAPscript.
Q) Is it still possible to use SAPscript instead of SAP Smart Forms?
Yes, we encourage our users to begin using SAP Smart Forms especially the new forms
however both the products can be used parallely.
Q) Can I know if there are already standard smart forms for my application? Incase not,
then what can do?
SAP Document 430621 provides an overview of the existing standard smart forms which are
delivered by SAP Applications. Besides this, SAP Labs also offers preconfigured Smart Forms
which are specifically for the US customers. SAP Document 412293 also provides a procedure in
case your application has not delivered a standard smart form.
Q) Define XSF?
SAPscript presents a Raw Data Interface (BC-RDI) which permits the usage of 3rd party
printing tools, which if meant for passing form content (without layout information) from R/3 to an
external product. Smart Forms also provides a data stream called XML for Smart Forms
(XSF) only for this purpose. As RDI, XSF does not comprise of any layout information about a
Smart Form.
You have the opportunity of becoming a certified partner for the XSF interface (BC-XSF), with
the SAP Partner Program. You can refer to the SAP Integration Scenarios / Interfaces for more
information about all certifiable SAP interfaces. For details about BC-XSF choose mySAP
Technology: Background Processing and Output Management.
Upon using an XSLT program Smart Forms XSF output is also the precondition generating
HTML by This program utilizes the layout information from your form (for instance pages, used
fonts and window sizes) and the given XML tags of XSF for generating HTML.
Q) I have a smartform which works fine in DEV. After transporting it to PROD, there is no
Function module generated for this smartform. As a result, my program dumps in PROD?
The Smartform that is created in the Development may not have the same name in the
Production server. So it is always advised to use the Function Module
SSF_FUNCTION_MODULE_NAME to get the Function Module name by passing the Smartform
name.
DATA: fm_name TYPE rs38l_fnam.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZSMARTFORM'
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION fm_name
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.How can I make the Smartforms to choose a printer name by default?
In the CALL FUNCTION of the Smartform Function Module, set the output options parameter to
set the printer name.
The output options is of the type SSFCOMPOP which contains the field TDDEST. Set the
TDDEST field to your default printer name.
Q) How can I make the Smartforms display a print preview by default without displaying
the popup for print parameters?
In the SSF_OPEN function module,
Set the OUTPUT OPTIONS parameter TDDEST to your printer name.
Set the CONTROL PARAMETERS and control parameters as shown below,
control-preview = 'X'.
control-no_open = 'X'.
control-no_close = 'X'.
control-no_dialog = 'X'.
control-device = 'PRINTER'.
control_parameters-no_dialog = 'X'.
control_parameters-no_open = 'X'.
control_parameters-no_close = 'X'.
OUTPUT_OPTIONS-TDDEST = 'PRINTER NAME'.
OUTPUT_OPTIONS-TDNOPRINT = 'X'.
CALL FUNCTION 'SSF_OPEN'
EXPORTING
output_options = output_options
control_parameters = control
user_settings = ' '
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Q) How can I display the total number of pages in Smartforms?
• Use SFSY-FORMPAGES to display the total number of pages in the Smartforms
• SFSY-PAGE& Current page number
• SFSY-FORMPAGE& Total number of pages in the currently formatted layout set
• SFSY-JOBPAGE& Total number of pages in the currently formatted print request
• SFSY-COPYCOUNT& Original-1,1st copy-2
• SFSY-DATE& Date
• SFSY-TIME& Time
• SFSY-USERNAME& Username
I'm using the variable SFSY-FORMPAGES, I get a star "*" instead of the total number of pages.
There may not be enough space in the window to display the variable, either increase the
window dimensions or condense the spaces using &SFSY-FORMPAGES(C)&
Q) I have defined my own Program Lines, where I have used a global variable G_TEXT. I
get an error G_TEXT is not defined?
Whenever using the global variables in the Program Lines, enter the variable name in Input
Parameters if you are going to use(read) the variable. If you are going to both read/write the
variable value enter the same in Output Parameters.
Q) I have created a table node for display. Where can I check the condition which must
satisfy to display the table?
The conditions can be defined in the Conditions tab. In smartforms all the nodes have a condition
tab where you can specify the condition to be satisfied to access the node.
SAP Scripts are client dependent whereas Smartforms are client independent.
SAP Scripts require a driver program to display the output whereas in smartforms the
form routines can be written so that it is standalone.
An integrated Form Builder helps to design Smartforms more easily than SAP Scripts
The Smartform that is created in the Development may not have the same name in the
Production server. So it is always advised to use the Function Module
SSF_FUNCTION_MODULE_NAME to get the Function Module name by passing the
Smartform name.
EXPORTING
formname = ‘ZSMARTFORM’
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
ENDIF.
HOW CAN YOU MAKE THE SMARTFORMS TO CHOOSE A PRINTER NAME BY DEFAULT?
In the CALL FUNCTION of the Smartform Function Module, set the output options
parameter to set the printer name.
The output options is of the type SSFCOMPOP which contains the field TDDEST. Set
the TDDEST field to your default printer name.
WHERE CAN I PROVIDE THE INPUT PARAMETERS TO THE SMARTFORM?
The input parameters for the smartform can be defined in Global Settings->Form
Interface.
Go to transaction NACE.
Choose the required application from the list and click on output types.
Chose one of the Output types from the right pane and click on processing routines.
If an SAP Script to be attached, fill-in the driver program name, Form routine and SAP
Script name in the field “Form” (shown below)”
If an Smart Form / Adobe Form are to be attached, enter the form name in the field
“PDF/SmartForm Form” and select one of the types “PDF” or “SmartForm”. (See the
screenshot below)
HOW CAN I INSERT SYMBOLS IN SMARTFORMS?
Change Editor
Go to menu Include->Characters->SAP Symbols
The types defined here will be global through the entire smartform.
Whenever using the global variables in the Program Lines, enter the variable name in
Input Parameters if you are going to use(read) the variable. If you are going to both
read/write the variable value enter the same in Output Parameters.
I HAVE CREATED A TABLE NODE FOR DISPLAY. WHERE CAN I CHECK THE CONDITION WHICH
MUST SATISFY TO DISPLAY THE TABLE?
The conditions can be defined in the Conditions tab. In smartforms all the nodes have a
condition tab where you can specify the condition to be satisfied to access the node.
HOW CAN I DEFINE PAGE PROTECT IN SMARTFORMS?
To define Page Protect for a node go to the Output options and check the Page
Protection checkbox.
IF SAP R/3 SYSTEM HAS 2 CLIENTS 300& 302. YOU CREATE AN SAP SCRIPT Z_SCRIPT AND A
SMARTFORM Z_SMARTFORM IN CLIENT 300. WILL BOTH Z_SCRIPT AND Z_SMARTFORM BE
AVAILABLE IN CLIENT 302 AS WELL?
Client 800 will have just the Smartform Z_Smartform and not the SAP Script Z_Script.
SAP-Script is client dependent whereas SMARTFORM is client independent.
HOW DO YOU CONVERT A SMARTFORM OUTPUT TO PDF OUTPUT?
CONVERT_OTF
CONVERT_OTF_2_PDF
In the Driver program, import the parameter ‘job_output_info’ from the Smartform FM
and utilize that info in ‘OTF’ parameter of the two aforementioned function modules.
HOW CAN YOU SEE THE SMARTFORM PRINT PREVIEW OUTPUT AS LIST OUTPUT?
Step1: Use SE73 i.e. SAP-Script Font Maintenance and create a Bar code say
Zbarcode.
Step 2: For Smartform, create a character format C1 and use the recently created
Barcode Zbarcode.
HOW DO YOU ADD A WATERMARK OR A BACKGROUND IMAGE FOR SMARTFORMS ?
If you go to the properties of a page in Smartform, you will find a tab for Background
Image.
Specify the source of the image you need here and it can be used as background image
/ Watermark in Smartforms.
At the Page level in Smartforms, you can find something called as Print Mode.
Set the Print mode to duplex to print on both sides of the Smartform.
HOW CAN YOU PROVIDE A BACKGROUND COLOR TO THE TABLE?
In the Table Painter, you can specify the color and shading for the table lines.
HOW CAN YOU MAKE THE SMARTFORMS TO DISPLAY A PRINT PREVIEW BY DEFAULT
WITHOUT DISPLAYING THE POPUP FOR PRINT PARAMETERS?
control-preview = ‘X’.
control-no_open = ‘X’.
control-no_close = ‘X’.
control-no_dialog = ‘X’.
control-device = ‘PRINTER’.
control_parameters-no_dialog = ‘X’.
control_parameters-no_open = ‘X’.
control_parameters-no_close = ‘X’.
OUTPUT_OPTIONS-TDNOPRINT = ‘X’.
EXPORTING
output_options = output_options
control_parameters = control
user_settings = ‘ ‘
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
WHAT IS THE DIFFERENCE IN A TABLE AND A TEMPLATE IN SMARTFORM?
A Template has fixed number of Rows and Columns whereas a Table can have variable
rows and columns .
While one can use the PROTECT ….. ENDPROTECT command for SAP-Scripts, for
Smartforms the Page-Protection checkbox can be used to ensure page protection:
One can download the Smartform from one system and save it as an XML file.
Once that is done, the XML file can be used to upload the Smartform in another system.
Yes, you can create a Smartform without a Main Window. But there is no need to do
anything of such sort.
HOW DO YOU FIND THE NAME OF THE FUNCTION MODULE FOR A SMARTFORM?
The function module for Smartform is created when the Smartform is activated.
You can find the name of the Function Module for a Smartform by going to
We use the copies window to define an output area for the print output, whose content
you want to appear either only on the copy or only on the original. This allows you to flag
copies as copies when the form is printed.
You can determine where to print the inferior nodes of a copies window:
Final Window is called after all the other windows are called in a Smartform.
WHAT IS THE TCODE FOR SAPSCRIPT FORMS?
System symbols
Standard symbols
Program symbols
Text symbols
WHAT ARE THE DIFFERENT WINDOW TYPES IN SAPSCRIPT?
&SFSY-DATE& Date
&SFSY-TIME& Time
&SFSY-USERNAME& Username.
HOW TO DEBUG A SAP SMARTFORM?
To debug a smartform in quality or testing system, go to tcode SMARTFORMS. Enter
the name of the smartform if you know or find the name of the smartform name from
NACE and display the smartform.debug-smartforms-1Find the statement in the
smartform where you want to place the break-point.debug-smartforms-2Go to menu
Environment –> Function Module Name to get the name of the function module for the
Smartform.debug-smartforms-3Copy the function module name in the popup. debug-
smartforms-4Go to tcode SE37 (Function Builder).debug-smartforms-5Enter the name of
the function module and go to Menu Goto –> Main Program.debug-smartforms-6In the
Main Program click on FIND to search the statement where you want to place the break-
point.debug-smartforms-7Enter the text of the line where you want to place the break-
point in the FIND popup.debug-smartforms-8Place the break-point on the desired
line.debug-smartforms-9Now run the driver program, the control stops at the break-point
and you can analyze the smartform.
WHAT ARE IMPORTANT TRNSACODES USED FOR SMARTFORMS?
Leading sign can be omitted by using ‘S’ with the sapscript symbol i.e. &symbol(S)&.
Leading zero can be omitted by using ‘Z’ with the sapscript symbol i.e. &symbol(Z)&.
HOW TO DEBUG A SAPSCRIPT?
To switch on the debugger for SAPScript use the menu path Utilities->Debugger or use
the program RSTXDBUG.
WHAT ARE THE DIFFERENT FUNCTION MODULES USED IN SAPSCRIPT?
START_FORM
OPEN_FORM
WRITE_FORM
CLOSE_FORM
END_FORM
HOW TO CALL A SUBROUTINE IN SAPSCRIPT?
/: USING &INVAR1&
/: USING &INVAR2&
/: CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
/: ENDPERFORM
ENDFORM.
WHAT IS DIFFERENCE BETWEEN SAP SCRIPT AND SMARTFORM?
SAP Script:
1.Client dependent
Smartform:
1.Client independent
By using standard program RSTXTRAN we can transfer SAP standard text form one
client to another client and using standard program RSTXSCRP we can transport script
from one client to another client.
HOW TO FIND DRIVER PROGRAM GIVEN THE NAME OF SAP SCRIPT?
First you need to goto Form–>check–>text, you will get one small box hit on enter where
you can see the driver program name.
Part 3
3.Line in Smartform
Either you can use a window that takes up the width of your page and only
has a height of 1 mm.
Then you put a frame around it (in window output options).
Thus you have drawn a box but it looks like a line.
Or you can just draw "__" accross the page and play with the fonts so that it
joins each UNDER_SCORE.