Remote Function Call to SAP System using Microsoft Excel
Remote Function Call to SAP System is quite important and useful feature when we require SAP data for a non SAP application. We have quite a few techniques to make RFC to SAP using connectors like JCo. This weblog explains how to make Remote Function Calls to SAP system with a much familiar Microsft Excel.
Add the necessary SAP ActiveX Components to Excel
The first important thing is to add the required SAP ActiveX Components to Microsoft Excel. These SAP ActiveX Components will be available if the SAP Front End is installed in your machine. You can find all the availabe SAP controls in the Controls ToolBox of Excel.
Here we are using the SAP BAPI ActiveX Component and SAP Table Factory ActiveX Component to access SAP and fetch some data to display in Excel. There are many other SAP ActiveX Components which will provide you a very rich functionality.
SAP BAPI ActiveX Component
SAP Table Factory ActiveX Component
The Design
For this test application a simple form as shown below is required. This application will fetch all the company codes from the SAP System.
The Source Code
Here the source code is broken as per their operation.
Declaration
Connecting and Disconnecting to SAP System
Get Company codes form SAP Sytem using BAPI
Clear the List
The Result
Well the application did work nicely fetching all the required details from the R/3 System. I was able to get the record count, records and displayed it on the Excel sheet as shown below.
A nice way to make simple reporting with SAP RFC and Microsoft Excel.