Skip to Content
Former Member
May 25, 2011 at 01:48 PM

Closing Freights form by DI API


I'm trying to close the Freights form I just opened using the DI API to set some freights and with the code below however it doesn't close the form and if I use .Close() it works fine on my PC and every PC I try not when I deploy the addon to the customer's pc the .Close crashes SAP with a dump file created. It doesn't make sence at all since we have all the same SAP version and PL and DI API installed I verified all this.

So either I'm not closing the form the right way or there's something I don't see at all.

//FreightForm.Items.Item(1).Click(BoCellClickType.ct_Regular); // Tried this with no success
SAPbouiCOM.Item btOk = (SAPbouiCOM.Item)FreightForm.Items.Item(1);
//FreightForm.Close();  // Crashes on customer's computer but not on my computer at the office.