Skip to Content

Error when exporting to Excel from SAPBO - Error 5 occurred at run time

Randomly when exporting from SAP B1 the result of a user query to excel, when automatically opened excel, gives this error;

"The error '5' has occurred at run time: Argument or call to procedure validates"

A few weeks ago we have migrated an installation to SAP 9.3 PL06. (in SQL2016)

It is an installation in which all users work by remote desktop against the same remote desktop server, different from the SQl server and SAP licenses.

Initially, they used as a remote desktop server a Windows Server 2008 R2 Standard server using the 32-bit SAP client. In this environment, the problem did NOT occur.

When we have changed this remote desktop server to a new Windows Server 2016 Standard server, both the 32-bit SAP client and 64-bit randomly do not work to export Excel to some user queries. (Using the toolbar button)

For a while the export of the same query works well, we can get to launch an export 40 times and it works, and at some point it starts to give the error that we attach, while other queries export correctly. When it starts to fail, the error can already be triggered several times in a row. And without knowing why, after a while it starts to work again.

If it is true that queries tend to fail that more rows or more columns have.

A query of the type SELECT cardcode, cardname FROM OCRD T0 with 7500 records is failing, if to that same query we put "top 1000", the export works, and if we return to remove the 7500 records it fails again.

As I said before, the query does not always fail.

We have not been able to determine any more caustic than to indicate - We have tried to review the authorizations on the folders on which the excel files are stored and the folder defined in the company's parameterization to ensure that all users have permissions. In addition, the aforementioned tests have been done by entering the server session as administrator. (As indicated in some entry like

- We have looked at notes and forums about it, and although we have found an answer to a similar error, I cited the permissions on the folder as the source of the problem. And that we have already reviewed

- We have tested tando with the client 32 as with the client 64 bits Does anyone know how we can solve this error? Thanks in advance.

Does anyone know how we can solve this error?


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers