cancel
Showing results for 
Search instead for 
Did you mean: 

Calling ABAP functions from Excel VBA

Former Member
0 Kudos

Hi Gurus,

I am currently working on a excel macro which calls a ABAP function to load user data into SAP. We are on ECC 6.0 with SAP GUI 7.20 and Excel 2010. The applications works fine but before rolling out the application to more people, we are trying to find out any restrictions present for SAP app server, GUI and Excel versions for it to work.

I have been trying to find some notes which talks about the said restrictions but have not found anything concreate yet. Can anyone point me to the correct resource which talks about the compatibility of excel versions with BAPIs?

Thank you so much for taking the time to look into this.

Regards,

Aninda

Accepted Solutions (0)

Answers (1)

Answers (1)

michael_hobbins
Active Participant
0 Kudos

Hello Aninda,

I don't have a resource to share, but I can share my experience. We have been connecting Excel with BAPIs thought macros for a couple of years already. As far as I recall, we started with Excel 2003 and are actually using it with 2007.

Our ERP is

The code we use (there are various options) is

Connection object

Set rfcctl = CreateObject("sap.functions")
    Set conn = rfcctl.Connection

Logon

If conn.Logon(0, True) Then

RFC calls

Set rfc = rfcctl.Add("ZCM_RFC_OFERTA_WEB")
        rfc.Exports("MODE").Value = "R"
        If rfc.Call Then

Hope this helps a little

Cheers,

Michael

Former Member
0 Kudos

Hi Michael,

Thanks for taking the time to go through and replying. I am using the same basic code that you copied into the message. What's the SAP and GUI versions you are using for your code?

I currently have tested my application with ECC 6, Excel 2010, SAP GUI 7.20 and also with SAP 4.7, Excel 2003 and SAP GUI 7.1. I have a feeling that the restriction will be based on the SAP GUI and the Excel versions rather than the backend SAP versions but I can be mistaken as well.

Both these combinations work. However I am looking for an exhaustive compatibility chart which I can include with the excel workbook so that users know if their combination would work or not.

Regards,

Aninda

Edited by: Aninda Gupta on Feb 27, 2012 2:00 PM

michael_hobbins
Active Participant
0 Kudos

Sorry, forgot to mention that.

We have SAP GUI 7.10 and ECC 6.0 (with no EHP installed). We migrated from ERP 4.62 last 2008 and I'm quite sure we used VBA before that, let me check old emails. We used to have SAP GUI 6 on those days.

Cheers,

Michael