Hi,
When I migrate items with zero quantity into sales Delivery Notes, Quantity
is being defaulted to 1 as opposed to the expected zero quantity.
Below is the code Iam using to migrate to a delivery note.
SAPbobsCOM.Documents vDLN = (SAPbobsCOM.Documents)
conn.InternalConnection.GetBusinessObject
(SAPbobsCOM.BoObjectTypes.oDeliveryNotes);
vDLN.CardCode = "C20000";
vDLN.Lines.SetCurrentLine(0);
vDLN.Lines.ItemCode = "A00001";
vDLN.Lines.Quantity = 0;
string errMsg;
int errCode;
int returnval = vDLN.Add();
if (0 != returnval) {
conn.InternalConnection.GetLastError(out errCode, out errMsg);
Console.WriteLine(errMsg);
return;
}
When I see in SAP Business one for the delivery note created, it has 1
Quantity.
Please advise.
Regards,
Sudha
Hi Sudha,
SBO does not allow zero quantity sales Delivery Notes. That is why the system defaults it to 1. This is a system rule - a delivery item can not have zero in the quantity property.
Add a comment