Skip to Content
0
Former Member
Jan 16, 2006 at 09:03 PM

One of the base documents has already been closed [PDN1.BaseEntry][line: 1]

868 Views

This error occurs when I create a PO Receipt using 2 lines from a 1 PO document:

One of the base documents has already been closed [PDN1.BaseEntry][line: 1]

Eg if I create a PO with the following:

item:hamsha qty:5 price:$10.0

item:lamfil qty:10 price:$15.0

the DocEntry for the PO when saved is 13

the CardCode is ALL

Then using the DI API I want to create a PO Receipt:

SAPbobsCOM.Documents poReceipt2 = (SAPbobsCOM.Documents)_diApi.SboCompany.GetBusinessObject(BoObjectTypes.oPurchaseDeliveryNotes);
poReceipt2.CardCode = "ALL";
poReceipt2.DocDueDate = DateTime.Now;
poReceipt2.Lines.Quantity = 5;
poReceipt2.Lines.ItemCode = "HAMSHA";
poReceipt2.Lines.BaseEntry = 13; // DocEntry of PO
poReceipt2.Lines.BaseLine = 0;
poReceipt2.Lines.BaseType = 22; // PO type
poReceipt2.Lines.Add();
poReceipt2.Lines.Quantity = 10;
poReceipt2.Lines.ItemCode = "LAMFIL";
poReceipt2.Lines.BaseEntry = 13;
poReceipt2.Lines.BaseLine = 1;
poReceipt2.Lines.BaseType = 22;
poReceipt2.Add();

If I run this the above error occurs. However if I only use 1 line from the PO it works, or if I use 1 line from multiple POs it also works.

Thanks,

Daniel