Skip to content

BAPI

This page shows how to use the BAPI extraction type.
The BAPI extraction type can be used to parameterize and execute SAP function modules and BAPIs for automation.

About Function Modules / BAPIs

Function modules are procedures that encapsulate and reuse global functions in the SAP system. SAP systems contain several predefined functions modules that can be called from any ABAP program. A Business Application Programming Interface (BAPI) is a remote function module that can access business data and processes of an SAP system from different systems.

Custom BAPIs

The use of custom BAPIs (Z function modules) is possible. Issues specific to Z function modules are not included in the scope of support provided by Theobald Software.

Prerequisites

Warning

Missing Authorization.
To use the BAPI extraction type, access to the designated authority objects (RFC) in SAP must be available. Adjust SAP Authority Objects: BAPI accordingly.

Create a BAPI Extraction

  1. In the main window of the Designer, click [New] to create a new extraction. The window "Create Extraction" opens.
    New
  2. Select an SAP Connection from the drop-down menu in Source and enter a unique name for your extraction.
  3. Select the extraction type BAPI and click [OK]. The main window of the extraction type opens automatically.

The majority of the functions of the extraction type can be accessed in the main window.

Look up a Function Module / BAPI

  1. In the main window of the extraction type, click [ ] to look up a Function Module / BAPI. The window "Function Module Lookup" opens.
    bapi_main-window_add
  2. In the window "Function Module Lookup" enter the name of the function module or BAPI . Use wildcards (*) if needed.
    Look-Up-BAPIs
  3. Click [ ] . Search results are displayed.
  4. Select a Function Module / BAPI and click [OK].

The application returns to the main window of the extraction type.

Define the BAPI Extraction Type

The BAPI extraction type offers the following options for defining parameters of a Function Module / BAPI:

  1. Add input parameters (data you want to send to SAP) in Imports, see Import Parameters.
    You can enter scalar values or structures .
    import-parameters
  2. Add output parameters (data you want to receive from SAP) in Exports, see Export Parameters.
    Select output by activating the checkbox next to the items.
    BAPI export parameters
  3. Optional: If available, define input and output parameters in Changings, see Changings Parameters.
  4. Add tables to the output of the extraction type or add table parameters to the input of the extraction type in Tables, see Table Parameters.

    • Click [ ] to check the names and data types of the table fields .
    • Activate the checkbox in the output column to add items to the output .
    • Click [ ] to edit the content of the table .

    BAPI table parameters

  5. Optional: If available, define which exceptions thrown by the Function Module / BAPI are ignored during runtime, see Exceptions.

  6. Check the General Settings before running the extraction.
  7. Click [OK] to save the extraction type.

You can now run the extraction, see Execute and Automate Extractions.


Last update: July 2, 2024