SAP BAPI
Last updated
Last updated
The SAP BAPI Connector can be used to execute any published BAPI (standard or custom) in an SAP ABAP system, including HANA-based systems. Resulting table(s) are available as Flow variables.
The SAP BAPI connector require Microsoft C++ Runtime DLLs version 10.0 (contained in the Microsoft Visual C++ 2010 Redistributables). MSI installers for these runtimes can be obtained from here. This must be installed on the machine running Flow Server.
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
Application server address: URL or IP address of the target SAP system
System number: Enter system or installation number of target SAP system
System ID: Enter the System ID.
Client: Configured user will log in to specified client
Language: Configured user will log in with 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 a 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 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 Global runtime user is not specified, SAP username must be configured on the Flow user. For general information on Flow users, see here.
Username: Enter username of the SAP user
Password: Enter password of the SAP user. If 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 containing 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 it would be done if the user logged in using SAP GUI.
For more information on RFC security, see SAP?s official RFC security guide.
Using the SAP Connector for creating workflows
For details on design-time usage of the SAP connector, see here.
There are a couple of things that needs to be done before you can start using the SAP connector.
In short, these four steps needs to be done prior to creating workflows with the SAP connector (assuming that you of course already have installed the Flow Server):
Install the SAP GUI for Windows on the Flow server. This is necessary for Flow to be able to connect to SAP.
Verify that the connection between the Flow Server and SAP works, using the SAP Logon Pad.
Install the Novacura Flow Transporter package in the SAP environment you want to connect to. The Transporter package will install a couple of BAPIs that the connector need to generate an API tree in the Flow Studio. Download Transporter package here.
Make sure you have a license for the SAP Connector, read more; here.
Configure the SAP Connector in the Flow Studio, read more; here. TODO
Steps 3 to 5 are described below.
Designing a SAP workflow
If you want an example of a SAP workflow, you can find a simple workflow here, using the ABAP workbench BAPIs for Flight Booking: http://community.novacuraflow.com/product/sap-flight-booking-example/
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 youe 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 installatione 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 browse 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 configuration of the BAPI all:
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 singe 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 configure 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!