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

Errors while developing apps using VB with SAP DCOM CC

I am currently developing an application using Visual Basic with SAP DCOM CC. I try to call the Edit Methods for the Material object, but it keeps on giving me this error; "Screen output without connection to user." What is wrong? Below is an excerpt of my code:

    Dim vRet As ADODB.Recordset
    Dim vMat As ADODB.Recordset
    Set msapSession = CreateObject("SAP.MaterialSessionComponent.1")
    msapSession.Destination = "MYDEST"
    msapSession.KeepSAPContext = True
    Set msapMaterial = msapSession.CreateInstance("IL.Material.1")

    msapMaterial.InitKeys "000000000031006861"

    msapMaterial.DimAs "BapiEdit", "Return", vRet
'    msapMaterial.DimAs "BapiEdit", "SKIP_1ST_SCREEN", vMat

    msapMaterial.BapiEdit RETURN:=vRet, SKIP_1ST_SCREEN:="X"
    Set DataGrid1.DataSource = vRet

Whenever you see the message "Screen output without connection to user." the BAPI which you called illegally tried to send a message to the SAPGUI user who obviously does not exist. There are three possible reasons for this: a) A bug in the BAPI; b) Your parameters are so bad that the BAPI cannot handle them; c) The customizing in your SAP system is wrong.

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.