Hi Javier,
you are right and I was not aware. BinAllocation Lines are not present in the object when they were not picked yet.
I wrote a little C# example - I think it is self explained :
int PickLine = 1; double PickQuantity = 1; int PickBinAbsEntry = 1; SAPbobsCOM.PickLists oPickList = SBO_Company.GetBusinessObject(BoObjectTypes.oPickLists); oPickList.GetByKey(7); oPickList.Lines.SetCurrentLine(0);//You just need to set the line oPickList.Lines.PickedQuantity += PickQuantity; // ! add the picked quantity to the already picked bool foundbin = false; for (int i = 0; i < oPickList.Lines.BinAllocations.Count; i++) { oPickList.Lines.BinAllocations.SetCurrentLine(i); if (oPickList.Lines.BinAllocations.BinAbsEntry == PickBinAbsEntry)//Check if bin was picked from { oPickList.Lines.BinAllocations.Quantity += PickQuantity; foundbin = true; break; } } if (!foundbin) { oPickList.Lines.BinAllocations.Add(); oPickList.Lines.BinAllocations.BinAbsEntry = PickBinAbsEntry; oPickList.Lines.BinAllocations.Quantity = PickQuantity; } if (oPickList.Update() != 0) { SBO_Application.MessageBox("Error : " + SBO_Company.GetLastErrorDescription()); }
Hope it helps,
Maik