FireDAC Components for SAP ERP

Build 23.0.8839

Establishing a Connection

You can create and manage connections with the Data Explorer and the FireDAC Connection Editor wizards. See Connection Definitions for more information on creating connections from code and creating persistent, private, or temporary connections.

Connecting with the RFC APIs

The CData FireDAC Components 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.

You must obtain the SAP libraries corresponding to your RFC API 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. Place the assembly in a location where it will be accessible at run time, such as system32 or the bin folder in your installation directory.

Connect Using the Classic RFC SDK with Unicode Support

To use the Classic RFC SDK with Unicode support, set ConnectionType to Classic_Unicode.

Place the following assemblies in a location where they are accessible at run time, such as system32 or the bin folder in your installation directory.

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

Connect Using the NetWeaver RFC SDK

Prior to connecting, you must have a valid S-User Id and be able to access the SAP software downloading site. You also must be able to download the SAP content from the SAP portal. To download the necessary SDK, follow these steps:

  1. Navigate to https://me.sap.com/softwarecenter.
  2. On the "Downloads" page, search for sap nw rfc.
  3. Click SAP NW FRC SDK 7.50.
  4. Select the platform you use and then download.

To use the NetWeaver RFC SDK, set ConnectionType to NetWeaver.

Place the following assemblies in a location where they will be accessible at run time, such as system32 or the bin folder in your installation directory.

  • 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 FireDAC Components 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 FireDAC Components 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.

Using the FireDAC Connection Editor

Complete the following steps to use the FireDAC Connection Editor to assign a SAP ERP connection to a TFDConnection object:

  1. Open a project and drop a TFDPhysCDataSAPERPDriverLink from the Tool Palette onto the Form Designer.
  2. Drop a TFDConnection object onto the Form Designer.
  3. Double-click the TFDConnection and select CDataSAPERP in the Driver Id menu.
  4. Define the necessary connection properties.
  5. To execute ad-hoc SQL statements based on this connection, enter SQL commands on the SQL Script tab.
  6. In the Form Designer, select the TFDConnection object and set the Connected property to true.

Using the Data Explorer

Complete the following steps to use the Data Explorer to define persistent connections that can be shared across applications and projects:

  1. Click View > Tool Windows > Data Explorer in RAD Studio and expand the FireDAC node.
  2. Right-click the CData SAP ERP Data Source node and click Add New Connection.
  3. Enter a name for the connection. The FireDAC Connection Editor opens.

Working with Persistent Connections

The connections you define in the Data Explorer can be assigned to a TFDConnection object by specifying the connection name in the TFDConnection object's ConnectionDefName property.

Browsing Data and Metadata

The Data Explorer also provides options for browsing SAP ERP objects at design time:

  • Expand the CData SAP ERP Data Source node in the Data Explorer to view the defined connections.
  • Expand a connection node to find the database objects available for a connection.
  • Drill down to a database object to find metadata such as primary keys.
  • To display data, double-click a table or view or right-click and click View.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839