cancel
Showing results for 
Search instead for 
Did you mean: 

SAP GUI 740: VBA "SAP.Logoncontrol.1" and "SAP.Functions" doesn't work anymore

Former Member
0 Kudos

Hi,

we updated to SAP GUI 740 and it seems that our Excel VBA files which are using "SAP.Logoncontrol.1" and "SAP.Functions" to logon to SAP and to execute different function modules doesn't work anymore.

Enclosed two examples for VBA Excel (NON_SSO and SSO) ...

„NON_SSO“ VBA Code:

Set objSap = CreateObject("SAP.Logoncontrol.1")

Set objSapCon = objSap.NewConnection

objSapCon.Client = "100"

objSapCon.ApplicationServer = "servapk01"

objSapCon.System = "K01"

objSapCon.SystemNumber = "01"

objSapCon.User = "Developer"

objSapCon.Password = "Password"

objSapCon.Language = "EN"

If objSapCon.Logon(0, True) <> True Then

    objSapCon.LastError

Else

    MsgBox("Logon ok!")

Endif

„SSO“ VBA Code:

Set objSap = CreateObject("SAP.Logoncontrol.1")

Set objSapCon = objSap.NewConnection()

objSapCon.Client = "100"

objSapCon.ApplicationServer = "servapk01"

objSapCon.System = "K01"

objSapCon.SystemNumber = "01"

objSapCon.User = "Developer"

objSapCon.Language = "EN"

objSapCon.autologon = 1

objSapCon.SNC = True

objSapCon.SNCName = "p:Developer@COMPANY.COM"

objSapCon.SNCQuality = 3

If objSapCon.Logon(0, True) <> True Then

    objSapCon.LastError

Else

    MsgBox ("Logon ok!")

End If

...where we get the following error:

Fehler Gruppe

RFC_ERROR_COMMUNICATION

Nachricht

Connect to message server failed

Connect_PM  MSHOST=servapk01, R3NAME=K01, GROUP=PUBLIC

ERROR       service 'sapmsK01' unknown

TIME        Wed Jun 24 13:14:19 2015

RELEASE     740

COMPONENT   NI (network interface)

VERSION     40

RC          -3

MODULE      D:/depot/bas/740_REL/src/base/ni/nixxsl.cpp

LINE        189

DETAIL      NiSrvLGetServNo: service name cached as unknown

COUNTER     7

--------------------------------------

When we change the following VBA code part from ...

      If objSapCon.Logon(0, True) <> True Then

... to ...

      If objSapCon.Logon(0, False) <> True Then

... to display the Logon window the "NON_SSO" works:

-----------------------------

Set objSap = CreateObject("SAP.Logoncontrol.1")

Set objSapCon = objSap.NewConnection

objSapCon.Client = "100"

objSapCon.ApplicationServer = "servapk01"

objSapCon.System = "K01"

objSapCon.SystemNumber = "01"

objSapCon.User = "Developer"

objSapCon.Password = "Password"

objSapCon.Language = "EN"

If objSapCon.Logon(0, True) <> True Then

    objSapCon.LastError

Else

    MsgBox("Logon ok!")

Endif

-----------------------------

But for "SSO" ...

-----------------------------

Set objSap = CreateObject("SAP.Logoncontrol.1")

Set objSapCon = objSap.NewConnection()

objSapCon.Client = "100"

objSapCon.ApplicationServer = "servapk01"

objSapCon.System = "K01"

objSapCon.SystemNumber = "01"

objSapCon.User = "Developer"

objSapCon.Language = "EN"

objSapCon.autologon = 1

objSapCon.SNC = True

objSapCon.SNCName = "p:Developer@HERAEUS.COM"

objSapCon.SNCQuality = 3

If objSapCon.Logon(0, True) <> True Then

    objSapCon.LastError

Else

    MsgBox ("Logon ok!")

End If

-----------------------------

... we get the following error:

Fehler Gruppe

RFC_ERROR_COMMUNICATION

Nachricht

CPIC-CALL: 'CMRCV : rc=20

LOCATION    CPIC (TCP/IP) on local host

ERROR       illegal parameter value ( function=SAP_CMTIMEOUT2 /

            parameter=conversation_ID / value=75850214 )

TIME        Wed Jun 24 13:29:15 2015

RELEASE     740

COMPONENT   CPIC (TCP/IP)

VERSION     3

RC          769

MODULE      D:/depot/bas/740_REL/src/krn/si/cpic/r3cpic.c

LINE        10858

COUNTER     20

-----------------------------

With SAP GUI 720 everything works fine.

Are there any changes or bugs know for SAP GUI 740 or do we have to handle VBA logon to SAP in a new changed way?

We have the same errors in our SAP Online Transport Management System and within SAP ChaRM and Incident Mgt CRM (SAP NetWeaver).

BR

Florian

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hello again,

after the installation of the following patches ...

  • SAPGUI 7.40 PL 7
  • NWBC 5.0 PL 12
  • ECLViewer 7.0 PL 20
  • ACF 712 PL48

... the login via "SSO" give us the following error message:

Fehler Gruppe

RFC_ERROR_COMMUNICATION

Nachricht

CPIC-CALL: 'CMRCV : rc=20

LOCATION    CPIC (TCP/IP) on local host

ERROR       illegal parameter value ( function=SAP_CMTIMEOUT2 /

            parameter=conversation_ID / value=71127894 )

TIME        Mon Apr 18 15:28:55 2016

RELEASE     740

COMPONENT   CPIC (TCP/IP)

VERSION     3

RC          769

MODULE      D:/depot/bas/740_REL/src/krn/si/cpic/r3cpic.c

LINE        10858

COUNTER     52

-------------

Can someone help?  The environment variable is set correctly and login via "NON-SSO" (With password) works, also the login via SAP GUI 740.

We are using the same code like this:

-------------

Set objSap = CreateObject("SAP.Logoncontrol.1")

Set objSapCon = objSap.NewConnection()

objSapCon.Client = "100"

objSapCon.ApplicationServer = "servapk01"

objSapCon.System = "K01"

objSapCon.SystemNumber = "01"

objSapCon.User = "Developer"

objSapCon.Language = "EN"

objSapCon.autologon = 1

objSapCon.SNC = True

objSapCon.SNCName = "p:Developer@COMPANY.COM"

objSapCon.SNCQuality = 3

If objSapCon.Logon(0, True) <> True Then

    objSapCon.LastError

Else

    MsgBox ("Logon ok!")

End If

-------------

Any help, comments... are welcome!

BR

Florian May

Former Member
0 Kudos

Hi,

it seems that we solved the problem.

In our case the SNC login type changed but the error message doesn't show that in the details.

Generally when this error message comes up check the parameter for missing or invalid values:

objSapCon.Client = "100"

objSapCon.ApplicationServer = "servapk01"

objSapCon.System = "K01"

objSapCon.SystemNumber = "01"

objSapCon.User = "Developer"

objSapCon.Language = "EN"

objSapCon.autologon = 1

objSapCon.SNC = True

objSapCon.SNCName = "p:Developer@COMPANY.COM"

objSapCon.SNCQuality = 3

Answers (2)

Answers (2)

former_member204677
Active Participant
0 Kudos

Hi Florian,

please use SAP GUI 7.40 Patch 3 Hotfix 1 that was released today. There was made a correction to this FunctionControl which should refer to that error...

Kind regards;
Martin

Former Member
0 Kudos

@ Eric:

Here are the information:

@Martin:

Thanks a lot! I will give the information to the corresponding department for a check. I will come back to you when I get a reply.

former_member194094
Active Participant
0 Kudos

Hello Florian.

I guess hotfix 1 will help solve that issue.

Kind regards,

Eric

Former Member
0 Kudos

Hi,

thanks Eric and Martin.

Our team installed the given hotfix 1 (gui740_03_1-10013011.exe) on a local and on our test machine but the error occured with the same error messages for the following applications:

  • Microsoft Excel VBA
  • SAP Online Transport Management System
  • SAP ChaRM and Incident Mgt CRM (SAP NetWeaver)
  • Test Management
  • CBTA

We checked this with three different peoples.

Are there any other ideas?

Btw: The "Generate Shortcut" within SAP works as designed.

@Eric

How can we check if the the RFC library was upgrated? Can you show me the path where I should find the file?

former_member194094
Active Participant
0 Kudos

Hello Florian.

see note 413708 - Current RFC library.

Kind regards,

Eric

Former Member
0 Kudos

Hi Erik,

enclosed the file properties:

If you need the properties in english language - no problem

Both files are stored here:   ‪C:\Windows\SysWOW64\

Does it looks okay?

BR

Florian

Former Member
0 Kudos

Hi Eric ,

Looks like note 413708  means SAP removes the option to connect  directly from VBA to SAP ,

Do you know if there is any other way to do it  as from sapgui 7.4 ?

Regards

paul_gendreau
Contributor
0 Kudos

Please notice that the application server name in your code is not the application server name in the error message.

ALso note that the error message is DNS related ... it cannot resolve the name of the app server. 

PLease confirm:

1. The app server name in code is correct.

2  You can connect to that app server using GUI.

If both are true then I have a work around (ugly) but have not solved the problem. In my inbox test landscape I have multiple instances with the same SID.   I have found that 7.40 is caching the App Server name or IP of the first machine.  Even when I supply the new app server name or IP the connection is made with the older, and I have not found where it is stored. 

ttemporarily renaming an INI file in your roaming profile will allow your code to procede. 

- Paul

former_member194094
Active Participant
0 Kudos

Hello Florian,

Are you using GUI patch level 3 ? What is your SAP Kernel -> was the RFC library upgraded also ?

You can activate a SAP Logon Control trace - see 308929 and look for generated errors within the logs.

Kind regards,

Eric