2025 Aug 20 3:25 PM - edited 2025 Aug 20 3:31 PM
Dear all
I am facing a challenge where I have to make an A/R Invoice document (through SAP B1 DI API) with some items that have a Sales BoM (Non Inventory Item) and some of the child items of these parent/BoM items are batch managed.
In case of NON-BATCH items, I would just have one line in the document and set parent item code and post the A/R Invoice and it automatically fetches and sets the child items without any issue. But in case of a Batch Managed child items, I get the "Cannot Add Row Without Complete Selection of Batches" error because it expects the batches to be set for the child items.
Now, what I do not understand is that how do I link the the batches of these child items with their item codes/lines. Because, the child lines/items are not fetched/set before the document is posted, it only happens AFTER you post it.
I tried setting the batches for the parent line but that does not work.
I tried manually fetching the child items (with query from ITT1) and adding new rows and set their batches, but even that doesn't work because the actual child items of the parent item are still not getting their batches set.
Also, fetching and setting child items manually just adds additional lines on top of the parent/child combination (verified by posting the draft invoice document).
So far, the only solution I can think of is that since I can successfully post an A/R Invoice draft (which also fetches and sets the child items of the Sales BoM Item), I should just post draft, fetch it again, and then set the batches. However, that is a longer route and has a higher cost, so, I would want to avoid that.
Has anyone encountered the above issue and successfully resolved it?
Thanks in advance
Regards
Request clarification before answering.
Hi @saadsabri
The error you mentione is a classic limitation when working with Sales BoM non-inventory parent items and batch-managed child items in SAP Business One through the DI API.
Here are the reasons why you get the Error
Here are options to Solve the error
Here is my Recommendation
The officially supported and most stable method is either:
Both approaches are clean-core and avoid difficult workarounds.
SAP Business One DI API 10.0 - Objects Reference (10.00.290)
I am happy to help if you have further questions.
Best regards
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 30 | |
| 17 | |
| 16 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.