This chapter provides a brief example of how to design a Visual Basic form for starting a workflow in the R/3 System. This form could start a workflow that handles approval of a leave application. The form that we are about to design represents the leave application.
Prerequisites
You have
installed SAPforms.Procedure
To familiarize yourself with Visual Basic gradually, you should start with a simple Visual Basic project that contains a form with controls and no Visual Basic code.
SAP Forms Designer will add all the definitions you need for starting a workflow with this form. You do not need to write any code for this purpose.
Work through the following steps:

In some cases, the SAP Forms add-in might not be listed in the Add-Ins menu of Visual Basic or in the Add-In Manager. This can happen, for example, if you installed Visual Basic after you installed SAPforms. In this case please do the following:
a) Close Visual Basic
b) Open the MD DOS command prompt.
c) Open the Bin directory under SAPforms
d) Enter
WDFDES.EXE /R ..e) Start Visual Basic again.
The main window of the SAPforms Designer is then displayed. This window essentially consists of two large controls.
The top control is still empty.
The bottom control - a table control - contains a list of the elements in the "leave request" form.
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 control of the main window contains a tree structure of the demo data. Click on the "+" 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. Select the first two options Insert initialization code in Load()- method and button to trigger the insert action.
You will then return to the Visual Basic development environment.
The runtime version of the form is displayed. The controls are empty initially.
Result
Normally this would start the SAP Workflow functionality.
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.