cancel
Showing results for 
Search instead for 
Did you mean: 

Excel -> XI using RFC

Former Member
0 Kudos

Hi,

I have existing scenario where I have an Excel VBA macro making an RFC call to a FM in an R/3 system. This is working fine.

I would now like to replace the FM with a different server program and route the RFC call to the new server program via XI. Seems simple so far. My question is this - how do I get the VBA macro to call XI? All of the current information available about configuring a Sender RFC adapter in XI assumes that the RFC call originates in a R/3 system. I have only Excel / VBA as the sender and XI - no R/3 system as such in the mix. The following is roughly the VBA code.

Dim Ecc, RfcFunc As Object

Set Ecc = CreateObject("SAP.Functions")

Ecc.Connection.Logon(0, False)

Set RfcFunc = Ecc.Add("Z_FunctionModule")

' fill data request

Result = RfcFunc.CALL

'process result.

So I have done the following:

1. Created a business system for the Excel "system" in the SLD.

2. Configured an RFC Sender Adapter specifying the XI box as the gateway and Program_ID of "Z_FunctionModule").

3. Imported the signature of "Z_FunctionModule" to XI and created an outbound synchronous message interface based on it.

4. Established a Sender agreement for the business system, Message interface and adapter.

At this point if I run the VBA macro, I believe that I should see in the adapter monitor that the RFC sender adapter has processed a message, and I should see in SXMB_MONI a message failing with "no receiver determination" . I see neither.

There would appear to be something fundamental missing in the configuration, but as there is no sending R/3 system I do not see where SM59 and RFC Destinations come into the scenario.

Anyway - responses from anyone that can shed some light on this would be most welcome.

Stephen

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Stephen,

if i had understood the problem correctly, it is previously RFC was called directly from VBA code and now you are trying to insert XI inbetween VBA application and RFC call.

Then the scenario is VBA application - XI - RFC. so RFC will be on the receiver side i think. And this will be a synchronous scenario so that the RFC function returns values to the VBA application.

Regards,

P.Venkat

Former Member
0 Kudos

Clarification of scenario.

I currently have a non SAP application making an RFC call to Function Module in an SAP 3.1 system.

I am upgrading to SAP ECC (5.0) and XI and I have - for a different scenario - already implemented a BPM (or Integration Process) in XI that performs the same service as the existing Function Module.

I would like to now convert the non SAP application to use the new BPM (which does not make any RFC calls) to service its request, however, I am not at liberty to make many changes in the existing client call - So I thought that I should be able to have XI intercept the current RFC call and redirect it to the BPM (as I would be able to do if the source system was an SAP system). As I do not have access to the non SAP system for testing purposes, I am using Excel with a VBA macro to simulate the non SAP client.

former_member206604
Active Contributor
0 Kudos

Hi,

If you would like to route thru XI it is better if you do it using HTTP request rather than using a RFC adapter. Even from the performance point of view this would be better. As you are doing it using VBA its pretty simpleto do it using HTTP request instead of using a RFC function call which was a typical old fashion.

Regards,

Prakash

Former Member
0 Kudos

HI,

Just want to be perfectly clear.

I have a non SAP client system with a custom written RFC adapter. I cannot change this! As I do not have access to the existing client, I am using Excel with VBA to simulate the client.

I want to replace the current sap 3.1 function module that is called by the client with an existing XI BPM.

I cannot change the client call. It will remain as an synchronous RFC call. I would just like to know how to put XI in the middle.

Stephen

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

One basic question before I can think of a solution--

In what format will the data be available to XI to process?

Is the data going to be a Excel File?

if yes, then it is possible to process a Excel File using the Sender File adapter plus an Adapter Module to convert the Excel to XML format of your Source Datatype.

For this, refer to this blog,

/people/sap.user72/blog/2005/07/04/read-excel-instead-of-xml-through-fileadapter

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

I am using Excel as a stub because the real source system is not available. I am not inclined to change an RFC interface to a File interface in any case - it would seem a backward step to me.

Stephen