cancel
Showing results for 
Search instead for 
Did you mean: 

Create the Delivery Notes

Former Member
0 Kudos

Hi, all

The Document in oinv and inv1 with DocEntry 18 is exist,

ItemCode have not binding with batch or series,

i want create the Delivery Notes, code C#:

SAPbobsCOM.Documents dShipment =

(SAPbobsCOM.Documents)Sbo.Instance.Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDeliveryNotes);

dShipment.DocObjectCode = SAPbobsCOM.BoObjectTypes.oDeliveryNotes;

dShipment.DocDate = DateTime.Now;

dShipment.DocDueDate = DateTime.Now;

dShipment.Comments = "";

dShipment.HandWritten = SAPbobsCOM.BoYesNoEnum.tNO;

dShipment.DocTotal = 100000.00;

dShipment.CardCode = "ÂÅÑÊÎÐ";

dShipment.CardName = "";

dShipment.Lines.ItemCode = "FCA 3430";

dShipment.Lines.Quantity = 1.0;

dShipment.Lines.Price = 100000.00;

dShipment.Lines.BaseType = 13;

dShipment.Lines.BaseEntry = 18;

dShipment.Lines.BaseLine = 0;

int nRet = dShipment.Add();

if(nRet != 0)

{

// error : , 'Error (-1004) encountered.'

}

Delivery Notes don't created

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Gennadiy,

I think the Delivery note is already closed. I did your test in my SBO and got the same error. Go into SBO and test if you can load that delivery note for that customer into an invoice.

Hope it helps,

Adele

Former Member
0 Kudos

Hi, Adele

I solved the problen. I set incorrect DocEntry from base Document, and it conflict with Itemcode.

Thanks!

Answers (0)