Hi Javier,
you are doing something wrong :-).
You have 2 PickLines, where the second is having 2 PickBinAllocations but you are only addressing the first BinAllocation line of it:
oDocument.Lines.BinAllocations.BinAbsEntry = G_BinAbs oDocument.Lines.BinAllocations.Quantity = TxtPickedTab2.Text
The BinAllocations are lines to the PickLines, so you also have to SetCurrentline for them.
If your warehouse is always picking the right amounts only from the suggested bin location it is quite easy : Loop through the BinAllocations lines and find the right one.
In praxis this is not always the case - so you have to code a more complex logic.
regards,
Maik