Q
Problem solve Get help with specific problems with your technologies, process and projects.

Logging off SAP

We are using VB to communicate with SAP throughout DCOM Connector. I was following the VB example to set up the Session object and logon to SAP. In the examples, there is no logoff method. I need to set the Session Object to logoff from SAP. However, this sometimes does not log off properly. We found that sometimes we get a error log in the system log(SM21). The log is as following:
R49 Communication Error, CPIC return code 020, SAP return code 233
R5A, Conversation ID: 99860671
R64 CPI-C Function: CMSEND(SAP)
And in SM04, sometimes the user remains there for a long time.

Here is the VB code that I am using to logon and end the program.
Set objQuoteSession = CreateObject("SAP.QuoteCreationSession")
objQuoteSession.PutSessionInfo strServerName, UserName, Password, Language, Client
Boo = objQuoteSession.Logon(strError)
Set objQuotation = objQuoteSession.CreateInstance("CAN.Quote")
................
Set objQuotation = Nothing
Set objQuoteSession = Nothing

Could you tell me what I did wrong? Is there a proper way to logoff from SAP?


Your code looks correct to me. Please report this as a possible bug to SAP.


Dig Deeper on SAP Basis

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchERP

SearchOracle

SearchDataManagement

SearchAWS

SearchBusinessAnalytics

SearchContentManagement

SearchHRSoftware

Close