MS EXCEL as OLE Client 

Task

From within MS EXCEL, call a function module from the R/3 system and display the R/3 data on an EXCEL worksheet for local processing. EXCEL as OLE client requests data from the R/3 system. The R/3 system as OLE server provides it after a function module call.

The example application shall

Overview: Unit Objectives

In this unit you will learn how to

Prerequisites

Basics

There are two different variants for using EXCEL as OLE client to call the R/3 system remotely. The programming steps differ only slightly.

  1. Using local OLE objects. In this case, an RFC server object is used as basic object:

    CreateObject("RFC.ServerObject")
  2. Using OCX Controls. You use the Function ActiveX Control to access the R/3 system. The Function Control in this case is defined as collective object for explicit functions:

    CreateObject("SAP.Functions")

    See also:
    Accessing Function Modules Using Function OCX in VB

Since ActiveX Controls are DLLs, in connection with EXCEL as OLE client this variant offers a considerably better performance.

How to Continue

Architecture

or

Exercise 1: Program Framework and Declarations