SAP BAPI

The SAP BAPI Connector can be used to execute any published BAPI (standard or custom) in an SAP ABAP system, including HANA-based systems. The resulting table(s) are available as Flow variables.

No additional installation is required if Flow is provided as a Cloud service.

Configuration

Go to the Environment/Connectors section in Flow Studio and Add a new connector. For parameter details, see below.

  • Name: Your own name of the connector. For easy connector identification in design time, include the name of the target SAP system.

  • Type: Choose 'SAP BAPI Basis rel 740+' if your SAP system has at least SAP Basis release 740 or higher, otherwise choose "SAP BAPI Basis legacy

  • Application server address: URL or IP address of the target SAP system

  • System number: Enter the system or installation number of the target SAP system

  • System ID: Enter the System ID.

  • Client: Configured user will log in to the specified client

  • Language: Configured users will log in with the specified language. Note that BAPIs called from Novacura Flow must be enabled for the language specified.

  • Global runtime user: If specified, this username will be used every time Flow connects with the target SAP system. For license audit, traceability, and security reasons, Novacura recommends that Global users are only used with caution and only in automated scenarios, i.e. without user interaction, for instance when using Flow as an integration engine, together with an SAP service or system account designated for the specific scenario.

  • Global runtime password: Password of global user.

  • Design time user name: Design-time user which is only used in Flow studio when developing the Flow.

  • Design time password: Password of design time user

  • Logging path: If specified, any logs produced by the connector will be written to the specified path. Please note that this path is relative to Flow Server and that the user that the Flow Server is running as must have write access to the path.

  • Advanced configuration: Depending on your environment, you may need to add additional details, such as specific network or security settings.

Personal user configuration

If the Global runtime user is not specified, the SAP username must be configured on the Flow user. For general information on Flow users, see here.

  • Username: Enter the username of the SAP user

  • Password: Enter the password of the SAP user. If the SAP password is not supplied, the Flow login dialogue will ask for the SAP password to use for the session.

Authorization requirements for SAP users connecting from Flow

Authorization object S_RFC contains the following :

  • Activity 16 (Execute)

  • RFC_NAME: /NOVACURA/*, BAPI*, SYST, RFCPING, RFC1, RFC_GET_FUNCTION_INTERFACE, RFCH, RFC_GET_UNICODE_STRUCTURE

  • RFC_TYPE: FUGR and FUNC

On top of this, the S_RFC authorization must also contain the function group and the function module being called, as well as any authorization needed to pass authorization checks in any of the called programs, including authorization for the applicable organization level (for example purchasing organization).

Security considerations

The SAP BAPI Connector is using the standard SAP authorization concept. The connector always logs in to the SAP system through RFC with a user that is set up and active in the SAP system as a dialog, system, or service user. Any authorization object checks will be performed the same way they would be done if the user logged in using SAP GUI.

Getting started

There are a couple of things that need to be done before you can start using the SAP connector.

  1. Verify that the connection between the Flow Server and the SAP system is open.

  2. Download the Novacura Flow add-on (for basis releases 753 and above) or the Novacura Flow Transport package (for older basis releases)

  3. Import transports or add-ons to your SAP system

  4. Make sure you have a license for the SAP Connector

  5. Configure the SAP Connector in the Flow Studio

Designing an SAP workflow

Make sure you have these BAPI in your SAP environment before you use this workflow.

When in the Flow Studio, adding a Machine Step to your workflow will let you create a connection to SAP. After selecting the SAP connector you have defined in Environment/Connectors, you will be able to configure a method call to SAP with the following steps.

Get the list of BAPIs: When selecting your SAP connector in the list of available connectors, press the button with the three dots. This will connect to your SAP environment and generate the entire BAPI tree in the connector. So whatever BAPIs you have in your installation of SAP will be accessible directly from Flow.

Select a BAPI: After the generation of the BAPI tree is done, you will see all BAPIs arranged in a folder structure. You can find the BAPI you need by either browsing through the structure or by searching for the BAPI using the Filter option.

Configure the BAPI call (Input):

There are three tabs that can be used for the configuration of the BAPI call:

  • Import: input data do the BAPI

  • Export: output data from the BAPI

  • Tables: both input and output. One or many tables can be used here.

First, define the input. You can either set fixed data by just typing the value you need or by using existing (single) variables in the workflow. Note that Input can be set both on the Import and Tables tabs.

Configure the BAPI call (Output): All data coming out from the called BAPI will end up in the Target Variable, so the Target Variable must be set (as in all Machine Steps returning data). There are two tabs for output; Export and Tables. Export are single variables returned from the BAPI. Tables are table variables returned from the BAPI. Depending on the BAPI, Export, and Tables will look and function differently.

Configuring Commit step

Selecting check box This step modifies data will ensure that a BAPI commit step is executed. Check this box for any BAPI that updates or inserts data in the ECC system. For a BAPI that only reads data, it can be left unchecked.

When you have configured the BAPI call, you can test it using the Play button on the top right of the Application Window in the Studio.

Error handling

SAP returns errors as output from the BAPI. This means that you will need to handle errors from SAP in the workflow. Like this:

So, now you can create any app directly on top of your SAP environment!

Last updated