Quantcast
Channel: SCN : Discussion List - SAP Planning and Consolidation, version for SAP NetWeaver
Viewing all articles
Browse latest Browse all 5414

Input template issue with VB connecting to BW using SAP.Functions

$
0
0

Hi Team

 

I am using

 

SAP GUI 740

EPM 21.2 patch

Excel 2013.

 

This issue is only with Office 2013 other like 2010 and 2007 are working fine.

 

1) I have a template which does a refresh on open.

2) The template has a VB code to connect to BW system as below

Sub LogintoBW()

 

 

On Error GoTo ErrorHandler

retrieve_case = False

 

 

Dim objBAPIControl As Object

Dim sapConnection As Object

Dim objTable As Object

Dim objmapping As Object

Dim client As EPMAddInAutomation

 

 

Set objBAPIControl = CreateObject("SAP.Functions")

Set sapConnection = objBAPIControl.Connection

 

 

Application.ScreenUpdating = False

 

 

Application.Cursor = xlWait

 

 

Set client = New EPMAddInAutomation

 

 

 

 

'**********Logon to SAP remotely**********

 

 

sapConnection.client = "100"

sapConnection.user = "XXXX"

sapConnection.Language = "EN"

sapConnection.hostname = hostnm

sapConnection.Password = "test1234"

sapConnection.SystemNumber = Sysno

 

 

If sapConnection.Logon(1, True) <> True Then

    MsgBox "Unable to connect to BW! Please close the sheet and reopen it to try again.", vbCritical

    Exit Sub

End If

 

 

End Sub

 

When it reaches to the code : Set objBAPIControl = CreateObject("SAP.Functions") 

the cursor is coming out of the sub.

 

It does not throw any error messages. I am not sure why that line is not executing.

 

 

Can someone had this issue before and fixed it. Thanks

 

Regards

AK


Viewing all articles
Browse latest Browse all 5414

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>