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.