November 28, 2018

SAP Smart Forms

You can design and print forms in a SAP System using the Smart Form Technology. Your ABAP program calls a smart form and then to print, spools are generated. You can embed texts, images and other elements like barcodes in smart forms. SAP Smart Forms is an advanced version of SAP Script Forms and replaces scripting in a SAP system for form printing and integrating the output in an HTML format.

You can use different output formats in a Smart Form, some of these include −

  • Printing
  • Email
  • Fax or
  • Sending it over the internet in a HTML/XML output format.

A Smart Form tool allows you to modify forms by using simple graphical tools instead of using any programming tool. This means that a user with no programming knowledge can configure these forms with data for a business process effortlessly.

In a Smart Form, data is retrieved from static and dynamic tables. The table heading and subtotal are specified by the triggered events and the data is then sorted before the final output. A Smart Form allows you to incorporate graphics that can be displayed either as a part of the form or as the background. You can also suppress a background graphic if required while taking a printout of a form.

The SAP Smart Forms have been surprised with the use of interactive forms from Adobe.

Some examples of this standard Smart Forms available in a SAP System are as follows −

  • SF_EXAMPLE_01 represents an invoice with a table output for flight booking for a customer.
  • SF_EXAMPLE_02 represents an invoice like SF_EXAMPLE_01, but with subtotals.
  • SF_EXAMPLE_03 specifies an invoice like SF_EXAMPLE_02, but one in which several customers can be selected in an application program.

SAP Smart Forms vs SAP Script

SAP Scripting is in use since the 1980’s. However, the Smart Form concept was started in year 2001. Smart Forms have surprised Scripting Forms in SAP.

Following are the key differences between them −

  • In SAP Scripting, you must write the print program. However, in a Smart Form it is not required to write a print program.
  • SAP Scripts are client dependent. However, Smart Forms are client independent.
  • You can create Smart Forms without using the main window. However, it is not possible with the use of Scripts.
  • In SAP Scripting, you can use up to 99 main windows. However, in a Smart Form it can have one main window.
  • When you activate Smart Forms in a SAP system, it generates the function module. However, it is not generated in case of Script Execution.
  • It is also possible to create and design web forms using Smart Forms, but you cannot design web forms using script.
  • The Smart Form concept is completely based on Graphical User Interface. However, scripting includes some programming.
  • You can create, change and display a smart form using Transaction SMARTFORMS. To style the smart forms, you can use Transaction SMARTSTYLES. To write a SAP Script, use Transaction Code: SE71to open form painter and SE72 to add different style of texts and font in the Script Forms.
  • It is possible to maintain background graphics using Smart Forms, but not possible with SAP scripting.

To design a smart form layout in a SAP system, use Transaction Code: SMARTFORMS.

SMARTFORMS

To Style the smart form, use Transaction: SMARTSTYLES.

SMARTSTYLES

SAP Smart Forms – Uses

The Smart Forms have many advantages over Scripting. These include easy to design graphical user interface, use of dynamic text frames and table structure.

Below are the benefits of using Smart Forms −

  • It doesn’t require any programming knowledge to design smart forms as it is based on graphical tools. This allows power users to design the smart forms in a SAP system and experts are required only in special cases.
  • When you activate smart forms, it automatically generates function modules at the runtime.
  • You can add background graphics to smart forms which can be displayed as a part of the form.
  • You can display table structures and dynamic text framing using smart forms. You can use SMARTSTYLES to add colored texts, images, barcodes, etc.
  • You can generate output in HTML format with release 6.10.
  • It is easy to make changes to the existing smart forms using drag/drop or cut/paste feature. This doesn’t required you to enter script coding for making changes.
  • You can convert SAP Script forms to smart forms but vice versa is not possible.

SAP Smart Forms – General Concept

In a SAP System, form printing means creating and designing layout of the form for mass printing. This involves form structure, design and layout and form logic for dynamic formatting. The form layout tells the structure of the form like – number of different structure pages and use of tables, paragraphs and character formats to format text in the form.

The dynamic formatting of the form depends on the form logic that allows you to add the conditional text in the form layout, which is displayed only when a certain condition is met. You can define variable fields as per the condition type – first dunning use this text and second dunning use other text and so on to process dynamic formatting.

Different form types can be created in a SAP System using smart forms and you can add conditional text and different layouts as per the requirement.

  • Invoices
  • Account Statements
  • Salary Statement
  • Quality Forms
  • Checklist
  • Order Processing
  • Order Confirmation
  • Delivery notes and many more

In the next chapter, we will discuss in detail about the architecture of SAP Smart Forms.