Making RFC call from COM/OLE object in SAP

To communicate between SAP systems, there is a need to define a mechanism. One of the most common ways is to define Remote Function Call (RFC Connection) between two systems. By creating a trusted RFC connection between two systems, it allows you to create trusted-trusting relationship between systems wherein, you can communicate and exchange information and data.

There are different types of trusted RFC connections ?

  • Type 3 Connection ? ABAP connection to external system
  • Type I Connection ? TCP/IP connection to external server
  • Type T Connection ? TCP/IP connection to external RFC server program

To know more about SAP RFC connection types, you can refer our SAP Basis tutorial link:

SAP Basis Remote Function Call

Making RFC Call from COM/OLE Object

When working with COM/OLE objects in SAP, RFC function calls have member tables that can be accessed programmatically. The OLE (Object Linking and Embedding) interface allows external applications to communicate with SAP systems using RFC connections.

Example

Here's how to create an RFC function object and access its table data ?

Object rfcFuncObject = functionCtrl.Add("RFC_CUSTOMER_GET");
Object rfcTable = rfcFuncObject.tables;
Object customerItem = rfcTable.Item("CUSTOMER_T");

In this example:

  • functionCtrl.Add() creates a new RFC function object
  • RFC_CUSTOMER_GET is the name of the remote function module
  • tables property provides access to all table parameters
  • Item("CUSTOMER_T") retrieves the specific customer table

For more detailed information about SAP RFC programming interfaces, refer to the official documentation:

SAP RFC Programming Interface Documentation

Conclusion

RFC calls from COM/OLE objects provide a powerful way to integrate SAP systems with external applications. By understanding the proper syntax for accessing RFC functions and their table parameters, developers can effectively exchange data between SAP and other systems.

Updated on: 2026-03-13T17:55:23+05:30

356 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements