With Release 4.6C, SAP Smart Forms, SAP's new solution for creating and maintaining forms in SAP systems, replace SAPscript forms (see Figure 1). The three most important benefits SAP Smart Forms provide are:
- Web publishing based on generated XML output
- The ability to create and maintain forms in minimum time
- A completely graphical user interface for adjusting forms, without the need for programming skills
||SAP Smart Forms - SAP's New Solution for Creating and Maintaining Forms in SAP Systems
In addition to SAP Smart Forms, mySAP.com applications and R/3 Release 4.6C contain a set of forms for central business processes. You will find forms for Customer Relationship Management (CRM) and Business-to-Business Procurement (BBP), as well as for the R/3 application components Sales and Distribution (SD), Financial Accounting (FI), and Human Resources (HR). While the system contains essential forms for each of these applications, covering them is beyond the scope of this discussion.¹
In this article, I will explain how the Internet affects form printing (i.e., mass printing) and provide you with an overview of the solutions offered by SAP within the scope of mySAP.com. I will go into detail about the three important benefits mentioned above, and also outline some of the important parts of the technical structure of SAP Smart Forms. But what does "form printing" mean, and what tasks are required of form printing in the Internet Age? Form printing includes:
- The design and layout of a form (e.g., an invoice, a salary payroll, an account statement, or a tax form)
- The adaptation of the form logic (e.g., "If the sum of the invoice is less than a certain value, then Text A shall be output" or "If the sum is greater than this value, then Text B shall be output")
- The preparation for an output medium (e.g., printer or fax); due to space constraints, physical output via out- put management will be left aside here
You might say, "In the Internet Age, it does not make sense to talk about printing." This is true. We will no longer print forms in the traditional sense, and Web browsers will become the standard output medium. Nevertheless, we still want to display the same content.
We meet this new challenge by offering a generated XML output of forms for Web publishing. Of course we have to design the form first, which will only take minimal effort. This requires a completely graphical user interface, without the need for script language or programming skills. In short, in this article I will give you an overview of the mySAP.com solution for all these needs - SAP Smart Forms.
Web Publishing Based on Generated XML Output
Consider the following typical scenario:
In the automobile industry, producers and vendors exchange forms, or 8D reports (see Figure 2). These reports document quality tasks, describe solutions for error corrections, etc. These days, different communication techniques and media are used during such complex processes - e.g., the producer sends a printed report to the vendor, the vendor fills out the report manually and sends it back via fax, and the producer has to type it again and often sends it back once more because of new questions. And this process might happen several times. But is this a cost-efficient and modern solution?
||An Automotive 8D Report
In the near future, with SAP Smart Forms and the Internet Age, the scenario will look like this:
The producer creates an SAP Smart Form for the 8D report, using the generated XML output and the SAP Business Connector for Web publishing; the vendor fills out the report in a Web browser and sends it back. So, communication is practiced via the Internet, any Web browser can be chosen as an output and input medium, the exchange format is standardized (XML), and the vendor is absolutely independent of the producer's system. The whole communication process is faster and much more cost-efficient.
Already in Release 4.6C, SAP Smart Forms deliver this generated XML output. In the next release, Cascading Style Sheets (CSS) support displaying the processed form in the Web browser (see Figure 3), and input fields for text and data will be implemented by eXtensible Stylesheet Language, or XSL (see Figure 4). In Figure 4, the price field can accept input, which means you could make changes to it directly in the Web browser. (An input check via tables or other checks, however, are not planned for the next release.) Designing the form, you will be able to define input fields simply by choosing attributes. For example, in the Smart Form you could mark the price field as accepting input. The system would then generate the relevant XML data stream, and the field would be ready for input in the Web browser.
||The Web Browser As Output Media on Forms
||Offline Data Entry in a Web Browser
From a technical point of view, a Document Type Definition (DTD) that describes the structure of the forms is defined for the generated XML output (see Figure 5). This DTD complies with the general XML specification of SAP. The XML data flow is generated and output is based on the form logic in the tree structure (I'll discuss this in more detail later) and the DTD.
||Example of Generated XML Output of a Processed Form
A Marketplace Vision
In the near future, it will be possible to procure goods and services using forms in a marketplace. This will simplify and speed up your work. The marketplace will contain the following capabilities and services:
- A large number of business templates for form printing, for use in different countries and industries, including the SAP Form Catalogue, which is currently under construction
- Form printing solutions, including SAP Smart Forms
- Partners that will provide form printing services (e.g., templates, form maintenance, consulting, application hosting)
- Customers who will be able to choose a form from a portal (such as the mySAP.com Marketplace), fill it out, and send it directly to the desired destination via the Internet
- Users who will be able to use drag- and-relate functionality to adjust data (XML format) in a preconfigured form
- Power users (no programming skills required) who will be able to change electronic forms in a Web browser
Let's now take a closer look at the benefits of the SAP Smart Forms tool.
The Ability to Manage Forms in Minimum Time
The SAP Simplification Group - in Palo Alto, California - conducted a market analysis, and here are the convincing results: during the implementation process, 60 percent of the time is spent on data retrieval, form logic maintenance, and testing, and 40 percent is spent on layout design, training, and going live. With these factors in mind, it becomes clear that a graphical user interface, and especially a graphical display of the form logic, can contribute significantly to reducing implementation costs - by perhaps 50 percent or more. Using SAP Smart Forms, you can adjust forms in minimum time. This allows you to considerably reduce the implementation costs of SAP systems.
The Graphical User Interface
The SAP Smart Forms tool includes an easy-to-use, intuitive, graphical Form Painter and a graphical Table Painter. (see Figure 6)
||The Design Area of the Graphical Form Painter
The graphical Form Painter provides a graphical display for creating and adjusting the form layout. Here are some of the highlighted features:
- Cursor position is shown in the ruler, which can be hidden and customized
- Position and size of an output area (window) is shown in the ruler
- Two-level customizable grid with alignment function
- Individual zoom factors and automatic zooming of the design window, depending on the window size
- Automatic scrolling of the design area
- Output areas (windows) can be sent to the background
- Toolbar with access to the essential functions can be detached from the design area
- Scanned forms can be used as the background in the design area and can also be printed Using the graphical Table Painter, (see Figure 7), you can draw tables and edit individual cells. The tables contain line breaks in single table cells, event control for table headers and subtotals, and data sorting before output.
||The Graphical Table Painter
Inside the Structure of SAP Smart Forms
In addition to form design, Smart Forms provide a graphical environment for changing the form logic. According to the architecture of Smart Forms, in which the data retrieval in the application program and the form logic in the Smart Form itself are strictly separated, you only have to change the logic within the Smart Form. Once you have done this, there is a range of test tools and services that you can use to check the Smart Form.
Changing the Form Logic
The form logic is represented in a hierarchical structure (tree structure) that consists of nodes, including nodes for global settings, text, output tables, and graphics. You can make changes to the nodes by using drag-and-drop and copy-and-paste techniques, as well as by selecting attributes and parameters on the relevant maintenance screen. In addition, you can use a context menu whose options differ depending on the node. There is no need for you to write a single line of code or to use a scripting language. Therefore, power users who have no programming knowledge, but are familiar with their application, can easily configure forms with data from SAP systems for their relevant business processes. This means that Smart Forms address a new and larger user community, not only saving you valuable time but also reducing the implementation costs of forms.
The Architecture of SAP Smart Forms
The form logic is entirely represented in an SAP Smart Form, and you can adjust this logic with graphical tools. The data of a Smart Form is provided by an application program, and it is passed via a function module interface (see Figure 8). When you activate a Smart Form, the system automatically generates a function module, which is processed at runtime. As a result, data retrieval and form logic are totally separated. If changes are made to the logic, only the Smart Form needs to be adjusted accordingly.
||SAP Smart Forms Architecture
As I said earlier, the form logic is represented in the Smart Form in a hierarchical structure (tree structure). This structure consists of nodes - for example, nodes for global settings, text, output tables, or graphics. In this hierarchy, the flow logic is shown from top to bottom, and nodes that appear on higher levels are known to the nodes further down (see Figure 9). This ensures that flow control is strict and unambiguous. This flow logic is used to process the form and determines, for example, which window will be output on a specific page at a particular time.
||The Tree Structure and Output Control of a Smart Form
To meet special requirements, programmable exits are available - for example, to call a function module created by the customer. Program SF_EXAMPLE_02, shown in Listing 1 on page 84, is an example of an application program. Aside from the data declaration (data...) and the data retrieval (select * ...), only two function module calls are necessary. Function module SSF_FUNCTION_ MODULE_NAME carries out the first- generation step and passes the corresponding Smart Form. The fm_name generated defines the relevant data transfer - in our example, the three tables customers,bookings, and connections. As you can easily see, no form logic is included!