Entering content frameFunction documentation Starting Workflows with SAPforms Forms Locate the document in its SAP Library structure

Use

An SAPforms form that is available locally on the PC or from a server is executed by an employee and sent to the SAP System.

The task or workflow whose ID was specified when the SAPform form was defined, is then started in the SAP System. The corresponding import elements of the container for this task or workflow are then supplied with input data from the SAPforms form.

Prerequisites

Extend Container

The workflow and/or task container must be extended to include those elements that are to be filled using the SAPforms 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 SAPforms form, you must prepare it for communication with the SAP System. This is the task of the SAPforms Designer.

Features

Starting workflows or tasks

The SAPforms form is sent to the SAP System after it has been started and filled with data.

If the task is a workflow of the workflow container, it is filled with the values from the form. These values are transferred to the task container of a task using a binding, with which a suitable object can be created. A binding from the task container to the method container is also necessary within the task.

Example

Information for a leave application can be submitted using a form. An activity is then executed in the started workflow which executes the CreateWithoutDialog method in the background. This method creates an object of the leave application type from the data. A predefined approval procedure can be carried out in the remaining steps of the workflow. For more information on this scenario, see Workflow Examples.

When starting a task as a single-step task, the data is transferred directly to the task container. There must be a binding to the method container so the method used in the task receives the data for processing.

Data Transfer to the SAP System

Data can be transferred to the SAP System either synchronously or asynchronously. This is defined with the SAPforms form.

This graphic is explained in the accompanying text

Data Transfer by RFC (Synchronous Communication)

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

  1. By choosing the Submit pushbutton, an R3F File is generated from the form data.
  2. The R3F file is transferred to the SAP System using RFC. Here, the data in the R3F file is transferred to the task container by means of a function module call.
  3. If the user who has logged onto the system using RFC is one of the possible agents of the task/workflow specified in the parameters, it 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 SAP System using RFC. SAPGUI for Windows 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 SAPforms form has been executed:

  1. By choosing the Submit pushbutton an Internet mail with an R3F attachment is generated. This is transferred in inbound processing of the SAP System to the background user (generally WF_BATCH ) of the logical destination WORKFLOW_LOCAL_<Clt.> .
  2. The background user 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 or workflow to be started by calling a function module.
  4. If the sender of the mail is one of the possible agents of the task/workflow specified in the attachment, the task/workflow is started.

Caution

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 Mail Server.

Exception Handling

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

Leaving content frame