
Calling a BAPI
Use
The SAPforms interface allows you to call any
BAPI using a SAPforms form. As is the case with the workflow container, you can define a binding between fields in the SAPform form (form controls) and the BAPI parameters.You can also call function modules that are not BAPIs. To do so, however, the process type Remote Function Call Supported must be specified in the administration data of the function modules.
Prerequisites
BAPI Selection
If these parameters are not filled with data, the BAPI cannot be called. Import and export parameters of a BAPI can be displayed in the
BAPI Explorer.
Create a SAPforms form and process it with the SAPforms Designer
After you have
created the SAPforms form, you must prepare it for communication with the SAP System. This is the task of the
SAPforms Designer.
Features
The SAPforms form is filled out and sent to the SAP System. The BAPI parameters are filled with data from the form fields after you have logged on to the system. This method will be used here to create a new customer (synchronously).
In many applications, some of the parameters are not to be filled from the inputs in the form fields, for example, because the BAPI requires input data that is not entered by the agent, but rather must be determined by the system. In this case, the data can be filled in the background.
In the
CALLBAPI.VBP model, which is stored in the ...\SAPforms\Samples directory, this function is carried out by the CUSTOMER.TXT file (...\SAPforms\Forms). The file must be in the same directory as the EXE file compiled for this purpose.For more information, see
Example: Creating a Customer Master Record