cancel
Showing results for 
Search instead for 
Did you mean: 

SAP 9.3 PL 06 - Update Packing List with batch/serial and bin location

0 Kudos

Hi everyone,

I have a problem with the selection of the batch/serial, managed at locations. I followed the documentation you can follow at the link below:

Pick List in SAP Business One SDK

but unfortunately it does not work, I copy the code that I use and the snapshot of the pick list. Can someone tell me where I'm wrong?

go = doc.GetReleasedAllocation(AbsEntry)

'batch
doc.Lines.SetCurrentLine(0)
doc.Lines.BatchNumbers.BatchNumber = "L01"
doc.Lines.BatchNumbers.Quantity = 10
doc.Lines.BatchNumbers.BaseLineNumber = 0

'Binloc
doc.Lines.BinAllocations.BinAbsEntry = GetBinAbs("02-C1-S1-P1", "02")
doc.Lines.BinAllocations.BaseLineNumber = 0
doc.Lines.BinAllocations.Quantity = 10
doc.Lines.BinAllocations.SerialAndBatchNumbersBaseLine = 0

'serial
doc.Lines.SetCurrentLine(1)
doc.Lines.SerialNumbers.InternalSerialNumber = "S03"
doc.Lines.SerialNumbers.Quantity = 1
doc.Lines.SerialNumbers.BaseLineNumber = 1

'Binloc
doc.Lines.BinAllocations.BinAbsEntry = GetBinAbs("02-C1-S1-P1", "02")
doc.Lines.BinAllocations.BaseLineNumber = 1
doc.Lines.BinAllocations.Quantity = 1
doc.Lines.BinAllocations.SerialAndBatchNumbersBaseLine = 0

go = (doc.UpdateReleasedAllocation() = 0)

If Not go Then Windows.Forms.MessageBox.Show(SboCy.GetLastErrorDescription)

the error is always the same:

"Cannot add row without complete selection of batch/serial numbers"

U01 --> manager batch

U02 --> manager serial

tables:

Accepted Solutions (0)

Answers (1)

Answers (1)

edy_simon
Active Contributor
0 Kudos

Hi Enrico,

When updating a pick list with Batch/Serial Number, you need to update the Batch and Serial Number in the base document also.
Example, If your Pick List is based on SO, you need to update the SO first with the batch information before you update the Pick List.
On SAP Application, this is done by the application for us automatically, but for DI, we need to handle this ourselves.

Regards
Edy