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. Example:
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
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
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 mandatory 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.
And the following optional 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:
In the following example we want to import ‘T500P’ that is a standard SAP table containing data about Personnel Areas 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 T500P table can be seen in the images below.
RFCReadTable Base View
RFCReadTable Base View execution