Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

256000177 - Document has no electronic series so cannot be updated

andrewsa
Member
0 Kudos
607
  • SAP Managed Tags:

I'm trying to add/update batches on a Sales Order document through the SAP DI API, but am getting the following error when I try to update the document:

256000177 - Document has no electronic series so cannot be updated

oOrder = oSBOCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
retrieve_Document(oSBOCompany, mySODocEntry, oOrder)

oOrder.Lines.SetCurrentLine(orderLine)
oOrder.Lines.BatchNumbers.SetCurrentLine(batchLine)
oOrder.Lines.BatchNumbers.BatchNumber = myBatchNumber
oOrder.Lines.BatchNumbers.Quantity = qtySelected
oOrder.Lines.BatchNumbers.Location = myBin
oOrder.Lines.BatchNumbers.Notes = myNote
oOrder.Lines.BatchNumbers.Add()

oOrder.Lines.BinAllocations.SetCurrentLine(batchLine)
oOrder.Lines.BinAllocations.Quantity = qtySelected
oOrder.Lines.BinAllocations.SerialAndBatchNumbersBaseLine = batchLine
oOrder.Lines.BinAllocations.Add()

iRetCode = oOrder.Update()

Any suggestions on how to resolve the issue?

0 REPLIES 0