cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

PickListsService_UpdateReleasedAllocation

sam1ul
Newcomer
0 Kudos
455

Hi Everyone,

I’m facing an issue while working with SAP Business One Service Layer when trying to update bin allocations for child items in a Sales BOM.

Here’s the scenario:

  • I have a Sales Order with a mix of Sales BOM (parent items) and child items (inventory-managed).

  • I’m creating and updating PickLists using the Service Layer.

  • For parent items in the Sales BOM, bin allocations are not applicable as they are non-inventory items. However, for child items, I’m attempting to allocate bins.

Here’s what I’ve noticed:

  1. I’m using a JSON structure to update the PickLists, including the DocumentLinesBinAllocations array for child items.

  2. While some bins are successfully updated, a few child items fail to reflect the correct bin allocations.

  3. PreviouslyReleasedQuantity for all lines is correctly set, and I’ve verified the BinAbsEntry values exist and are active in the system.

Here’s an example of the update JSON I’m sending:

{
    "PickList": {
        "Absoluteentry": 107486,
        "ObjectType": "156",
        "PickListsLines": [
            {
                "AbsoluteEntry": 107486,
                "LineNumber": 0,
                "BaseObjectType": "17",
                "OrderEntry": 82541,
                "OrderRowID": 0,
                "ReleasedQuantity": 1,
                "PreviouslyReleasedQuantity": 1,
                "PickStatus": "ps_Released",
                "PickedQuantity": 0,
                "DocumentLinesBinAllocations": [
                    {
                        "BinAbsEntry": 3,
                        "BaseLineNumber": 0,
                        "Quantity": 1,
                        "AllowNegativeQuantity": "tNO"
                    }
                ],
                "SerialNumbers": []
            },
            {
                "AbsoluteEntry": 107486,
                "LineNumber": 1,
                "BaseObjectType": "17",
                "OrderEntry": 82541,
                "OrderRowID": 2,
                "ReleasedQuantity": 1,
                "PreviouslyReleasedQuantity": 1,
                "PickStatus": "ps_Released",
                "PickedQuantity": 0,
                "DocumentLinesBinAllocations": [
                    {
                        "BinAbsEntry": 3,
                        "BaseLineNumber": 2,
                        "Quantity": 1,
                        "AllowNegativeQuantity": "tNO"
                    }
                ],
                "SerialNumbers": []
            },
            {
                "AbsoluteEntry": 107486,
                "LineNumber": 2,
                "BaseObjectType": "17",
                "OrderEntry": 82541,
                "OrderRowID": 3,
                "ReleasedQuantity": 1,
                "PreviouslyReleasedQuantity": 1,
                "PickStatus": "ps_Released",
                "PickedQuantity": 0,
                "DocumentLinesBinAllocations": [
                    {
                        "BinAbsEntry": 3,
                        "BaseLineNumber": 3,
                        "Quantity": 1,
                        "AllowNegativeQuantity": "tNO"
                    }
                ],
                "SerialNumbers": []
            },
            {
                "AbsoluteEntry": 107486,
                "LineNumber": 3,
                "BaseObjectType": "17",
                "OrderEntry": 82541,
                "OrderRowID": 4,
                "ReleasedQuantity": 1,
                "PreviouslyReleasedQuantity": 1,
                "PickStatus": "ps_Released",
                "PickedQuantity": 0,
                "DocumentLinesBinAllocations": [
                    {
                        "BinAbsEntry": 3,
                        "BaseLineNumber": 4,
                        "Quantity": 1,
                        "AllowNegativeQuantity": "tNO"
                    }
                ],
                "SerialNumbers": []
            },
            {
                "AbsoluteEntry": 107486,
                "LineNumber": 4,
                "BaseObjectType": "17",
                "OrderEntry": 82541,
                "OrderRowID": 6,
                "ReleasedQuantity": 1,
                "PreviouslyReleasedQuantity": 1,
                "PickStatus": "ps_Released",
                "PickedQuantity": 0,
                "DocumentLinesBinAllocations": [
                    {
                        "BinAbsEntry": 3,
                        "BaseLineNumber": 6,
                        "Quantity": 1,
                        "AllowNegativeQuantity": "tNO"
                    }
                ],
                "SerialNumbers": []
            },
            {
                "AbsoluteEntry": 107486,
                "LineNumber": 5,
                "BaseObjectType": "17",
                "OrderEntry": 82541,
                "OrderRowID": 7,
                "ReleasedQuantity": 1,
                "PreviouslyReleasedQuantity": 1,
                "PickStatus": "ps_Released",
                "PickedQuantity": 0,
                "DocumentLinesBinAllocations": [
                    {
                        "BinAbsEntry": 3,
                        "BaseLineNumber": 7,
                        "Quantity": 1,
                        "AllowNegativeQuantity": "tNO"
                    }
                ],
                "SerialNumbers": []
            }
        ],
        "Status": "ps_Released",
        "UseBaseUnits": "tNO"
    }
}

Despite this structure, the bin allocations fail for some child items. The LineNumber and BaseLineNumber mappings to the Sales Order lines have been double-checked and seem correct.

What I’ve Tried:

  1. Calling PickListsService_UpdateReleasedAllocation before sending the update JSON to ensure released quantities align.

  2. Adding and removing optional fields like AllowNegativeQuantity and SerialAndBatchNumbersBaseLine.

  3. Verifying the bin statuses and quantities in the OBIN table.

Questions:

  1. Has anyone encountered a similar issue where child items in a Sales BOM do not update correctly in picklists?

  2. Are there any specific configurations or prerequisites I should verify for child items in picklists?

  3. Could this be related to how the Service Layer processes Sales BOM structures or the relationship between parent and child items?

Any insights or advice would be greatly appreciated! 😊

Best regards,

Accepted Solutions (0)

Answers (0)