Forms are templates or placeholders used to design uniform, outward looking documents. Examples in an ERP system would be delivery notes, invoices, dunning notices, order confirmations, purchase orders, picking lists, and packing lists. These are just a few of the many roles forms play in internal business processes.
As output documents, forms can be sent to a printer; distributed via electronic media such as fax, telefax, e-mail; or as HTML format entities for use over the Internet as Web Forms.
Sometimes, different business scenarios use similar forms with some overlap of concepts and data structures (e.g., order confirmation, quotation, order inquiry). Each of these forms represents one "Business Form".
Customers almost always have requirements to change the business forms delivered by SAP. Elements such as logos and layouts are usually adapted to suit the corporate identity and particular business needs of a specified customer.
In an effort to support a form design concept with reusable components, promoting ease-of-use, enabling intuitive graphic development, and subsequently reducing maintenance efforts usually associated with form creation, SAP developed Smart Forms technology. This tool is available for Basis releases 4.6C and higher.
Smart Forms and its precursor SAPscript are designed using the basic principle that many documents consist of some rather static elements: output areas that look the same or similar on every physical page. Examples of these would be billing information on a telephone bill, addresses, account numbers, bill date, and due date. In addition, documents also contain dynamic contents --elements that flow over a varying number of pages. In a telephone bill those might be lines of details representing the phone calls made during a particular month. Those pages would be dynamic and the number of details only known at runtime.
Typical candidates for the static part of a form would include:
* Headers (logos, addresses, transaction information
* Footers (company information like board members etc.)
* Whole pages containing introductions or terms of trade.
In addition, one might find static text and images as well as data that is not part of every detail record for a transaction. Such elements should be placed on the "Master Pages" of a form.
In the dynamic part of the content, one defines data that is the 'real content' of the document, e.g. item lines of an invoice together with headers (column headers) and footers (totals).
These elements are candidates for the "Body Pages".
In this article, we will discuss the three main tools of Smart Forms. They are the Form Builder, the Style Builder, and a Text module maintenance tool. The tools support the incorporation of text, tables and graphics into forms and present these elements for user customization using a graphical user interface.
In terms of the application logic, the forms support database communication (via the program/form interface). Upon activation, a Smart Form generates a function module, which can be invoked by the application program. Via the interface of the function module, data can be passed bi-directionally to and from the form. In this way, Smart Forms differ from their antecedent tool, SAPscript. In Smart Forms, as contrasted to SAPscript, the form logic is embedded in the form tool rather than coded in the logic of the application print program.
The Form Builder consists of three editable screen areas:
1. The first screen area is a navigation tree, which displays the hierarchy of all the elements of the form. The tree nodes provide a guideline for processing the form. The nodes are used to control all the functions in the form and comprise the flow logic of the form as well as describing the output areas.
Node types include:
* Pages, which are functionally named, such as FIRST and NEXT
* Windows, output areas in a page
* Templates, output areas for static format
* Tables, output areas for dynamic format that accommodates dynamic array contents
* Text nodes, used to output texts and data variables
* Graphics, used for logos or background images
* Flow Logic nodes, used for loop logic, decision trees, and print commands
* Program logic nodes in the form of ABAP code
2. The second screen displays the attributes of each selected node in the hierarchy tree and provides a maintenance area for each node. Logic, output options, and conditions can be further set in this screen area, as well as the ability to apply a font style to a specific node.
3. The final Form Builder area provides a graphical overview of a current page of the form with the corresponding output areas represented as windows. This graphical tool, called the Form Painter, gives an estimation of how the output will be allocated to a page and how a form will look in printed format. The output areas or windows on the pages can be resized and formatted.
The Style Builder enables the user to create maintainable styles. It serves a purpose not unlike the service a Cascading Stylesheet serves to an HTML page. Formats in a style can be used in different individual forms. Changing a style will automatically update all the forms that use this respective style. The style consists of 3 elements:
* Default values of the style (font size, font style, bold, italic)
* Paragraph formats or line-based formatting. These include spacing, font attributes, outlines and tab offsets for a line or block of lines
* Character formats or string-based formatting. These include font attributes, barcodes and color to be applied to characters or strings of characters
The Text Module provides a means to create reusable text and variable data blocks that can be maintained globally in multi-lingual format. These text modules will automatically propagate changes in any form that uses them. Styles can be applied to them, and they can be maintained separately from the forms.
Smart Forms are a component of the technology stack. With the advent of versions 6.10 and 6.20 of the Basis technology for the Web Application Server, Smart Forms has a number of new functionalities in addition to those provided for it in version 4.6C. These new functions include a revision of the template and table nodes, which now support advanced extensions for boxing, shading, and calculations. One can also display the forms in a Web browser. A Web form is an HTML form with a layout identical to that of the Smart Form in the SAP system. These forms can be embedded in an Internet application with a BSP (Business Server Page) application. From a technical perspective, Smart Forms transforms XSF (Smart Forms XML output) to HTML output. An XSLT program on the server performs this translation by converting the XML tags of the XSF into HTML tags. This translation creates an interactive Web Form and can include interactive components such as radio buttons, pushbuttons, input fields, and other GUI functions, in the newly created Web Form.
With the advent of Netweaver '04 and the Web Application Server 6.40 release, SAP's form strategy will include implementing a new PDF Forms solution within applications. The Adobe document services will convert XML data to PDF. These services will be part of the SAP Web Application Server and will be accessed from within SAP via a SOAP-based interface. This interface is independent of whether the Adobe document services are accessed from the ABAP runtime or the J2EE Engine of the Web Application Server.
SAP will also provide a migration tool from Smart Forms to PDF forms.
SAP Education offers training for development and technical integrators who need to learn Form Design. To learn more about training for Smart Forms, check out the SAP Education Web Site. This site is constantly updated with new offerings. To speak to a SAP Education Representative, please contact the SAP Education Help Desk at 1-877-876-7271
Further information about Smart Forms can be obtained in: 'SAP Smart Forms' by Werner Hertleif and Christoph Wachter (ISBN: 1-59229-011-6).