Skip to Content
0
Nov 23, 2011 at 06:18 AM

assignment of BEx 7 connection parameters in unicode system

81 Views

Hi, experts!

We faced the following problem:

There is a BEx 7 workbook on BI-server. We use this WB to save data in DSO with remote function module. To call the this FM, in VBA-function we create an object r3 like u201CSAP.Functionsu201D.This object gets BEx Analyzeru2019s current connection parameters. At that moment the following error raises: u201CRun-time error u201861704u2019: Internal application erroru201D.

Our BI-system is Unicode system. In all Non-unicode BI-systems, that we tested, connection parameters are sending successfully. However, if we create "SAP.Functions.Unicode" object, then there is another error: "Run-time error '-2147352568 (80020008)': Bad variant type".

When we use the similar functions in BEx 3.5, assignment of connection parameters is fine with "SAP.Functions" object both in Unicode and non-unicode systems... Using "SAP.Functions.Unicode" does not lead to error, but the connection is not happening in this case.

Could you advice what settings should be done in BI-system or how can we adjust our function to solve connection problen

Functions we use to assign connection in BEx7:

Sub testconnection() u2018non-unicode

Dim r3, MyFunc As Object

Dim RES_DATA_TBL As Object

Dim ConnObject As Object

Set ConnObject = Run("BEXAnalyzer.XLA!sapBEXgetConnection")

Set r3 = CreateObject("SAP.Functions")

r3.Connection = ConnObject ' here this error raises: "Run-time error '61704': u2018Internal application error".

Set MyFunc = r3.Add("Z_UD_DATA_ODS")

Set RES_DATA_TBL = MyFunc.Tables("RES_DATA")

Result = MyFunc.Call

End Sub

Sub testconnection_UC() u2018unicode

Dim r3, MyFunc As Object

Dim RES_DATA_TBL As Object

Dim ConnObject As Object

Set ConnObject = Run("BEXAnalyzer.XLA!sapBEXgetConnection")

Set r3 = CreateObject("SAP.Functions.Unicode")

r3.Connection = ConnObject ' here this error raises: "Run-time error '- 2147352568 (80020008)': Bad variant type"

Set MyFunc = r3.Add("Z_UD_DATA_ODS")

Set RES_DATA_TBL = MyFunc.Tables("RES_DATA")

Result = MyFunc.Call

End Sub

Thanks for your replies,

Best wishes,

Sergey Musatov.

Edited by: Sergey Musatov on Nov 23, 2011 7:05 AM