The evolution of SAP Business One continues to bring powerful enhancements for developers. With SAP Business One 10.0 FP 2508, a significant new interface was introduced in the DI API to support the creation of target documents from Pick Lists.
This enhancement provides a much-needed, direct method to link documents created from base documents (such as Sales Orders) to Pick List data. This is accomplished using two new properties:
SAPbobsCOM.Documents.Lines.PickLists.PickListEntry
SAPbobsCOM.Documents.Lines.PickLists.PickListLineNum
But how does this new feature perform in the real world? In this blog, we will put it to the test and explore how this functionality behaves under four different inventory configurations and business scenarios. While this blog uses Delivery Notes as examples, the same principles apply to other supported target documents created using the DI API. Let's dive in.
Scenario 1 : Items are NOT managed by Batches / Serial Numbers and Warehouses are NOT allocated by Bin Locations
Case A : Behavior of Delivery creation from one Pick List among multiple Pick Lists for a single Sales Order
- Create a Sales Order with a quantity of 10.
- Generate three Pick Lists based on the Sales Order with the following quantities:
- Pick List 1 → Quantity: 2
- Pick List 2 → Quantity: 3
- Pick List 3 → Quantity: 5
- Pick List 1 → Quantity: 2
- From Pick List 2, pick a quantity of 3.
- Create a Delivery Note based on the Sales Order and Pick List 2 using the DI API code. For example:
SAPbobsCOM.Documents oDocuments = null;
SAPbobsCOM.Document_Lines oDocument_Lines = null;
oDocuments = (SAPbobsCOM.Documents)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDeliveryNotes);
oDocument_Lines = oDocuments.Lines;
oDocuments.CardCode = "C20000";
oDocument_Lines.BaseEntry = 407;
oDocument_Lines.BaseLine = 0;
oDocument_Lines.BaseType = 17;
oDocument_Lines.Quantity = 3;
//Pick List Reference
oDocument_Lines.PickLists.PickListEntry = 57; //PickList AbsEntry (AbsEntry From PKL1)
oDocument_Lines.PickLists.PickListLineNum = 0; //PickList Line Number (PickEntry From PKL1)
int RetVal = oDocuments.Add();
Result:
- In the DLN1 table, the field PickIdNo is correctly updated with the correct Pick List AbsEntry.
- Only Pick List 2 (the one used in the Delivery) is closed, while the other two Pick Lists remain open.
Scenario 2 : Items are managed by Batches / Serial Numbers and Warehouses are NOT allocated by Bin Locations
Case A : Behavior of Delivery Creation from a Pick List for a single-line Sales Order with full quantity allocated to a single batch
- Create a Sales Order with a quantity of 10, and assign the entire quantity to a single batch (for example: B11).
- Generate a Pick List based on the Sales Order and allocate all 10 quantity to the same batch (B11).
- Pick the entire quantity (10 quantity) from the Pick List.
- Create a Delivery Note based on the Sales Order and Pick List for the full picked quantity using the DI API code. For example:
SAPbobsCOM.Documents oDocuments = null;
SAPbobsCOM.Document_Lines oDocument_Lines = null;
oDocuments = (SAPbobsCOM.Documents)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDeliveryNotes);
oDocument_Lines = oDocuments.Lines;
oDocuments.CardCode = "C20000";
oDocument_Lines.BaseEntry = 408;
oDocument_Lines.BaseLine = 0;
oDocument_Lines.BaseType = 17;
oDocument_Lines.Quantity = 10;
//Batch Allocation
oDocument_Lines.BatchNumbers.BaseLineNumber = 0;
oDocument_Lines.BatchNumbers.BatchNumber = "B11";
oDocument_Lines.BatchNumbers.Quantity = 10;
//Pick List Reference
oDocument_Lines.PickLists.PickListEntry = 59; //PickList AbsEntry (AbsEntry From PKL1)
oDocument_Lines.PickLists.PickListLineNum = 0; //PickList Line Number (PickEntry From PKL1
int RetVal = oDocuments.Add();
Result:
- In the DLN1 table, the field PickIdNo is correctly updated with the correct Pick List AbsEntry.
- The Pick List is successfully closed after creating the Delivery.
Scenario 3 : Items are NOT managed by Batches / Serial Numbers and Warehouses are allocated by Bin Locations
Case A : Behavior of Delivery creation from a Pick List for a single-line Sales Order with full quantity allocated to a single bin location
- Create a Sales Order with a quantity of 10 in a warehouse that is enabled for bin locations.
- Generate a Pick List based on the Sales Order and allocate the full quantity (10 quantity) to a single bin location.
- Pick the entire 10 quantity from the specified bin location.
- Create a Delivery Note for the picked quantity using the DI API. For example:
SAPbobsCOM.Documents oDocuments = null;
SAPbobsCOM.Document_Lines oDocument_Lines = null;
oDocuments = (SAPbobsCOM.Documents)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDeliveryNotes);
oDocument_Lines = oDocuments.Lines;
oDocuments.CardCode = "C20000";
oDocument_Lines.BaseEntry = 388;
oDocument_Lines.BaseLine = 0;
oDocument_Lines.BaseType = 17;
oDocument_Lines.Quantity = 10;
//Bin Allocation
oDocument_Lines.BinAllocations.BaseLineNumber = 0;
oDocument_Lines.BinAllocations.BinAbsEntry = 2;
oDocument_Lines.BinAllocations.Quantity = 10;
//Pick List Reference
oDocument_Lines.PickLists.PickListEntry = 36; //PickList AbsEntry (AbsEntry From PKL1)
oDocument_Lines.PickLists.PickListLineNum = 0; //PickList Line Number (PickEntry From PKL1)
oDocument_Lines.PickLists.PickListBatchAndBinLineNum = 0; //PKL2 Line Number (Pkl2LinNum in PKL2 table)
int RetVal = oDocuments.Add();
Result:
- In the DLN1 table, the field PickIdNo is correctly updated with the corresponding Pick List AbsEntry.
- The Pick List is successfully closed after the Delivery is created.
Case B : Behavior of partial Delivery from a Pick List with quantity allocated across multiple bin locations
- Create a Sales Order with a total quantity of 10.
- Generate a Pick List based on the Sales Order and allocate quantities across two different bin locations:
- Line 1 → Quantity: 4
- Line 2 → Quantity: 6
- Perform partial picking as follows:
- Pick 1 quantity from Line 1
- Pick 2 quantities from Line 2
- Create a Delivery Note for the picked quantity (1 quantity from Line 1) using the DI API. Example:
SAPbobsCOM.Documents oDocuments = null;
SAPbobsCOM.Document_Lines oDocument_Lines = null;
oDocuments = (SAPbobsCOM.Documents)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDeliveryNotes);
oDocument_Lines = oDocuments.Lines;
oDocuments.CardCode = "C20000";
oDocument_Lines.BaseEntry = 399;
oDocument_Lines.BaseLine = 0;
oDocument_Lines.BaseType = 17;
oDocument_Lines.Quantity = 1;
//Bin Allocation
oDocument_Lines.BinAllocations.BaseLineNumber = 0;
oDocument_Lines.BinAllocations.BinAbsEntry = 2;
oDocument_Lines.BinAllocations.Quantity = 1;
//Pick List Reference
oDocument_Lines.PickLists.PickListEntry = 47; //PickList AbsEntry (AbsEntry From PKL1)
oDocument_Lines.PickLists.PickListLineNum = 0; //PickList Line Number (PickEntry From PKL1)
oDocument_Lines.PickLists.PickListBatchAndBinLineNum = 0; //PKL2 Line Number (Pkl2LinNum in PKL2 table)
int RetVal = oDocuments.Add();
Result:
The Pick List is partially updated:
- The Line 2 remains unchanged, as it is not referenced in the Delivery document.
- The SAP Business One client displays the Pick List with updated values, showing the partially delivered quantities.
Scenario 4 : Items are managed by Batches / Serial Numbers and Warehouses are allocated by Bin Locations
Case A : Behavior of partial Delivery from a Pick List with multiple batch and bin location allocations
- Create a Sales Order with a total quantity of 10, and allocate the quantity across two different batches.
- Generate a Pick List based on the Sales Order.
- Assign each batch quantity to different bin locations. For example:
- Batch B1 → Assigned to one bin location
- Batch B2 → Assigned to another bin location
- Batch B1 → Assigned to one bin location
- The Pick List is displayed in the SAP Business One client reflecting the batch and bin allocations.
- Perform partial picking as follows:
- Pick 1 quantity from the 2nd line
- Pick 1 quantity from the 3rd line
- Create a Delivery Note for the picked quantities (2 quantities in total) using the DI API. Example:
SAPbobsCOM.Documents oDocuments = null;
SAPbobsCOM.Document_Lines oDocument_Lines = null;
oDocuments = (SAPbobsCOM.Documents)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDeliveryNotes);
oDocument_Lines = oDocuments.Lines;
oDocuments.CardCode = "C20000";
oDocument_Lines.BaseEntry = 403;
oDocument_Lines.BaseLine = 0;
oDocument_Lines.BaseType = 17;
oDocument_Lines.Quantity = 2;
//Batch Allocation
oDocument_Lines.BatchNumbers.BaseLineNumber = 0;
oDocument_Lines.BatchNumbers.BatchNumber = "B1"; ;
oDocument_Lines.BatchNumbers.Quantity = 1;
oDocument_Lines.BatchNumbers.Add();
oDocument_Lines.BatchNumbers.BaseLineNumber = 0;
oDocument_Lines.BatchNumbers.BatchNumber = "B2"; ;
oDocument_Lines.BatchNumbers.Quantity = 1;
//Bin Allocation
oDocument_Lines.BinAllocations.BaseLineNumber = 0;
oDocument_Lines.BinAllocations.BinAbsEntry = 26;
oDocument_Lines.BinAllocations.Quantity = 1;
oDocument_Lines.BinAllocations.SerialAndBatchNumbersBaseLine = 0;
oDocument_Lines.BinAllocations.Add();
oDocument_Lines.BinAllocations.BaseLineNumber = 0;
oDocument_Lines.BinAllocations.BinAbsEntry = 2;
oDocument_Lines.BinAllocations.Quantity = 1;
oDocument_Lines.BinAllocations.SerialAndBatchNumbersBaseLine = 1;
//Pick List Reference
oDocument_Lines.PickLists.PickListEntry = 51; //PickList AbsEntry (AbsEntry From PKL1)
oDocument_Lines.PickLists.PickListLineNum = 0; //PickList Line Number (PickEntry From PKL1)
oDocument_Lines.PickLists.PickListBatchAndBinLineNum = 1; //PKL2 Line Number (Pkl2LinNum in PKL2 table)
oDocument_Lines.PickLists.Add();
oDocument_Lines.PickLists.PickListEntry = 51; //PickList AbsEntry (AbsEntry From PKL1)
oDocument_Lines.PickLists.PickListLineNum = 0; //PickList Line Number (PickEntry From PKL1)
oDocument_Lines.PickLists.PickListBatchAndBinLineNum = 2; //PKL2 Line Number (Pkl2LinNum in PKL2 table)
int RetVal = oDocuments.Add();
Result:
- The remaining quantities in the Pick List stay open and unchanged.
- The Pick List is partially updated after the Delivery is created.
Key Takeaways
The introduction of Pick List reference properties in SAP Business One 10.0 FP 2508 provides essential functionality for DI API developers. Here are the key takeaways:
- Explicit Control: Developers can now programmatically link target documents (e.g., Delivery Notes) to specific Pick Lists using the PickListEntry and PickListLineNum properties.
- Problem Solved: This resolves the previous system behavior where creating a target document via DI API would close all associated Pick Lists indiscriminately. This fix is reflected in the updates to SAP Notes 3444183 and 2252361.
- Consistent Application: The logic demonstrated with Delivery Notes is consistently applied across various inventory scenarios and is applicable to all supported target documents created from Pick Lists.
With this enhancement, developers can build more robust and accurate fulfillment automations. For a comprehensive overview of related functionalities, refer to the blog Pick List in SAP Business One SDK.



