Last modified on: 10 Jan 2023
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.
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:
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'. |
There are three options to work around these limitations:
Use the Selection view in the VDP Admin Tool or limit the projected fields in the VQL Shell => field projections are delegated to SAP.
BBP_RFC_READ_TABLE solves the FLOAT problem, but does not increase the 512 byte limit.
Requires development user, and creation of a custom function module. For more information see SAP’s documentation.
In the latter two cases the wrapper should be configured with the optional parameter RFC Name indicating the name of the alternative RFC function.
This wrapper is only able to carry out read operations. It can delegate to SAP the following query artifacts and operators:
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.
In order to use the RFCReadTable Custom Wrapper in VDP:
RFCReadTable Data Source
The datasource need the following parameters:
For the configuration of the physical connection to SAP the custom wrapper offers two options:
In both cases a SAP router string can be configured if the SAP systems is behind a SAP router:
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:
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.
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.
Parameters of the data source edition for a SAP direct connection
Parameters of the datasource edition for a SAP load balancing connection
Base view parameters
The schema and data of the TJ table can be seen in the images below.
RFCReadTable Base View
RFCReadTable Base View execution
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:
The system verifies the identity of the communication partners.
The system detects any changes or manipulation of the data, which may have occurred between the wrapper and the SAP server.
The system encrypts the messages being transferred between the wrapper and the SAP server.
Base views using SNC need the following parameters:
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.
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