Last modified on: 01 Mar 2016
Denodo’s RFCReadTable Custom Wrapper uses by default SAP’s RFC_READ_TABLE but can use another RFC providing the same functionality by passing the RFC name as parameter during wrapper configuration.
SAP’s RFC_READ_TABLE function has some limitations that we need to take into account:
To avoid the second limitation, you can use SAP’s BBP_RFC_READ_TABLE function instead of the default function.
To avoid the first limitation, you can use a custom function module to retrieve the table content as described in the following SAP solution:
The rest of this document describes how to do that.
In order to create a modified version of the RFC_READ_TABLE BAPI follow these steps:
DATA: BEGIN OF WORK, BUFFER(30000), END OF WORK.
FIELD-SYMBOLS: <WA> TYPE ANY, <COMP> TYPE ANY.
" --- begin of modification
" ASSIGN WORK TO <WA> CASTING TYPE (QUERY_TABLE).
DATA: tab_ref TYPE REF TO data.
CREATE DATA tab_ref TYPE (query_table).
ASSIGN tab_ref->* TO <wa>.
" --- end of modification
IF ROWCOUNT > 0.
ROWCOUNT = ROWCOUNT + ROWSKIPS.
SELECT * FROM (QUERY_TABLE) INTO <WA> WHERE (OPTIONS).