Show / Hide Table of Contents

    SAP Wizard

    This article describes the usage of the SAP Wizard to complete methods based on the definition of SAP BAPI's. With the help of the wizard, it is easy to generate a proper interface script with accompanying fields that the SAP interface can utilise to execute the selected operation. In the paragraphs below an example is provided showcasing the different steps to take.

    SAP Wizard

    Note

    The assumption in this article is made that a working SAP profile exists. See the article/paragraph The Profiles Screen for more information if help is needed for creating a profile.

    Initial Configuration

    First, an object with a method for data retrieval or modification must be present. Make sure that the method has the SAP template selected.

    For example:

    1. Create the object SAP Wizard Demo and add method Get All Customers.
    2. Set the template to SAP.

    Initial Configuration - Create Method

    There is no need to provide fields upfront, the wizard will create and add them based on the selected BAPI definition.

    Open the Wizard

    Make sure the method is selected and click on the Start Wizard button in the ribbon.

    Start Wizard

    Then select the right profile to connect to the SAP system, and click on the OK button.

    Profile Selection

    The wizard dialog, as the one shown in the beginning of this article, is opened.

    Select the BAPI

    The dialog consists of several parts:

    SAP Wizard Parts

    1. The Save and Close buttons. Clicking on Save will make the wizard to generate the interface script, and add new or update existing fields. The Close button closes the wizard.
    2. Filter condition to limit the BAPI's shown in the BAPI list (see 3).
    3. BAPI list. Initially shows all available BAPI's on the SAP server. With a filter condition (see 2), a limited selection can be displayed.
    4. Input fields of the BAPI. Used for defining a mapping between the method input fields and the BAPI input fields.
    5. Output fields of the BAPI. Used for defining a mapping between the method output fields and the BAPI output fields.

    BAPI List Filtering

    BAPI Filtering

    1. In the filter field, the value customer is entered.
    2. The BAPI list is automatically updated and displays only the BAPI's containing the value in their names.

    BAPI Selection

    After selecting a particular BAPI, the wizard shows the input and output fields of the BAPI:

    BAPI Selection

    Field Mappings

    First, select the BAPI fields that must be mapped to the method fields.

    Warning

    By default, the wizard adds the mapped fields to the object level and which are in turn selected as either method input or method output field.

    However, make sure that the shared field has the same level everywhere. This means when an object field is selected or already existing, make sure that every other field is also set as an object field, and that method fields are always set as method fields. Mixing up those levels can result in wrongly generated field definitions which must be fixed by hand.

    Field Selection

    Modify Mappings

    After field selection, several adaptations can be made on a field mapping to make everything more readable or consistent within the solution.

    For example, the field names have been changed to a more readable form. The real BAPI field name will be saved to the external name of the object/method field. Also it is possible to let the wizard only generate a method field instead of an object field that will be activated on method level. That can be done by clicking on the level button in (1). In the example, the field Customer Id is set as a method-only field, while the other fields Customer Name are object fields.

    Field Mapping Adaptation

    Note

    It is possible to have 2 different BAPI fields, input and output, mapped to the same object/method field. The wizard will handle such definitions by the external names of the respective fields.

    Save And Generate

    Now click on Save and the wizard will start adding the fields and generate the interface script.

    Based on the example mapping of the previous paragraph, the SAP Wizard will generate the following result.

    Object Fields

    The field Customer Name is defined as an object field:

    Object Field Definitions

    Method Fields

    On the method level, the method input field will be taken from the object level. Additionally for the output fields:

    1. The external name of the field Customer Name is changed to the BAPI output field name.
    2. The field Customer Id was only set to be a method field and therefor only exists on the method level.

    Method Field Definitions

    Back to top Copyright © OMETA
    Integrating systems ● Connecting people