UPDATE: SAP Now finally have a SAP Note on the issue: http://service.sap.com/sap/support/notes/2316048
Hi all
At the moment we are seeing some instability issues with SAP's DI-API that affect some on our users. This article explains the details on the issue and how to work around it:
Q: Who is affected?
A: Only a small amount our customers are affected. They have a much higher than normal amount of random errors all mentioning error "Server Threw an Exception" here is a few samples on how the error look like:
Q: What SAP versions are affected?
A: SAP 9.0 and higher
Q: Why does it happen and how can I fix it?
A: The reason is quite technical (see at bottom) but it is related to if you use Crystal Reports with the "SAP Business One" driver". If you stop using the driver (see how you switch the driver here: https://youtu.be/j7kpj2tR3d4) and instead use OLEDB (MSSQL) / ODBC (HANA) the issue goes away. This is also describe in SAP note 2316048
Q: How can it be a Crystal Report issue. When I see the error I'm not using Crystal!?!
A: The main issue here is that when a crystal is being used (by SAP/Add-on) and it use the SAP Business One driver in the crystal if mess up the DI-API connection and that why any other operation after just showing a crystal on the machine can cause the error (aka not only crystal work result in the error)
Q: What are you doing about it?
A: Since the core issue happen in SAP part of the code we are in their hands to have it fixed - See SAP note 2316048 - http://service.sap.com/sap/support/notes/2316048.
SAP latest status is that they will fix the core issue in SAP 9.3
Q: Any other ways around the issue?
A: The long term thing is to follow SAP's note 2316048 on the matter but if you are on MSSQL we have also created a workaround the issue by reading the data via Microsoft instead of SAP's DI-API. This have proven successful in greatly reducing the error rate so if you have the issue here and now it is possible to apply the workaround. In order to get the workaround you need to be on at least B1UP 2015.10 (http://www.boyum-it.com/sbo). Once on this version you can in the main configuration on the option page switch to "ADO-Read mode" which apply the workaround.
Q: I'm technical - what is the problem in more details?
A: The error originate in instantiating the DI-API Record object. when oCompany.GetBusinessObject(oRecordset); is called SAP throw exception "Server threw an exception". This is due to a bug in the way SAP have implemented Crystal Report drivers for SAP Business One where these drivers "mess up" the shared DI-API and cause the issue.