Defining and Generating a Binding: BAPIs 

Prerequisites

You have created a form in Visual Basic and have launched the SAPforms Designer as an add-in and are in the main window. The form controls are shown in the table displayed in the bottom control. You have selected the BAPI that you want to call. The interface description of the BAPI is displayed as a tree in the top control of the main SAPforms Designer window.

Procedure

You must now assign the individual parameters of the BAPI to the fields in the current Visual Basic form ("binding definition"). This assignment is stored as part of the form and is used at runtime to transfer data from the form to the R/3 System.

  1. Explode the BAPI structure to display the parameters.
  2. Assign (using "drag and drop") the parameter that you want to fill with the form to the form controls.
  3. You can release the binding by selecting the required row in the table and choosing Binding ® Release.

  4. Choose File ® Generate.
  5. The General tab on the SAPforms Options screen is then displayed.

  6. Select Insert initialization code in Load()- method and button to trigger the insert action.
  7. Choose OK.
  8. This is only recommended the first time you generate your form and if the form does not already have these buttons. Otherwise, you might receive an error when compiling the form because some of the declarations and event procedures are contained twice in the form. You must remove duplicate code from the form by hand.

  9. Choose File ® Exit to exit the SAPforms Designer.

Result

Your form is now complete. You can now start it in Visual Basic by choosing Run or compile an EXE file.

The procedure is the same if you are using the stand-alone version of the SAPforms Designer.