SAP ERP on HANA Setup Guide link
Follow these instructions to replicate your SAP ERP on HANA database to your destination using Fivetran.
Prerequisiteslink
To connect your SAP ERP on HANA database to Fivetran, you need:
- SAP ABAP version 7.5 and above
- SAP ABAP must be Unicode-compliant
- SAP HANA version 2.0 SPS3 and above
- Download and install the Fivetran NetWeaver API. For more information, see section Import Fivetran NetWeaver API
- A SAP Communication or System user with the following permissions/authorizations:
RFC access to standard SAP functions to establish connection:
AUTHORIZATION OBJECT AUTHORIZATION FIELD AUTHORIZATION VALUE S_RFC ACTVT 16 RFC_TYPE FUGR RFC_NAME BTCH
RFC1
SDIFRUNTIMEAUTHORIZATION OBJECT AUTHORIZATION FIELD AUTHORIZATION VALUE S_RFC ACTVT 16 RFC_TYPE FUNC RFC_NAME RFCPING RFC access to the Fivetran function groups:
AUTHORIZATION OBJECT AUTHORIZATION FIELD AUTHORIZATION VALUE S_RFC ACTVT 16 RFC_TYPE FUGR RFC_NAME /FIVETRAN/SAPAPPCONNECT
/FIVETRAN/TRIGGERSAuthorization required for batch process administration to schedule background jobs:
AUTHORIZATION OBJECT AUTHORIZATION FIELD AUTHORIZATION VALUE S_RFC ACTVT 16 RFC_TYPE FUGR RFC_NAME S_BTCH_JOB AUTHORIZATION OBJECT AUTHORIZATION FIELD AUTHORIZATION VALUE S_BTCH_ADM BTCADMIN Y AUTHORIZATION OBJECT AUTHORIZATION FIELD AUTHORIZATION VALUE S_BTCH_JOB JOBACTION RELE JOBGROUP * Data access authorizations:
The S_TABU_SQL authorization object can be used to manage access rights for every data table in the SAP database. This authorization object consists of four fields namely - ACTVT (activity), DBSID (database name), TABOWNER (database user), TABLE (name of the database table).To grant full access, apply the following settings:
Authorization Object Authorization Field Authorization Value S_TABU_SQL ACTVT 33 DBSID * TABOWNER * TABLE * To restrict access, add separate values for each individual table. As an example, the following configuration grants access to the BSEG table:
Authorization Object Authorization Field Authorization Value S_TABU_SQL ACTVT 33 DBSID * TABOWNER * TABLE BSEG Fivetran needs access to specific HANA tables. If data access is generally restricted, access rights must be enabled for the following tables:
Authorization Object Authorization Field Authorization Value S_TABU_SQL ACTVT 33 DBSID * TABOWNER SYS TABLE DUMMY
HAS_NEEDED_SYSTEM_PRIV*
M_CS_TABLES
M_OBJECT_LOCKS
M_TABLES
M_DATABASE
M_SERVICES
P_GRANTEDPRIVS_
P_OBJTYPES_
P_PRINCIPALS_
P_PROCEDURES_
P_SCHEMAS_
P_TRIGGERS
TRIGGERS
_SYS_GRANTED_OBJECTS
_SYS_GRANTEE_OIDS
_SYS_SCHEMAS_WITH_PRIVILEGES_OIf triggers are used to capture deletes and data access rights are restricted, Fivetran needs additional read access for the shadow tables where delete information is stored:
Authorization Object Authorization Field Authorization Value S_TABU_SQL ACTVT 33 DBSID * TABOWNER * TABLE /FIVETRAN/DELETES_*
We provide files with examples of default authorisation roles in section Import NetWeaver API.
Setup instructionslink
Import Fivetran NetWeaver APIlink
To import the Fivetran NetWeaver API containing Fivetran’s ABAP functions, use your company's default method. This will enable data transfer between the SAP system and Fivetran.
NOTE: While importing, you may need to use the Ignore Invalid Component Version option to suppress import errors.
The Fivetran NetWeaver API can be downloaded from the connector setup form as well as from the Account Settings -> Downloads menu.
The Fivetran NetWeaver API also includes files containing sample authorization roles that can be uploaded using transaction PFCG
:
/FIVETRAN/SYS
– system role with RFC access rights and data access rights to technical tables/FIVETRAN/TRIGGERS
– additional access to trigger functions for the “trigger deletes capture” scenario/FIVETRAN/DATA_FULL
– role with full data access
Receiver namespacelink
Fivetran-specific ABAP code is created in the /FIVETRAN/
namespace. The Fivetran NetWeaver API automatically manages this namespace.
Determine connection detailslink
All connection methods require the following 5 fields:
- host (IP address or DNS)
- sysnr (2 digits, used to compute the port for the RFC connection)
- client (3 digits)
- user
- password
Choose connection methodlink
Currently, we support the following Database Connection options from Fivetran to your SAP Application Server:
IMPORTANT: You must install the Fivetran NetWeaver API on your SAP Application.
SSH connection methodslink
Fivetran connects to a separate server in your network that provides an SSH connection to your SAP Application Server. You must connect through SSH if your SAP Application Server is in an inaccessible subnet.
All connection methods require the basic SSH setup on your source system. Follow our SSH connection instructions.
NOTE: If Reverse SSH tunnel or VPN tunnel is required, contact our support team as additional steps are required to set up the connector.
IMPORTANT: If Reverse SSH Tunnel is required, then the SSH High Port should be computed as
3300 + <SYSNR>
. For example, ifSYSNR=00
, then the SSH High Port is3300
. Currently, this connection is restricted to using this port only.
SAP date to LocalDate conversionlink
NOTE: This feature is available from Fivetran NetWeaver API version 1000202.
By default, we convert SAP DATS data type to String.
When you set the Enable SAP date to LocalDate conversion toggle to ON, we do one the following, depending on the column's type: - For primary key columns - we keep the original column as a String type and create a new column with the original column's name appended by the suffix _DATE
, with its values converted from DATS to LocalDate type. - For non-primary key columns, we always convert the original values to LocalDate type.
When we attempt to convert a DATS value but the date is invalid, we do one of the following, depending on the value:
- For the SAP's default value
00000000
and an empty string value, we set the converted value tonull
. - For other invalid dates, for example, when the number of months in date value
20241301
is larger than 12, we set the value to the default date1970-01-01
.
This feature follows the general data mapping workflows.
Finish Fivetran configurationlink
In your connector setup form, enter a destination schema prefix. This prefix applies to each replicated schema and cannot be changed once your connector is created.
Install the Fivetran NetWeaver API on your SAP system.
In the ASHOST field, enter the hostname or IP address of your SAP application server.
In the SYSNR field, enter a 2-digit instance number of your SAP system.
In the CLIENT field, enter a 3-digit SAP system client number.
In the USER field, enter the username of your SAP Application.
In the PASSWORD field, enter the password associated with the specified username.
For the Connection Method, SSH tunnel is currently the only available option. Provide the following information:
- SSH Host (do not use a load balancer's IP address/hostname)
- SSH Port (the default port number is
22
) - SSH User
Make a note of the Public Key - you will need it to complete your setup.
(Optional) To convert SAP DATS data type fields to LocalDate fields, set the Enable SAP date to LocalDate conversion toggle to ON.
Click Save & Test. Fivetran tests and validates the connection to your SAP system. Upon successful completion of the setup tests, you can sync your data using Fivetran.
Setup testslink
Fivetran performs the following tests to ensure that we can connect to your SAP system and that it is properly configured:
- The
Connecting to SSH Tunnel
test validates the SSH tunnel details provided in the setup form. It then checks that we can create an SSH tunnel to your SAP Application Server. - The
Validating Credentials
test checks the SAP Application credentials provided in the setup form. - The
Validating SAP source Connection
test ensures Fivetran can connect to the SAP system. - The
Checking authorizations and retrieval processes
test ensures the correct authorization permissions are set and retrieval processes can be created. - The
Checking Fivetran NetWeaver API version
test ensures that selected options are supported by the installed Fivetran NetWeaver API in the SAP system.
NOTE: The tests may take a few seconds to finish running, up to a minute.
Configure Fivetran in SAPlink
Fivetran has a number of configuration parameters that can be used to tune and optimize the data extraction. These parameters can be accessed using the SAP transaction - /N/FIVETRAN/CONFIG
.
NOTE: In most cases, the parameters can be left with the default values.
Available parameters are:
Config | Description |
---|---|
Max wait background, microsec | Maximum runtime timeout for a background operation (default=60'000'000) |
Max wait foreground, microsec | Maximum runtime timeout for a foreground operation (default=60'000'000) |
Version | Current Fivetran NetWeaver API version |
Max wait active DB read, microsec | Inter-process timeout for active DB communication (default=100'000) |
Max wait passive DB read, microsec | Inter-process timeout for passive DB communication (default=1'000'000) |
Max wait passive RFC read, microsec | Inter-process timeout for passive RFC communication (default=30'000'000) |
Memory tunnel size, byte | Inter-process buffer size for communication (default=1'024) |
SAP Archiving job users | If the box is checked, then you can specify a list of SAP users related to the SAP archiving process. See our Handling deleted data during SAP archiving process documentation for more information. IMPORTANT: Once checked, this box cannot be un-checked. This option is applied at the SAP source. |
Max size uncompressed, byte | Maximum data package size when retrieving data during import (default=500'000'000) |
DB Connection Name | Used for secondary DB connections. Otherwise, keep default=DEFAULT |
Application server | Specify name of a dedicated application server (default=NONE) |
Logging - Activate event log | Enable event logs to be stored (default=off) |
Logging - Activate RFC trace | Enable RFC tracing logs (default=off) |
Searching for tableslink
Given a large number of tables SAP offers, it is not feasible to return the full list of tables directly. Instead, the user needs to specify the tables or views to be imported manually. This can be done in the following way:
- comma-separated values, e.g.
T000, T001, T002
(Spaces are optional, they are ignored internally
) - patterns, e.g.
T00*
,DD0*
- combinations of the above, e.g.
VBAK, T00*, DD0*
It is also possible to adjust the list of selected tables in the connector's dashboard under the Schema tab.
You can search for row-store transparent tables, column-store transparent tables, and views. See Replication of views and row-store tables for more information.
Related articleslink
description Connector Overview
account_tree Schema Information