posts - 88 , comments - 3 , trackbacks - 0

My Links

News

Tag Cloud

Archives

Post Categories

Design a Custom SAP Function Module to Circumvent RFC_READ_TABLE Limitations

While the SAP SDK provides the RFC_READ_TABLE for accessing data from SAP tables, using it to select data is limited to 512 bytes at a time so you may not be able to retrieve all columns. You can resolve this limitation by defining a custom function module that will allow you to select any result set you need.

Create a Custom Function Module

You can follow the procedure below to create and activate a custom read table function that replaces the data type of the RFC_READ_TABLE function.

  1. You can use the RFC_READ_TABLE function as a template for the new function: Select transaction code SE37 and the SDTX Function Group and copy RFC_READ_TABLE to a new function group or your working function group. In this example RFC_READ_TABLE is copied to "Z_CUSTOM_READ_TABLE".
  2. On the Attributes tab of the SAP screen, select "Remote Enabled Module".
  3. On the Tables tab, set the DATA parameter to "CHAR8000" (you may need to right-click and then click "Display <-> Change"):
  4. On the Source Code tab, paste the example source code for the replacement RFC_READ_TABLE function module located in the "db" subfolder of the installation directory. Click Save.
  5. Activate the function module. You can now select any fields in SAP.
The CData Driver for SAP enable you to access SAP data from applications hosted on-premises or in the cloud.  Available for JDBC, ODBC, ADO.NET, SSIS, BizTalk, and Excel, the SAP drivers offer the easiest way to integrate with SAP NetWeaver from any BI tool, ETL workflow, or custom application.

Print | posted on Monday, June 15, 2015 2:01 AM | Filed Under [ cdata jdbc ODBC ssis SAP netweaver ]

Powered by: