Professional Documents
Culture Documents
Smartforms
Smartforms
Smartforms
Ans: Smart Forms are printing forms used to print Invoice and purchase order forms
etc. We are calling smartforms from ABAP programs then spools are generated, now
smartform ready to be printed.
SMARTSTYLES are used to define paragraph and character formats (fonts, barcodes,
etc.)
Q2. What are the differences between SAP Scripts and Smartforms?
Ans: 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
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.
Q3. How can you make the Smartforms to choose a printer name by default?
Ans: 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.
Q4. Where can I provide the input parameters to the smartform?
Ans: The input parameters for the smartform can be defined in Global Settings->Form
Interface.
Q5. Where do you Configure the Adobe Forms / Smart forms / SAP Script to
the output type in NACE?
Ans: 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)
Change Editor
Q7. Where can I define my own global types for the smartform?
Ans: The global types can be defined in Global Settings->Global Definitions->Types
The types defined here will be global through the entire smartform.
Also the form routines can be defined Global Settings->Global Definitions->Form
Routines
Q8. 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?
Ans: 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.
Q9. I have created a table node for display. Where can I check the condition
which must satisfy to display the table?
Ans: 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.
Q11. 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.
Ans: SAP-Script is client dependent whereas SMARTFORM is client independent.
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.
Q13. How can you see the Smartform Print Preview output as list output?
Ans: Type SLIS in the command prompt and hit enter.
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.
Specify the source of the image you need here and it can be used as background image
/ Watermark in Smartforms.
Set the Print mode to duplex to print on both sides of the Smartform.
Q18. How can you make the Smartforms to display a print preview by default
without displaying the popup for print parameters?
Ans: In the SSF_OPEN function module,
Set the OUTPUT OPTIONS paramter TDDEST to your printer name.
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
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
Q21. Can you move a Smartform from one SAP system to another without
using transports ?
Ans: Yes, this can be achieved using the Upload/Download feature for Smartforms.
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.
Q23. How do you find the name of the Function Module for a Smartform?
Ans: 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
You can determine where to print the inferior nodes of a copies window:
Q30. How can you display the total number of pages in Smartforms?
Ans: Use SFSY-FORMPAGES to display the total number of pages in the Smartforms
&SFSY-DATE& Date
&SFSY-TIME& Time
&SFSY-USERNAME& Username.
Q35. How can we omit a leading sign and a leading zero in SAPScript?
Ans: 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)&.
START_FORM
OPEN_FORM
WRITE_FORM
CLOSE_FORM
END_FORM
/: USING &INVAR1&
/: USING &INVAR2&
/: CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
/: ENDPERFORM
...
ENDFORM.
SAP Script:
Client dependent
Multiple page format is not possible
Scripts allows only black & white texts.
There is no mixture of portrait and landscape format
Scripts allows more than one main window
This is not support for online.
Smartform:
Client independent
multiple page format is possible
Text can be written in various color
There is an option to print a mixture of portrait and landscape format
Smartforms allows only one main window on page
This is online support.
Q41. How do you transport a script and how do you transport standard text?
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.
Q42. 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.