Skip to Content
0
Former Member
Aug 03, 2013 at 10:08 AM

Hi expert...

46 Views

I am using SAP B1 8.82 PL-9, Visual Studio 2008 , i have face below error in code debugging.

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

the error is showing when i add row in matrix.

(same code are working in other screen in properly but when i use this code in another screen then i got the error)

my code is

protected override void etAddRowAfterAction(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)

{

BubbleEvent = true;

try

{

if (((SAPbouiCOM.Folder)oForm.Items.Item("FLD_PAY").Specific).Selected == true)

{

oMATPay.FlushToDataSource();

if (oMATPay.VisualRowCount > 0)

{

oDBPay.InsertRecord(oMATPay.VisualRowCount); //// I got error this line ..

oMATPay.LoadFromDataSource();

}

oMATPay.LoadFromDataSource();

}

else if (((SAPbouiCOM.Folder)oForm.Items.Item("FLD_DED").Specific).Selected == true)

{

oMATDed.FlushToDataSource();

if (oMATDed.VisualRowCount > 0)

{

oDBDed.InsertRecord(oMATDed.VisualRowCount); //// I got error this line ..

oMATDed.LoadFromDataSource();

}

oMATDed.LoadFromDataSource();

}

else if (((SAPbouiCOM.Folder)oForm.Items.Item("FLD_REM").Specific).Selected == true)

{

oMATRem.FlushToDataSource();

if (oMATRem.VisualRowCount > 0)

{

oDBRem.InsertRecord(oMATRem.VisualRowCount); //// I got error this line ..

oMATRem.LoadFromDataSource();

}

oMATRem.LoadFromDataSource();

}

else if (((SAPbouiCOM.Folder)oForm.Items.Item("FLD_AR").Specific).Selected == true)

{

oMATAr.FlushToDataSource();

if (oMATAr.VisualRowCount > 0)

{

oDBAr.InsertRecord(oMATAr.VisualRowCount); //// I got error this line ..

oMATAr.LoadFromDataSource();

}

oMATAr.LoadFromDataSource();

}

else if (((SAPbouiCOM.Folder)oForm.Items.Item("FLD_BEN").Specific).Selected == true)

{

oMATBen.FlushToDataSource();

if (oMATBen.VisualRowCount > 0)

{

oDBBen.InsertRecord(oMATBen.VisualRowCount); //// I got error this line ..

oMATBen.LoadFromDataSource();

}

oMATBen.LoadFromDataSource();

}

else if (((SAPbouiCOM.Folder)oForm.Items.Item("FLD_LEV").Specific).Selected == true)

{

oMATLev.FlushToDataSource();

if (oMATLev.VisualRowCount > 0)

{

oDBLev.InsertRecord(oMATLev.VisualRowCount); //// I got error this line ..

oMATLev.LoadFromDataSource();

}

oMATLev.LoadFromDataSource();

}

else if (((SAPbouiCOM.Folder)oForm.Items.Item("FLD_LON").Specific).Selected == true)

{

oMATLon.FlushToDataSource();

if (oMATLon.VisualRowCount > 0)

{

oDBLon.InsertRecord(oMATLon.VisualRowCount); //// I got error this line ..

oMATLon.LoadFromDataSource();

}

oMATLon.LoadFromDataSource();

}

else if (((SAPbouiCOM.Folder)oForm.Items.Item("FLD_TAX1").Specific).Selected == true)

{

oMatrix.FlushToDataSource();

if (oMatrix.VisualRowCount > 0)

{

oDBInvst.InsertRecord(oMatrix.VisualRowCount); //// I got error this line ..

oMatrix.LoadFromDataSource();

}

oMatrix.LoadFromDataSource();

}

else if (((SAPbouiCOM.Folder)oForm.Items.Item("FLD_TAX2").Specific).Selected == true)

{

oMatrix.FlushToDataSource();

if (oMatrix.VisualRowCount > 0)

{

oDBInvst.InsertRecord(oMatrix.VisualRowCount); //// I got error this line ..

oMatrix.LoadFromDataSource();

}

oMatrix.LoadFromDataSource();

}

}

catch (Exception ex)

{

ClsSBOAddOn.SBOApplication.StatusBar.SetText(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);

BubbleEvent = false;

}

}

Thanks & Regards,

Sandeep Kr.