Skip to Content
0
May 22, 2018 at 07:03 PM

DI API Round Issue in Goods Receipt Form: Cannot add row without complete batch

935 Views Last edit May 22, 2018 at 07:21 PM 2 rev

Hi Everyone!!!

I have a problem and I was wondering if someone may share some light about it. It is a rounding error while populating a Goods Receipt PO Form with multiple batch numbers using the DI API for SAP 9.2. Most likely, I should round the total quantity received to a particular number of digits, but I don't know what it could be.

To elaborate, I created an application that Automates SAP Business One 9.2 using the DI API. The user identifies the Purchase Order being received and then he enters the received batches and quantities. Once all batches are entered, the application creates a Goods Receipt PO form and posts it. The application works. However, every now and then, the user gets an error after receiving around a dozen batch numbers or so on the same form:

"Error -4014: Cannot add row without complete selection of batch/serial numbers".

I asked the user if he could please receive the provided batches one at a time. The user was kind enough to try one, two and three at a time and everything works. When he tried to receive four at a time, the application received the error previously mentioned.

This behaviour leads me to suspect that this is a rounding issue, where SAP and my application are not using the same number of digits to compute the total quantity received. It would be really helpful to know how many digits should I take into consideration so this scenario does not happen.

Any help is greatly appreciated!!!

Manuel