SAP BAPI package

The SAP BAPI package contains actions to automate tasks and processes using SAP Business Application Programming Interface (BAPI). BAPI is a standardized method that enables a third-party application to interact with an SAP system.

Overview of SAP BAPIs

Business Application Programming Interfaces (BAPIs) are APIs that enable external applications to access SAP business objects.

Typically, a BAPI consists of the following parameters:

  • Import parameters: Used to receive data from the calling applications.
  • Export parameters: Used to return data to the calling application.
  • Import/export table parameters: Tables used for both receiving data and returning data.

A parameter can be of the following type:

  • Data element: Scalar data type
  • Structure: Typically contains multiple fields

    If an import parameter is of the type structure, you can pass multiple values as key-value pairs.

  • Table: A data structure that contains more than one row

For a BAPI method to work, the calling application can call the method in a BAPI using the following:

  • BAPI name
  • Import parameters (scalar, structure, table)
  • Export parameters (scalar, structure, table)

Before you start

Note: Download the SAP Java connector package and DLL from the SAP website. This is required when using the Connect action.
Perform the following actions within the SAP BAPI package as part of using the set of available actions:
  1. Establish a connection with the SAP application using the Connect action.
  2. Use the Create function action to create a user-defined function for the specified SAP BAPI function.

    Select the Begin sequence option to mark the start of a process followed by the actions to automate a task.

  3. Use the Run function action to run the function you have created using the Create function action.

    Select the End sequence option to mark the end of a process and the Commit transaction option to commit the changes.

Actions in the SAP BAPI package

The SAP BAPI package includes the following actions:

Action Description
Connect Using Connect action for SAP BAPI.
Create function Create function action.
Get field value Get field value action.
Get structure Get structure action.
Get table Get table action.
Run function Run function action.
Set field value Set field value action.
Run standard workflow Run standard workflow action.
Run custom workflow Run custom workflow action.

Build sample bots using the SAP BAPI package

If you are getting started with the SAP BAPI package, a good place to start is to build some sample bots with the help of the following tutorials. The tutorials are intended to train you on how to use various actions from the SAP BAPI package to invoke SAP BAPIs, pass import parameters, and retrieve data from export parameters.