• User Manuals »
  • Denodo RFCReadTable Custom Wrapper - User Manual

Denodo RFCReadTable Custom Wrapper - User Manual

Introduction

RFCReadTable is a Virtual DataPort custom wrapper for querying tables of SAP Systems.

The custom wrapper invokes the standard RFC function module RFC_READ_TABLE that gives access to all tables in a SAP system via ABAP (Advanced Business Application Programming). The function retrieves columns of a specified table in the SAP system and returns the data as a result set.

Although VDP can invoke the RFC_READ_TABLE using its BAPI data source, the motivation behind the RFCReadTable Custom Wrapper is to simplify the process by automatically creating the view schema, without the need to create data combinations manually.  

Architecture and Features

RFCReadTable Custom Wrapper allows to create base views and execute SQL queries on SAP platforms accessing via SAP Java Connector (SAP JCo). JCo is a Java language wrapper to the RFC library that allows any Java application access to SAP systems.

RFCReadTable Custom Wrapper Architecture

The custom wrapper uses the RFC_READ_TABLE function, unfortunately this RFC has some limitations:

  • The combined length of the retrieved columns must not exceed 512 bytes.
  • In some cases (for decimal fields), RFC_READ_TABLE will report a field length which is shorter than the actual storage length required. When it attempts to extract data, it truncates the result and the output will contain a ‘* character.

In those cases, the Custom Wrapper will log an error to inform the user, e.g.:

ERROR RFCReadTableWrapper - Error converting: '*6.38600-' in

     field 'UKURS' of ABAP type 'P' in row '25'.

  • When working with columns of type FLOAT, the module may cause an ABAP exception: ASSIGN_BASE_WRONG_ALIGNMENT.

There are three options to work around these limitations:

  1. Limit the columns to be retrieved.

Use the Selection view in the VDP Admin Tool or limit the projected fields in the VQL Shell => field projections are delegated to SAP.

  1. Use BBP_RFC_READ_TABLE to retrieve the table content.

BBP_RFC_READ_TABLE solves the FLOAT problem, but does not increase the 512 byte limit.

  1. Use a custom function module to retrieve the table content.

Requires development user, and creation of a custom function module. For more information see

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a83ec690-0201-0010-14ac-bd1d75e24a7d?overridelayout=true

In the latter two cases the wrapper should be configured with the optional parameter RFC Name indicating the name of the alternative RFC function.

Capabilities

This wrapper is only able to carry out read operations. It can delegate to SAP the following query artifacts and operators:

  • Operators: =, <>, LIKE, <,>,<=,>=,IN,BETWEEN.

  • AND operations.

  • OR operations.

  • NOT operations.

Due to the delegation of the previous operators, the performance of the custom wrapper is better because many operations will be performed by SAP itself, instead of having to rely on VDP in-memory post-filtering.

Usage

Creating a RFCReadTable Data Source

In order to use the RFCReadTable Custom Wrapper in VDP:

  1. Obtain the SAP Java Connector 3.0.

  1.  It can be downloaded from http://service.sap.com/connectors, section SAP Java Connector → Tools & Services.

 

  1. If VDP runs on a 32-bit O.S, download the 32-bit connector.
  2. If VDP runs on a 32-bit JVM, on a 64-bit O.S, download the 32-bit connector.
  3. If VDP runs on a 64-bit JVM, download the 64-bit connector.

  1. Copy together the files sapjco3.dll (sapjco3.so for Linux systems), sapjco3.jar and denodo-rfcreadtable-customwrapper-${version}-jar-with-dependencies.jar into a folder. Locate this folder out of  <DENODO_HOME>. These are the files for Windows systems.
  2. Go to New → Data Source → Custom. Select the folder where the connectors of SAP and the jar of the custom wrapper were placed in the ‘Class path’ parameter and write the following wrapper’s class name com.denodo.connect.sap.rfcreadtable.wrapper.RFCReadTableWrapper in the ‘Class name’ parameter.

RFCReadTable Data Source

Creating a Base View

Once the custom wrapper has been registered, we will be asked by VDP to create a base view for it.

Base views created from the RFCReadTableWrapper need the following parameters:

  • Client Id (mandatory): The 3-character client ID definition.
  • User/Password (mandatory): Username and password to log into SAP.
  • Pass-through session credentials (in v7.0 only): If selected, when a client queries a view that uses this data source, Virtual DataPort will use the credentials of the user to execute the wrapper, instead of the value of the fields “User” and “Password”. The value of these fields will be used only when creating the base view to connect to SAP to obtain information about the SAP table. This option is not supported when Kerberos is used as authentication mechanism for VDP.
  • Table (mandatory): Name of the table to be read.
  • Remove trailing spaces (mandatory): Remove trailing spaces from string results.
  • Paginated results (mandatory): Paginate the results to avoid retrieving them all at once, reducing the overall memory usage at VDP.

However, it should be noted that SAP itself does not allow database persistent cursors, so using pagination could provoke a performance problem at SAP, because SAP would have to perform the entire query once for each 'page' VDP asks from it, and each time skip a large number of rows until finding the first row that should be sent back to VDP.

And the problem would not only be performance: also, given SAP would be performing a number of queries on its database instead of just one, results of second and subsequent queries could be affected by modifications on the SAP database happened between queries, so the consistency of the final results could be compromised.

  • RFC Name (optional): Name of the custom version of RFC_READ_TABLE, if any. By default the wrapper will invoke RFC_READ_TABLE. For more information see section Architecture and Features.
  • Language (optional): Login language, default is en.

For the configuration of the physical connection to SAP the custom wrapper offers two options:

  • Direct connection to a SAP instance:
  • System number (mandatory): System number of the SAP server.
  • Host (mandatory): SAP server.

  • Load balancing connection to a group of SAP instances:
  • System ID (mandatory): System ID of the SAP system.
  • Message server (mandatory): SAP message server.
  • Message server port (optional): SAP message server port.
  • Load balancing group (mandatory): Group of SAP application servers.

In both cases a SAP router string can be configured if the SAP systems is behind a SAP router:

  • Router: SAP Router string contains the chain of SAP Routers and its port numbers and has the form: (/H/<host>[/S/<port>])+

Example

In the following example we want to import ‘TJ03T’, that is a standard SAP Table which is used to store texts for object types information and which is available within the used SAP system.

Base View edition for a SAP direct connection

Base View edition for a SAP load balancing connection

The schema and data of the TJ table can be seen in the images below.

RFCReadTable Base View

RFCReadTable Base View execution

Security

For securing the communication between the RFCReadTable wrapper and the SAP server Secure Network Communication (SNC) and SAP Cryptographic Library (SAPCRYPTOLIB) are used.

SNC supplies three levels of protection:

  1. Authentication only

The system verifies the identity of the communication partners.

  1. Integrity protection

The system detects any changes or manipulation of the data, which may have occurred between the wrapper and the SAP server.

  1. Privacy protection

The system encrypts the messages being transferred between the wrapper and the SAP server.

Base views using SNC need the following parameters:

  • Enable SNC: whether to apply SNC to connections or not
  • SAP Cryptographic library (mandatory): path and file name of the SAP Cryptographic Library (sapcrypto.dll for Windows or libsapcrypto.so for UNIX).

The installation package is available free-of-charge to SAP customers on the SAP Service Marketplace at https://support.sap.com/swdc. Menu path: Installations and Upgrades -> Browse our Download Catalog -> SAP Cryptographic Software.

  • Partner SNC name (mandatory) : the distinguished name of the SAP server. It can be found in the SAP profile parameter snc/identity/as.
  • SNC name (optional): the distinguished name of the custom wrapper user.
  • Security level (optional): the protection level to apply:
  • Apply authentication only
  • Apply integrity protection (includes authentication)
  • Apply privacy protection (includes integrity protection and authentication)
  • Apply the default protection: value configured in the SAP profile parameter  snc/data_protection/use
  • Apply the maximum protection: value configured in the SAP profile parameter  snc/data_protection/max

For information on how to enable SNC to secure the communications between the host where the Virtual DataPort server is installed and SAP, you can read this article from our Knowledge Base:

https://community.denodo.com/kb/view/document/Enabling SNC on SAP Connections