Skip to Content
avatar image
Former Member

DIAPI: Allocation of batch and bin location in Pick List does not work (SBO 9.2 PL08)

We create a pick list in SBO Client, for a sales order containing one item which is batch managed and comes from a warehouse with bin locations. We do not create allocations of batches and bin locations in SBO client, because we want to perform this step in our scanning appliaction via DIAPI immediately before picking the item from the bin location.

We use the following code to create the allocation:

Dim oPicklist As SAPbobsCOM.PickLists

oPicklist = oSBOCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPickLists)

oPicklist.GetReleasedAllocation(iPickListAbsEntry)

oPicklist.Lines.SetCurrentLine(iPickListPosition)

oPicklist.Lines.BatchNumbers.SetCurrentLine(0)

oPicklist.Lines.BatchNumbers.BatchNumber = "4711-12345678-7"

oPicklist.Lines.BatchNumbers.Quantity = 75

oPicklist.Lines.BatchNumbers.BaseLineNumber = iPickListPosition

iPickBinAbsEntry = cBaseFunctions.getBinLocOrWarehouse("17010101")

oPicklist.Lines.BinAllocations.SetCurrentLine(0)

oPicklist.Lines.BinAllocations.BinAbsEntry = iPickBinAbsEntry

oPicklist.Lines.BinAllocations.Quantity = 75

oPicklist.Lines.BinAllocations.BaseLineNumber = iPickListPosition

oPicklist.Lines.BinAllocations.SerialAndBatchNumbersBaseLine = 0

iRet = oPicklist.UpdateReleasedAllocation()

If iRet <> 0 Then

ThrowNewException("(SBO) " & oSBOCompany.GetLastErrorDescription())

EndIf

When we tested this step some time ago in SBO version 9.2 PL06 HOTFIX, it seemed to work.

Meanwhile we use version 9.2 PL08, and UpdateReleasedAllocation returns
-4014 / " Cannot add row without complete selection of batch/serial numbers ", no matter if we try to allocate the entire quantity or part of it.

The user is an "indirect access user".

The document setting "Allow Pick Lists with Empty BinLocation" off/on did not make a difference.


Does anyone have an idea?

Thank you

Jürgen Möckl

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 23, 2017 at 04:39 PM

    Hi Jurgen,

    I had a similar problem some months ago, probably your picklist is based on a sales order, and this sales order doesn't have any batch assigment. So, before assign the batch to your picklist, you should assign the same batch to your the sales order, update the sales order, and then assign the batch to your picklist.

    I found this on this sap note.

    https://launchpad.support.sap.com/#/notes/1947547

    And if you have some doubt about picklist with bathes and bin locations, I would like to suggest you to see this blog:

    https://blogs.sap.com/2017/03/24/pick-list-in-sap-business-one-sdk/

    Hope it helps.

    Kind Regards,

    Diego Lother

    Add comment
    10|10000 characters needed characters exceeded