Ask the Expert

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:

    Requires Free Membership to View

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.

This was first published in October 2001

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: