Smart Forms


What are smart forms in SAP?
What are Smart Forms?
Define Smart Forms?
Explain the Smart forms in SAP ABAP program?
What do you mean by Smart Forms?

SAP Smart Forms is tool used to print and send documents. This is extremely useful in developing forms, PDF files, e-mails, and documents for the Internet. The tool provides an interface to build and maintain the layout and logic of a form.
SAP Smart Forms used to create/modify forms by using simple graphical tools instead of using any programming tool. A user with no programming knowledge can configure these forms with data for a business process effortlessly.

What Is the difference between OPEN_FORM and CLOSE_FORM?

OPEN_FORM is a function module that opens layout set printing. This is the first function module should call to use other layout function modules - WRITE_FORM, START_FORM, CONTROL_FORM etc.
CLOSE_FORM is a function module that closes the layout printing. This is the last function module should call. CLOSE_FORM is basically associated with completing or concluding the form printing.
The layout set opened by OPEN_FORM should be closed by CLOSE_FORM function module, otherwise output does not appear. We can use any number of OPEN_FORM, CLOSE_FORM functions in one single program. However, CLOSE_FORM should be coded for every OPEN_FORM in the program or vice versa.

Forcing a page break within table loop?

Create a loop over the table. Place a Command node before the table in the loop that forces a NEWPAGE on whatever condition we want. Then only loop through a subset of the internal table (based on the conditions in the Command node) of the elements in the Table node.

Font style and Font size in Smart Forms?

Goto Transaction SMARTSTYLES.
There we can create Paragraph formats etc just like in sapscript.
Then the window under OUTPUT OPTIONS we can include this SMARTSTYLE and use the Paragraph and character formats.

Line in Smart form?

Line can be drawn in two ways -

  • We can use a window that takes up the width that has a height of 1 mm of our page. Then we should put a frame around it (in window output options). Thus, we have to draw a box that looks like a line.
  • We can just draw “__” across the page and play with the fonts so that it joins each UNDER_SCORE.

Difference between ‘form interface’ and ‘global definitions’ in global settings of smart forms?

Form Interface is where we declare "what must be passed in and out of the smart form" (in - from the print program to the smart form. out - from the smart form to the print program).
Global definitions are where we declare “the data that is used within the smart form on a global scope". ie: anything we declare can be used in any other node in the form.

How to find smart forms function module name?

Once we have activated the smart form, go to the environment -> function module name. There we can get the name of function module name.

What is smart forms output difference?

Problem with Smart forms: If two printers are differently configured and the difference is the output characters size. If we print the form on these printers, the output gets printed differently on each printer.
It happens only when the two printers having different Printer Controls. To resolve the problem, printer control setting should be same for both printers.
To resolve this, go to SPAD Menu (Spool Administrator Menu). There we can see the difference in the Printer Control and modify the printer control setting for both the printers as same. then it will be ok. And, we have to check what is the device type used for both the output devices.

How to convert smart forms output to PDF?

There is a way to download smart form in PDF format.
Do the following -

  1. Print the smart form to the spool.
  2. Note the spool number.
  3. Download a PDF file (Acrobat Reader) version of the spool by running Program RSTXPDFT4 and entering the noted spool number.

How does one transport SMARTFORM? SE01?

A smart form are transported as same as any other object. If it is assigned to a development class, that is attached to a transport layer and it gets transported.
Once the definition is transported, and when it is called, the function module is regenerated.

What are the differences between scripts & smart forms?

  • Multiple page formats are possible in smartforms which is not the case in SAPScripts.
  • It is possible to have a smartform without a main window.
  • Labels cannot be created in smartforms.
  • Routines can be written in smartforms tool.
  • Smartforms generates a function module when activated.
  • Unlike sapscripts (RSTXSCRP), we cannot upload/download Smartform to our local hard disk.

What is the use of Folder in Smart forms?

Just to group nodes, doesn’t affect any functionality. we can group nodes into a folder.

What is the difference in a Table and a Template in Smart form?

A Template has fixed number of rows and columns whereas a Table can have any number of rows and columns i.e. We can have a internal table with contents associated to a Table element but not to a Template.

Can you move a Smart form from one SAP system to another without using transports?

Yes, this can be achieved using the Upload/Download feature for Smart forms. We can download the Smart form from one system and save it as an XML file. Once the download completed, the XML file can be used to upload the Smart form in another system.

Can you have a Smart form without a main window?

Yes, we can create a Smartform without a Main Window. But there is no need to do anything of such sort. Whenever we create a Smartform, a main window is created by default.

How do you find the name of the Function Module for a Smart form?
How do you find the name of the Function Module for a Smart form? When is this function module created?

The function module for Smartform is created when the Smartform is activated. We can find the name of the Function Module for a Smartform by going to "Environment -> Function Module Name".

What is a Final Window in smart forms?

Final Window is called after all the other windows are called in a Smartform.

In Smart forms after final window, can we create secondary window?

Final Window is called after all the other windows are called in a Smartform.