Adding a Program Variable
To add a program variable:
The Generator suggests a variable name for the field in the Name field.
The Generator inserts a variable declaration and related code. This code varies depending on whether you requested an input or output variable. For an input variable, the Generator assumes you want to transfer a value to an input field in an SAP screen. As a result, you get code like:
Dim DevClassVal As String
bOK = Sap.SetControlValue(iCtrl, DevClassVal)
where the requested variable is used as the source field for an assignment to the currently selected control. When adapting the program, of course, you must ensure that the input variable has the correct value (probably from an external interface).
For an output value, the Generator assumes you want a variable to be used as a target field. The corresponding control is the source field in the assignment:
Dim PostalCode As String
PostalCode = Sap.Controls(iCtrl).Value