Skip to Content
Former Member
Oct 26, 2011 at 02:39 PM




We've got an addin installed on a customer site that creates a number of Production Orders based on a Sales Order depending on particular rules that are set up in the data against the Sales Order.

We've currently got a problem where at various times in the code, usually when doing a "ProductionOrder.Add" we are getting either of the following errors. The first one being more common.

*Unable to cast COM object of type 'SAPbouiCOM.ApplicationClass' to interface type 'SAPbouiCOM.IApplication'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{D1F75D47-137C-4335-AC2A-3FE209831B6A}' failed due to the following error: System call failed. (Exception from HRESULT: 0x80010100 (RPC_E_SYS_CALL_FAILED)).Interop.SAPbouiCOM at SAPbouiCOM.ApplicationClass.get_StatusBar()

at OchibaCode.OCHProdConfigurator.CreateProdOrder(Application SBO_Application, String SorderNoInt, String SorderNoExt, String FormTypeID, String FormUID, String TLJobSeries, String TLAJobSeries, String CreateWIP, String CurrentUser)*

*Error: -2147417851

The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))

System.Runtime.InteropServices.COMException (0x80010105): The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))

at SAPbobsCOM.FieldClass.set_Value(Object pVal)

at OchibaCode.OCHProdConfigurator.CopyITT1UDFs(Recordset UDFs, Recordset SourceData, ProductionOrders ProdOrder)*

Now the weird thing is it doesn't always occur in the same position which sort of rules out a data problem and also we've copied the database to a local laptop and ran the code against the same record on here and the problem doesn't occur.

So it looks like somehow the environment is causing the problem. It looks as if possibly there is a problem with memory usage or something where it gets to a particular point and cannot allocate any more memory so just falls over with the error.

Has anyone else come across this problem and if so how can it be resolved?