Activities
latest
false
Banner background image
Classic Integrations Activities
Last updated Apr 22, 2024

About the SAP BAPI Activities Package

The SAP BAPI Activities pack enables RPA developers to invoke a SAP Business Application Programming Interface (BAPI). The package comes with a scope activity, SAP Application Scope, that enables the user to connect to a SAP system and use a Invoke SAP BAPI activity to invoke a specified BAPI.

Installation Prerequisites

The 32bit (x86) .NET 4.0 Variant of the SAP Connector for Microsoft .NET 3.0 (NCo 3.0) is a prerequisite for this activity pack. This connector also requires the Microsoft C++ Runtime DLL version 10.0 (this is contained in the Microsoft Visual C++ 2010 Redistributable Package). Your SAP Administrator should be able to provide the installer.

Note: Please note that the SAP Connector for Microsoft must be installed in the Windows Global Assembly Cache (GAC) to work properly. This can be done by selecting the appropriate option during the installation of the SAP Connector.

These dependencies need to be installed on any machine on which you want to use this activity pack. This refers to both development machines, where workflows are created in Studio, as well as production machines, where the Robot executes such workflows.

The official documentation of the SAP .NET Connector can be found here.

Generating a SAP BAPI Workflow for versions v2.0.0 and above

First, you must configure a connection to the SAP system. After this step is performed, you can invoke multiple BAPI workflows before closing the connection.

Configuring a Connection

You can configure a connection to a SAP system using a Custom Application Server or a Group/Server Selection, as well as authenticate using User/Password or SSO. A set of valid parameters should be specified for both the Server and Authentication for a successful connection. An error message from SAP indicates any missing parameters.

Design Connection

Clicking the Configure button in the body of the SAP Application Scope activity opens a wizard which enables you to configure your connection to the SAP system at design-time.



Simply enter all of the credentials required for connection and click the Test connection button. If the connection is established successfully, a message appears, informing you of this.



Clicking Close in this message box closes the connection wizard and sets all the values you provided as credentials to their respective property fields, rendering the activity ready to use.

Note: The value for the Password field is not saved in the activity properties when exiting the connection window.

Robot Connection

You can also configure the Robot connection details by switching to the Robot Connection tab.



The details for the Robot connection can also be automatically copied over from the Design Connection tab by using the Copy to Robot Connection button.

Run Time

At run time, all the server credentials must be supplied as variables in their respective property fields. You can also use a IConnectionService object that contains all the connection details in the ExistingSAPConnection property fields.
Configuring the Invoke SAP BAPI Activity

Clicking the Configure button in the body of the Invoke SAP BAPI activity opens a wizard that enables you to choose and configure the BAPI you want to invoke.



The BAPI Name search bar can be used to find the BAPI you want to invoke. Once selected, the BAPI's mandatory parameters are added in the table below, where they can be edited.

Note: Parameters marked with * are mandatory and cannot be deleted.


The table is split into seven columns, as follows:

  • Name - The name of the parameter specific to the selected BAPI.
  • Description - A short description detailing the parameter.
  • Length - Maximum number of characters, if any.
  • Data Type - The variable or object type of the parameter.
  • Direction - Specifies whether a parameter is In, Out, or In/Out.
  • Value - The value of the parameter.
  • docs image - Deletes the parameter from the BAPI.

After configuring the parameters you want your BAPI to have, clicking Done closes the wizard and saves the configuration in the Invoke SAP BAPI activity. You can now run the process you have created.

Adding Parameters

You can add parameters one by one by using the Add Parameter text field in the bottom left part of the window to search the list of parameters and hitting Enter.

The Add Parameters button in the upper right area enables you to add any parameters you want into the BAPI invoke you are performing. Clicking the button switches to a list of all available parameters, where you can specify what parameters you wish to add by selecting their respective check boxes.



Exporting Parameters

The Export Parameters button exports all of the currently defined parameters and their metadata into an .xlsx file. Clicking the button opens a browsing window which lets you select where you want to save the file containing the exported data. This file can then be used as a template for creating input data files.

Generating a SAP BAPI Workflow for version v1.x.x

If you are using a version older than v2.0.0, you can access instructions on how to generate a SAP BAPI Workflow here.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.