The smartform is often printed out directly in the company daily process. But in some cases, the business requires to convert the smartform into PDF and will be sent by email. For example, if one customer wants to receive the billing form by email, this requirement can be done by SAP output control. Below gives a step by step tutorial and analysis.
Step 1. Set up a customer master with email address.
Go to transaction XD01 and create a new customer with email address. Save the customer and record the customer number.
Read more…
You want to send your form to an output medium. This can be a printer, a fax, e-mail, or even output as an XML document. For these output medium, SAP provides different output formats, such as OTF, XSF, and HTML.
1. OTF (Output Text Format)
In classical form output, you print forms on the printer. SAP Smart Forms provides the form in the Output Text Format (OTF). The Output Text Format (OTF) is the established SAP output format for printing forms. It consists of a number of simple, device-independent commands, thus allowing output to be directed to different output devices such as line printers and laser printers, or as an on-screen print preview. OTF is an explicit output format, which means that once SAP Smart Forms has generated an OTF output, no modifications can be made.
OTF is set as the default in the Form Builder. OTF is usually output using spool processing. For this output, a printer must be set up in the system with a device type that understands OTF.
2. XSF (XML for SAP Smart Forms)
XSF stands for XML for Smart Forms and is an XML schema designed for the output of form contents. XSF output does not contain any layout information. Using XSF output, external applications outside the SAP System can access and process the contents of forms.
To output XSF using spool processing, at least one printer of type ‘XSF’ must be set up in the system.
Read more…
If we need to print the ALV report out with certain font size and some decorate requirement, I think we need to utilize smartform to achieve this. I recorded some important steps in this post.
1. Create a new GUI status.
A new GUI status is needed as I need to a button in the toolbar to support print ALV out. You can copy the standard ALV GUI status out and add a new function code like ‘Print’ or something like that.

Standard GUI status locates in program ‘SAPLKKBL‘ and with name ‘STANDARD_FULLSCREEN‘.
Read more…
This is a brief post about how to print a smartform without print preview.
Step 1. use below code snip to set up data.
DATA: gs_control TYPE ssfctrlop,
gs_options TYPE ssfcompop.
* build the print parameter
gs_control-device = 'PRINTER'.
gs_control-langu = 'E'.
gs_control-no_dialog = gc_charx.
gs_options-tddest = p_pdest.
gs_options-tdnewid = gc_charx.
gs_options-tdimmed = gc_charx.
Step 2. Call the smartform function module using above parameter.
* Call smartform
CALL FUNCTION lv_fm_name
EXPORTING
user_settings = space
control_parameters = gs_control
output_options = gs_options
is_spras = gv_spras
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.