Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 


In this blog post I would like to introduce you to the BAPI SDK which is available with the September release (2109) of SAP Intelligent RPA 2.0. I will explain how to execute a BAPI from SAP Intelligent RPA using this SDK.

Let’s start off with a brief introduction of BAPI.

What is BAPI:

BAPI is a standard interface to the business object models in SAP products. In the SAP system, BAPIs are stored as RFC (Remote function call) capable function modules in the ABAP workbench function builder.

Client programs that use BAPIs to access SAP business objects can be part of the same SAP system, part of an external system (for example, a .Net application), part of an HTTP Gateway, or part of another SAP system. To execute any BAPI user needs to pass import, table and changing parameters.

You can also refer to the detailed documentation from if you want more details about BAPI.

What is BAPI SDK:

The SAP BAPI SDK package is a collection of activities allowing you to automate processes in SAP system by calling BAPI. SDK package consist mainly three types of activities.

  1. Set and Close SAP connection

  2. Execute BAPI

  3. Commit all transaction on SAP connection


  1. Latest desktop agent should be installed. i.e., desktop agent of SAP Intelligent RPA 2109

  2. For Set SAP Connection (SSO) SDK BAPI activity, SSO (SAP Single Sign-On) must be configured on your system

Steps to follow:

Here we are going to create Purchase requisition order using “BAPI_PR_CREATE”. It has following import, table and export parameters.

We will be using PRHEADER, PRHEADERX from import parameters and PRITEM, PRITEMX from table parameters.

  1. Set SAP connection (Basic or SSO): Use Set SAP connection (Basic/SSO) activity to set connection. Input parameters of activity can be found under properties of sap system.

  2. Create parameters of BAPI: All import and changing parameters are in form of structure(object) and all table parameters are in form list of structure(object).

    1. Create Import data type by name Import_PR (datatype name can be anything) as shown in picture.

    2. Create Table data type by name Table_PR as shown in picture

    3. Drag and drop the Import_PR data type to create an Import_PR variable and fill the values.

    4. Drag and drop the Table_PR data type to create a Table_PR variable and fill the values.

  3. Execute BAPI with above connection and parameters: Drag and drop Execute BAPI activity and fill the input parameters.
    Outputs parameter is for response of execute BAPI, user can pass comma separated parameters name. if nothing is pass in outputs then entire BAPI response will be return else provided parameters response will be returned in JSON format.

  4. Commit BAPI and Close Connection:

    This is last step of automation. In this we will commit all the transaction done on sap connection and close the connection.

Find more information on SAP Intelligent RPA: