
Calling the SAPforms Interface Directly
Instead of defining the interface selection and binding permanently using the
SAPforms Designer, you can also save this in the following way.
Note, however, that the SAPforms Designer is the simpler and faster method and is therefore recommended.
To understand this procedure, you should be familiar with the SAPforms components that are used here. These components correspond to Microsoft Visual Basic classes that must be instantiated in the Microsoft Visual Basic program.
These objects must be instantiated in the Microsoft Visual Basic program and initialized accordingly. You must then open the corresponding structure. Finally, you must define the bindings and transfer the data to the SAP System.
Procedure
You execute this activity in the SAPforms Designer when you are maintaining the plug-ins. Make sure that you only choose one reference for each object type.
1 Private Sub Form_Load()
2 Set objSAPForm = New SAPForm
3 Set objSAPForm.SAPData = New SAPData
4
5 Set objSAPForm.SAPXmit = New SAPXmit
6 End Sub
This source code uses what is called an "early binding". The term "late binding" refers to
Source Code Inserted by the SAPforms Designer.ObjSAPForm.SAPData.Value ([ContainerElement]) = [FormControl]
[ContainerElement]
stands for the name of a container element. [FormControl] stands for the name of the form control or a concrete value (as a string).This assignment should be made in the Click event (
Private Sub cmdStart_Click()) of the start or execute pushbutton, since the SAPforms form does not contain any values beforehand.ObjSAPForm.Start
If you want to use the SAPforms form to process a work item, enter
Execute (instead of Start).