Skip to Content
author's profile photo Former Member
Former Member

Zero quantities are being shown as 1 while adding AR delivery using DIAPIs

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Oct 25, 2006 at 06:51 AM

    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
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Morkel,

      Thank you for the reply.

      But, I was able to create a sales Delivery note with zero quantity from the SBO client UI.

      But when Iam creating a delivery note using DIAPis (using the code I pasted in my previous message),

      the zero quantities are being defaulted to 1.

      Please advise.

      Regards,

      Sudha

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.