Starting Workflows with Electronic Forms 

Use

An electronic form that is available locally on the PC or via a server is executed by an employee and sent to the R/3 System.

The task (single or multistep task), whose ID was specified when the form was defined, is then started in R/3. The corresponding import elements of the container for this task are then supplied with input data from the form.

Prerequisites

Extend Container

The workflow and/or task container must be extended to include those elements that are to be filled using the electronic form. These elements must be defined as elements with a field reference. At present, object references cannot be filled using a form.

Create a Form and Process it with the SAPforms Designer

After you have created the electronic form, you must prepare it for communication with the R/3 System. This is the task of the SAPforms Designer.

Features

Starting tasks

The form is sent to the R/3 System after it has been started and filled with data.

If the task is a multistep task, the workflow container is filled with the values received from the form. These values are transferred to the method container via the task container of the corresponding task. The method then usually creates an object.

Information for a leave application, for example, can be submitted using the form. The CreateWithoutDialog method is then executed in the background in the workflow and creates an object of the type "leave application" from this data. A predefined approval procedure can be carried out in the remaining steps of the workflow. See Workflow Examples.

The intermediate step via the workflow container does not apply to single-step tasks.

Data Transfer to the R/3 System

Data can be transferred to the R/3 System either synchronously or asynchronously. This is defined with the form.

Data Transfer by RFC (Synchronous Communication)

The following steps are processed after the form has been executed:

  1. When the Submit button is selected, an R3F file is generated from the form data.
  2. R3F ( R/3 Form) is a file format that is used to transfer workflow information from an R/3 System to a form and vice versa.

  3. The R3F file is transferred to the R/3 System via RFC. Here, the data in the file is transferred to the task container by means of a function module call.
  4. If the user who has logged onto the system via RFC is one of the possible agents of the task specified in the parameters, the task is started.

This type of data transfer should be selected whenever a network connection can be set up from the user’s PC to provide online access to the R/3 System via RFC. SAPGUI does not need to be installed on the PC in question.

Data Transfer by Internet Mail (Asynchronous Communication)

The following steps are processed after the form has been executed:

  1. When the Submit button is selected, an Internet mail with an R3F attachment is created and transferred to the background user (usually WF_BATCH ) of the logical destination WORKFLOW_LOCAL_<Clt.> in the inbound distribution function.
  2. The background user WF_BATCH forwards the incoming message to the "handler for messages to work items".
  3. The handler transfers the data in the R3F attachment to the container of the task to be started by calling a function module.
  4. If the sender of the mail is one of the possible agents of the task specified in the attachment, the task is started.

Each of the users involved must maintain the automatic forwarding function correctly, otherwise this check will not be successful. The significance of the automatic forwarding function will be explained with other prerequisites in SAPforms Administration.

In mail systems with offline capability (for example Microsoft Exchange), the mails are always transferred as soon as the user establishes a connection to the mail server. You can, therefore, submit your form even if your PC is currently not connected to the Exchange Server.

Exception Handling

If an exception should occur in one of the steps described above, the person who processed the form is notified via RFC or mail. The two most common exceptions are: