Archive for October, 2017

Smartforms tips

Smart Forms provides a migration tool for  migrating layout and texts of a SAPscript form to a Smart Form.

It does not migrate SAPscript form logic of the print program.

Using Smart Forms, this logic is described by the tree structure of the Form Builder. The effort involved in migrating it depends on the complexity of the print program.

You can  migrates SAPscript forms  one-by-one in transaction SMARTFORMS.

You can migrate a SAPscript form into a Smart Form and convert a SAPscript style into a Smart Style.

When converting a SAPscript style into a Smart Style, the system converts all paragraph and character formats with all their properties and attributes without any changes. Thus you can use the converted Smart Style without making any adaptations.

Migrating a SAPscript form

1. Go to the SAP Smart Forms initial screen (transaction SMARTFORMS ).

2. In the Form field enter the name of the Smart Form you want to create.

3. Choose Utilities ® Migrate SAPscript form.

The dialog window Migrate SAPscript Form appears.

4. Enter the name and the language of the source form (SAPscript).

5. Choose Enter.

This takes you to the change mode of the SAP Form Builder.

If the selected SAPscript form does not exist in the selected language, a dialog window appears on which you can select one of the existing languages.

6. Now change the design of the form and of the form logic. To activate the Smart Form choose Activate.

Converting a SAPscript style

  1. Go to the Smart Styles inital screen (transaction SMARTSTYLES ).
  2. In the Style name field enter the name of the Smart Style you want to create.
  3. Choose Smart Styles ® Convert SAPscript style.
  4. Enter the name of the SAPscript style you want to convert.
  5. Choose Enter.
    A list of the converted styles appears.
  6. Choose Back. You can now change the Smart Style (Change).To activate the Smart Style choose Activate.

Mass Migration of SAPscript Forms

  1. In Reporting select the program SF_MIGRATE and execute it.
  2. Select the names and the language of the SAPscript forms and choose Execute. The system creates the Smart Forms under the names of the SAPscript forms plus the extension _SF.
    It displays a list of the migrated forms.
  3. To change and adapt a form, go to transaction SMARTFORMS . Then activate the changed Smart Form.

Migrating Smart Forms to Adobe Forms

1. Go to the Smart Forms initial screen (transaction SMARTFORMS).

2. Choose Utilities ® Migration ® PDF-Based Form ® Export.

3. In the dialog box, enter the name of the Smart Form that you want to migrate, the name of the PDF-based target form, and the target interface. The system suggests the name of the Smart Form as the name for the target form and target interface. You can change these names. The target form and the target interface can have different names.

4. Choose Continue.

5. The system displays the Settings dialog box where you can flag various options for migration. To activate the selected options and close the dialog box, choose Continue.

To view additional information about a particular option, select the option, and press F1.

6. In the dialog box Create Object Directory Entry, enter a package for the interface, or save it as a local object.

7. Assign the form to a package, or save the form as a local object.

8. The system migrates the form.

Transport SmartForm

A smartform is transported no differently than any other object. if it is assigned to a development class that is attached to a transport layer, it will be transported.
The definition is transported, and when called, the function module is regenerated.
This leads to an interesting situation. On the new machine, it is very likely the function module name will be different than the name on the source system. Make sure, before you call the function module, you resolve the external name to the internal name using the ‘SSF_FUNCTION_MODULE_NAME’ function module.
Typically, generate the SF, then use the pattern to being in the interface. Then change the call function to use the name you get back from the above function module.

System fields of Smart Forms

&SFSY-DATE&  Displays the date. You determine the display format in the user master record.

&SFSY-TIME&  Displays the time of day in the form HH:MM:SS.

&SFSY-PAGE&  Inserts the number of the current print page into the text. You determine the  format of the page number (for example, Arabic, numeric) in the page node.

&SFSY-FORMPAGES& Displays the total number of pages for the currently processed form. This  allows you to include texts such as’Page x of y’ into your output.

&SFSY-JOBPAGES&  Contains the total page number of all forms in the currently processed print  request.

&SFSY-WINDOWNAME& Contains the name of the current window (string in the Window field)

&SFSY-PAGENAME&  Contains the name of the current page (string in the Page field)

&SFSY-PAGEBREAK&  Is set to ‘X’ after a page break (either automatic [Page 7] or  command-controlled [Page 46])

&SFSY-MAINEND&  Is set as soon as processing of the main window on the current page ends

&SFSY-EXCEPTION& Contains the name of the raised exception. You must trigger your own  exceptions, which you defined in the form interface, using the user_exception macro (syntax:  user_exception <exception name >).


10 2017

Introduction to SAP SmartForms

What is SAP Smart Forms?

SAP Smart Forms is introduced in SAP Basis Release 4.6C as the tool for creating and maintaining forms.

SAP Smart Forms allow 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 power user without any programming knowledge can configure forms with data from an SAP System for the relevant business processes.

To print a form, you need a program for data retrieval and a Smart Form that contains the entire from logic. As data retrieval and form logic are separated, you must only 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. When activating the Smart Form, the system automatically generates a function module. At runtime the system processes this function module.

You can insert static and dynamic tables. This includes line feeds in individual table cells, triggering events for table headings and subtotals, and sorting data before output.

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.

SAP Smart Forms allow you to include graphics, which you can display either as part of the form or as background graphics. You use background graphics to copy the layout of an existing (scanned) form or to lend forms a company-specific look. During printout you can suppress the background graphic, if desired.

SAP Smart Forms also support postage optimizing.

Execute transaction SMARTFORMS to start SAP Smart Forms.
You design a form using the graphical Form Painter and the graphical Table Painter. The form logic is represented by a hierarchy structure (tree structure) that consists of individual nodes, such as nodes for global settings, nodes for texts, nodes for output tables, or nodes for graphics.
To make changes, use Drag & Drop, Copy & Paste, and select different attributes.
These actions do not include writing of coding lines or using a Script language.
Using your form description maintained in the Form Builder, Smart Forms generates a function module that encapsulates layout, content and form logic. So you do not need a group of function modules to print a form, but only one.
For Web publishing, the system provides a generated XML output of the processed form.
Smart Forms provides a data stream called XML for Smart Forms (XSF) to allow the use of 3rd party printing tools.
XSF passes form content from R/3 to an external product without passing any layout information about the Smart Form.
You can create additional fonts and style with transaction SMARTSTYLES
This can then be define in the paragraph and character formats, which you can then be assign to texts and fields in the Smart Form.
The character formats includes effects such as superscript, subscript, barcode and font attributes.


10 2017