Skip to Content
0
Former Member
Jan 16, 2006 at 02:35 AM

Error trying to use multiple lines from a PO in a Goods Receipt PO

50 Views

I get the following error when I try to add 2 lines from a PO to a single Goods Receipt PO (code below):

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

I can create the Goods Receipt PO if I use 1 line or lines from multiple PO's???

			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 = 11;
			poReceipt2.Lines.BaseLine = 0;
			poReceipt2.Lines.BaseType = 22;
			poReceipt2.Lines.Add();
			poReceipt2.Lines.Quantity = 5;
			poReceipt2.Lines.ItemCode = "LAMFIL";
			poReceipt2.Lines.BaseEntry = 11;
			poReceipt2.Lines.BaseLine = 1;
			poReceipt2.Lines.BaseType = 22;
			poReceipt2.Add();

Any help is appreciated!

Thanks,

Daniel