Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

CreateObject("SAP.Functions") Doesnt work in Qlikview ?

Hi, Im getting frustated, I want to extract data from R3 SAP system tables, I know there are other options like SAP Connector, several third party, etc. But arent free.

I use the OCX to connect with SAP to be able to call a RFC function. My problem is that the Macro in qlikview doesnt work, It just open my module windows I know that the problem is in the first line (in red). The thing is that the exactly same code used in Excel works fine.

Set R3 = CreateObject("SAP.Functions")

R3.Connection.client = "MANDT"

R3.Connection.User = "USER"

R3.Connection.Password = "PASS"

R3.Connection.Language = "EN"

R3.Connection.ApplicationServer = "HOST"

  

If R3.Connection.logon(0, True) <> True The

   msgbox ("CANNOT Log on to SAP")

else

    msgbox ("Logged on to SAP")
end if

Anyone knows why this doesn't work on Qlikview 11 ?  and why If I put this code inside the script is doesnt works gives me syntax error. Only can be used when the function is in the module windows.

Thx

1 Solution

Accepted Solutions
Not applicable
Author

The problem was this.

You have to allow the security level, like the image.

View solution in original post

1 Reply
Not applicable
Author

The problem was this.

You have to allow the security level, like the image.