ODBC Driver for SAP ERP

Build 22.0.8462

Linux DSN Configuration

This section describes how to set up ODBC connectivity and configure DSNs on several Linux distributions: Debian-based systems, like Ubuntu, and Red Hat Linux platforms, like Red Hat Enterprise Linux (RHEL), CentOS, and Fedora.

Minimum Linux Versions

Here are the minimum supported versions for Red Hat-based and Debian-based systems:

OSMin. Version
Ubuntu11.04
Debian7
RHEL6.9
CentOS6.9
Fedora13
SUSE12.1

Installing the Driver Dependencies

Run the following commands as root or with sudo to install the necessary dependencies:

  • Debian/Ubuntu:
    apt-get install libc6 libstdc++6 zlib1g libgcc1
  • RHEL/CentOS/Fedora:
    yum install glibc libstdc++ zlib libgcc

Here are the corresponding libraries required by the driver:

Debian/Ubuntu PackageRHEL/CentOS/Fedora PackageFile
libc6glibclinux-vdso.1
libc6glibclibm.so.6
libc6glibclibrt.so.1
libc6glibclibdl.so.2
libc6glibclibpthread.so.0
libc6glibclibc.so.6
libc6glibcld-linux-x86-64.so.2
libstdc++6libstdc++libstdc++.so.6
zlib1gzliblibz.so.1
libgcc1libgcclibgcc_s.so.1

Installing the Driver

You can use standard package management systems to install the driver.

On Debian-based systems, like Ubuntu, run the following command with root or sudo:

dpkg -i /path/to/driver/setup/SAPERPODBCDriverforUnix.deb 

On systems that support the RPM package format, run the following command with root or sudo:

rpm -ivh /path/to/driver/SAPERPODBCDriverforUnix.rpm 

Licensing the Driver

Run the following commands to license the driver. To activate a trial, omit the <key> input.

cd /opt/cdata/cdata-odbc-driver-for-saperp/bin/
sudo ./install-license.sh <key>

Connecting through the Driver Manager

The driver manager loads the driver and passes function calls from the application to the driver. You need to register the driver with the driver manager and you define DSNs in the driver manager's configuration files.

The driver installation registers the driver with the unixODBC driver manager and creates a system DSN. The unixODBC driver manager can be used from Python and from many other applications. Your application may embed another driver manager.

Creating the DSN

See Using unixODBC to install unixODBC and configure DSNs. See Using the DataDirect Driver Manager to create a DSN to connect to OBIEE, Informatica, and SAS.

Connecting with the RFC APIs

The CData ODBC Driver for SAP ERP uses the SAP RFC interface to connect to an SAP system. The ConnectionType specifies the RFC API you want to use to connect.

Obtaining the SAP libraries corresponding to your RFC API is required to connect.

Connect Using the Classic RFC SDK

To use the Classic RFC SDK without Unicode support provided with the library librfc32.dll, set ConnectionType to Classic. Simply place the assembly in a location where it will be accessible at run time, such as the system32 or bin folder or your path.

Connect Using the Classic RFC SDK with Unicode Support

To use the Classic RFC SDK with Unicode support provided with the library librfc32u.dll, set ConnectionType to Classic_Unicode. The following libraries from the RFC SDK must also be available at run time, in addition to librfc32u.dll:

  • icudt34.dll
  • icuin34.dll
  • icuuc34.dll

Connect Using the NetWeaver RFC SDK

To use the NetWeaver RFC SDK provided with the library sapnwrfc.dll, set ConnectionType to NetWeaver. The following libraries from the RFC SDK must be available at run time, in addition to sapnwrfc.dll:

  • icudt34.dll
  • icuin34.dll
  • icuuc34.dll
  • libicudecnumber.dll
  • libsapucum.dll

Connect Using SOAP Interface and RFC URL

To connect using the SOAP interface, set the following:

  • ConnectionType: Set this to Soap.
  • RFCUrl: Set this to the SOAP URL of your SAP system

The SOAP service must be enabled in your SAP system for this type of connection to work properly.

Required RFCs

The RFCs used by the CData ODBC Driver for SAP ERP are listed as follows. If any listed below are not available, some or all functionality may not work. T-Code SE37 may be used to view available function modules in SAP.

  • DDIF_FIELDINFO_GET
  • RFC_GET_FUNCTION_INTERFACE
  • RFC_GET_STRUCTURE_DEFINITION
  • RFC_GET_SYSTEM_INFO
  • RFC_GET_UNICODE_STRUCTURE
  • RFC_READ_TABLE
  • SLDAG_CHECK_FOR_UNICODE

Connecting to SAP ERP

Set the following to connect:

  • Host: The host name of the target system. Host names can be regular host names defined in a hosts file, an IP address like 123.123.123.123, or an SAProuter address such as "/H/hostname/S/port/H/host/S/port/ ..."
  • User: The user that is authenticating to the SAP system.
  • Password: The password used to authenticate to the SAP system.
  • Client: The client authenticating to the SAP system.
  • SystemNumber: The number by which the target system is defined.
  • Language: The ISO 639-1 language code you use to log into SAP ERP. The default is "EN".

To connect to a machine different from the Host machine, substitute Host with the following:

  • GatewayHost: The gateway host you wish to connect to. If not specified, the provider will attempt to connect to the SAP system specified by Host.
  • GatewayService: The gateway service you wish to connect to. If not specified, the SAP system will use the default "sapgw##" where the "##" is the SystemNumber.

To connect to a distributed system or systems with other configurations, see Fine-Tuning Data Access.

Certificates

In addition to User and Password, the CData ODBC Driver for SAP ERP also supports certificate authentication. To use certificate authentication, set the X509Certificate connection property to either point to a file that contains an X509 certificate in PEM format, or the PEM blob directly used for authentication during SAP Logon. In addition to setting X509Certificate, you will need to specify the appropriate SNC connection properties. The SNC connection properties are described under Fine-Tuning Data Access.

Set the Driver Encoding

The ODBC drivers need to specify which encoding to use with the ODBC Driver Manager. By default, the CData ODBC Drivers for Unix are configured to use UTF-16 which is compatible with unixODBC, but other Driver Managers may require alternative encoding.

Alternatively, if you are using the ODBC driver from an application that uses the ANSI ODBC API it may be necessary to set the ANSI code page. For example, to import Japanese characters in an ANSI application, you can specify the code page in the config file '/opt/cdata/cdata-odbc-driver-for-saperp/lib/cdata.odbc.saperp.ini':

[Driver]
AnsiCodePage = 932

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462