SAP Smart Forms

SAP ABAP Interview QuestionsQuestion 15: What are Smart Forms?

The Smart Forms replace the SAPscript formats. SAPscript forms will still be supported in the future; you can use them without making any changes for years to come. You can even use SAPscript texts in the Smart Forms. Migration of SAPscript forms into Smart Forms is supported.

You use Smart Forms to create and maintain forms for mass printing in SAP Systems. Besides using the printer for standard output you can also select Internet (by using a generated HTML output), a fax, or e-mail as output medium.

SAP Smart Forms offers the following advantages:

  • Creating and maintaining forms requiring half the time
  • Adapting forms without any programming knowledge due to entrily graphical user interface (But this would be ABAP Developers’ job)
  • Integrating input elements into the HTML output, which enables you to use a form in Internet applications as well

Integration

SAP Smart Forms allows 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 user who is familiar with the tool but has only rudimentary programming knowledge can configure forms with data from an SAP System for relevant business processes. The result of the form development is Smart Form. After it is activated, the Smart Form is similar to a callable function module in the SAP System. What all you need is just to use the function module to call the Smart Form in ABAP program.

The logic of the form is mapped entirely in the Smart Form. To print a form, you call it from within an application program, in which you retrieve the application data to be merged into the form. As data retrieval and form logic separated, you must 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.

Tools

To develope a Smart Form you use the Form Builder in which you describe the attrubutes of the Smart Form by using the integrated graphical tools, such as the Form Painter for the layout of a form page or the Table Painter for the design of table layout. The form logic is represented by hierarchy structure (tree structure) that you construct of individual nodes together with the relevant attributes. Besides using existing tools for global settings you may create, for example, nodes for output texts, of tables, or of graphics. To make changes, use Drag&Drop, Copy&Paste, and select different attributes. These actions don’t require writing coding lines or using a Script language.

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.

Tables

You can include static and dynamic tables into a Smart Form. Dynamic Tables enable you to display tables whose size is determined only at the moment of their output by the number of the table items to be displayed. Table functions are:

  • Line feeds in individual table cells
  • Event-controlled output of table headings and footers
  • Integrated calculation of grand totals and subtotals
  • Colored boxes and shading in tables

Interactive Web Forms

You use HTML output to integrate form into Internet applications. This allows you to use the same Smart Form for both printing and the Internet application. The layout of the form in the web browser corresponds to the print layout. You can enhance the web forms with input-enabled elements, allowing the receipent or user of a web form to change or supplement data. The data the user entered can either be quired by the Innternet application or be evaluated automatically by the system.

Tips & Tricks

  • To position output on a form page use windows. Besides using simple windows for displaying output of fixed length there are special types, for example, for continuous text or for distinctions between the original and a copy of a form.
  • You can include background pictures as graphics, which you can either use as copy teplates for a form or print as background graphics.
  • You can specify spool attributes in the form to allow for postage optimizing.
  • For practicing, take a look at the examples forms in the system. They have the name prefix SF_EXAMPLE_ .

All right don’t wait! Try the Smart Forms!

References:

8 Responses to “SAP Smart Forms”

  1. Shivakumar Says:

    please give the information about logical database events in SAP-ABAP with example so that i can use it… please… i will be very grateful to you…

  2. Shivakumar Says:

    can we set a p f status for all the secondary listds in an interactive reports.. please give me the details on how to set pf status forall the secondary lists with example
    sap+abap+interactive report+query

  3. Tuncay Karaca Says:

    Shivakumar,

    For Logical Database check out this link: Using Logical Databases

    Don’t think Logical Databases look like real databases. They are just prewritten and ready-to-use database selection programs which can be used with an executable ABAP program. Instead of using complex SELECT statements in your program, if one exists, you can use a logical database.

  4. Tuncay Karaca Says:

    Shivakumar,

    For SET PF-STATUS check out this link: Dialog Status for Lists

    It says:

    You set the dialog status for lists in the same way as for normal screens, that is, using the statement

    SET PF-STATUS [EXCLUDING |]
    [OF PROGRAM ]
    [IMMEDIATELY].

    This statement sets the status for the current output list. The dialog status must be defined for the current program, unless you have used the OF PROGRAM addition to set a status from another program . The status is active for all subsequent list levels until you set another status. The SY-PFKEY system field always contains the status of the current list.

    Using SET PF-STATUS, you can display different user interfaces for different list levels to provide the user with different functions according to the individual requirements. Use SET PF-STATUS SPACE to set the standard list status. This depends on the event blocks in the program, as described above.

    The EXCLUDING option allows you to change the appearance and available functions of a status from within the program. This is useful if the individual user interfaces for a range of list levels are very similar. You can define a single global status, and then just deactivate the functions you do not need using EXCLUDING. Specify to deactivate the function code stored in field . Specify to deactivate all function codes stored in the internal table . Field and the lines of table should be defined with reference to the system field SY-UCOMM.

    The IMMEDIATELY addition is intended specially for list processing. You use it while creating a detail list within an event block to change the status of the list currently displayed (index SY-LISTI). Without this option, the system changes the status of the current secondary list (SY-LSIND) that is displayed only at the end of the processing block.

  5. sekhar mc Says:

    hai friends, is there any example for smartform in sap, if so, please send me to my id seckharmc@gmail.com….thanq

  6. Prateek Says:

    Hi,
    Plz give me some details to understand the basic architecture of SAP Smartforms. Basic Definitions with which the concept gets clear.
    mail the details to me at prateek.nolimits@gmail.com..

    Thanks.

  7. Gopi Kumaran Says:

    I really dont know whether I can put this here or not.Iam from India having masters degree in computer appliations and doing ABAP now.I want to go to US or any foreign country.Can any tell me all possible ways to reach my dream?Any consultancies who do recruitment in US/UK/Candada for Indians?Please let me know.You can reach me at kumarangopi@yahoo.com.Thanks in advance

  8. imran Says:

    how to find driver{print) programs for standard smartforms?
    pls can u mail me..

Leave a Reply