
Getting Started
This unit provides a brief example of how you can design a Microsoft Visual Basic form for starting a workflow in the SAP System. This form starts a workflow that handles approval of a leave application. The form that we are about to design represents the leave application.
Prerequisites
Procedure
To familiarize yourself with Microsoft Visual Basic gradually, you should start with a simple Microsoft Visual Basic project that contains a form with controls and no additional Microsoft Visual Basic source code.
SAP Forms Designer will add all the definitions you need for starting a workflow with this SAPforms form. You do not need to write any line of source code for that.

In some cases, the SAPforms add-in might not be listed in the Add-Ins menu of Microsoft Visual Basic or in the Add-In Manager. This is the case, for example, if Microsoft Visual Basic is installed after you installed SAPforms. In this case do the following:
a) Close Microsoft Visual Basic
b) Open the MD DOS command prompt.
c) Open the Bin directory under SAPforms
d) Enter
WDFDES.EXE /R..e) Start Microsoft Visual Basic again.
The SAPforms Designer is called. The screen essentially consists of two areas:
The top area is still empty.
In the bottom area you find a table that contains an element from the leave request form in every line.
The Options dialog box of the SAPforms Designer is then displayed.
In the frame SAP Transmit Plug-In the value for the SAP Forms Transmit Plug-In Demo is now entered automatically in the Active Plug-In field.
The main window of the SAPforms Designer is then displayed again.
The top screen area contains a tree structure of the demo data structure. Choose + to display the fields in the structure.

Since you chose the SAPforms Data Plug-In Demo plug-in in step 8, a data structure stored for demonstration purposes is now displayed in the top control.
If you had chosen the SAPforms Data Plug-In for Workflow Container plug-in in step 8, the structure displayed would comprise the contents of the workflow container.
Choose a data field in the structure tree of the top control and drag it to the line in the table that contains the required control. If the binding was successful, the name of the SAP data field that is now linked to the control in the form appears in the Data Element column.
A dialog box with generation options is then displayed.
You will then return to the Microsoft Visual Basic development environment.
The runtime version of the form is displayed. The controls are empty initially.
Result
Normally this would start SAP Workflow.
Since you chose the SAPforms Data Plug-In Demo in step 8, the form is running in demo mode. This means that a window displaying the data that would normally be transferred to your R/3 System appears when you send the form.
If you had chosen the SAPforms Data Plug-In for Workflow Container in step 8, sending this form would have started a workflow. Since this would require extensive changes to settings in SAPforms and in the R/3 System, you should only use the Demo mode initially. The
Workflow Examples demonstrate how a workflow is started.