web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

WHSwork is created for the remaining quantity instead of the reserved quantity

(1) ShareShare
ReportReport
Posted on by 2

Hi everyone,

I am working on a customization for Production orders where we need to reserve raw materials by License Plate (LP) and then generate the corresponding WHS work for the reserved quantity.

I am currently using the standard reservation engine with InventUpd_Reservation to reserve against a specific LP. The reservation is created correctly (e.g., 8 units reserved physically on a specific License Plate).
However, when I release the production order to the warehouse, the WHS work that gets created is not for the reserved quantity (8 units), but instead for the remaining unreserved quantity (e.g., 3 units).

It seems that the WHS work creation logic ignores the reservation created via InventUpd_Reservation and only generates work for the quantity that is still “unreserved” from a WHS perspective.

Is there any way to make WHS work generation respect the reservation performed by InventUpd_Reservation?

Here's the code:

 private void licensePlateReserve()
 {
     ProdBOM                         prodBOMAux;
     WHSInventTable              whsInventTable;
     InventTrans                     inventTrans;
     InventTransOrigin           inventTransOrigin;
     InventSum                      inventSum;
     InventDim                      inventDim, inventDimAux;
     InventMovement             inventMovement;
     InventUpd_Reservation   reservation;
     real                                remainQty;
     boolean                         reserveSuccess          = false;
     Set                                 licensePlatesChecked    = new Set(Types::String);
     WHSWorkTable               whsWork;
 
     remainQty = prodTable.qtySched;
 
     while select prodBOMAux
         join whsInventTable
             where whsInventTable.ItemId == prodBOMAux.ItemId
         join inventDim
             where   inventDim.inventDimId                           == prodBOMAux.InventDimId
                 &&  prodBOMAux.ProdId                               == prodTable.ProdId
     {
         while (remainQty > 0)
         {
             reserveSuccess = false;
             while select inventSum
                 order by LicensePlateId asc
                     where   inventSum.ItemId                     == prodBOMAux.ItemId
                         &&  inventSum.InventLocationId      == inventDim.InventLocationId
                         &&  inventSum.InventSiteId              == inventDim.InventSiteId
                         &&  inventSum.AvailPhysical            > 0
                         &&  inventSum.LicensePlateId           != ''
             {
                 if (licensePlatesChecked.in(inventSum.LicensePlateId))
                 {
                     continue;
                 }
                 inventMovement      = InventMovement::construct(prodBOMAux);
                 
                 inventDimAux.clear();
                 inventDimAux.data(inventDim);
                 inventDimAux.LicensePlateId    = inventSum.LicensePlateId;
                 inventDimAux.wMSLocationId     = inventSum.wMSLocationId;
                 inventDimAux.inventBatchId     = inventSum.inventBatchId;
                 inventDimAux                   = InventDim::findOrCreate(inventDimAux);
                 InventDimParm inventDimParm;
                 inventDimParm.initFromInventDim(inventDimAux);
                 
                 InventAvailabilityByUnit    inventAvailabilityByUnit    = InventAvailabilityProvider::findByItemSumDim(inventSum.inventTable(), inventSum, inventDimAux);
                 InventQty                   availQtyreserve             = inventAvailabilityByUnit.parmInventAvailability().availReservation();
                 
                 if(availQtyreserve >= prodBOMAux.BOMQty)
                 {
                     reservation = InventUpd_Reservation::newParameters(inventmovement,
                                 inventDim,
                                 inventDimParm,
                                 InventDimFixedClass::inventDimParm2InventDimFixed(inventDimParm),
                                 -prodBOMAux.BOMQty,
                                 false);
 
                     reservation.parmInventDimOnHandSelectionCriteria(inventDimAux);
                     reservation.updateNow();
                     remainQty--;
                     reserveSuccess = true;
                     break;
                 }
                 else
                 {
                     licensePlatesChecked.add(inventSum.LicensePlateId);
                 }
             }
             if (!reserveSuccess)
             {
                 warning(strFmt('No se encontró matrícula con cantidad suficiente para el artículo %1. Cantidad requerida: %2. Piezas pendientes: %3', prodBOMAux.ItemId, prodBOMAux.BOMQty, remainQty));
                 break; 
             }
         }
     }
 }

Thanks!

I have the same question (0)
  • Suggested answer
    Assisted by AI
    ANInnoSolutions Profile Picture
    446 on at
    Hi JP-03031608-0,
     
    1) Issue
    - WHS work is created for the remaining (unreserved) quantity instead of the quantity reserved on License Plate
    - Reservation via InventUpd_Reservation works correctly and reserves physical inventory on LP (e.g. 8 units)
    - When releasing the production order, WHS work is generated only for the remaining quantity (e.g. 3 units)
    - The reservation created is not respected by warehouse work generation logic
    - This leads to incorrect picking work and breaks LP-based reservation scenarios
     
    2) Reason
    - The issue is caused by a mismatch between reservation logic and Warehouse Management (WHS) reservation logic
    - InventUpd_Reservation creates reservations on inventory level but does not create WHS reservation hierarchy or WHS-specific reservation records
    - WHS work creation relies on WHS reservation framework (reservation hierarchy, location directives, LP tracking), not just InventTrans reservations
    - This leads to a situation where standard work creation ignores your reservation and assumes that reserved inventory is already handled, therefore it only creates work for remaining demand
    - In WHS, reservations must align with reservation hierarchy levels (e.g. Site → Warehouse → Location → LP) to be respected
    - Your current implementation reserves against LP using InventUpd_Reservation but does not integrate with WHS reservation engine (WHSReservation)
    - As a result, the system treats the reserved quantity as already "fulfilled" from WHS perspective and only creates work for unfulfilled (remaining) quantity
    - This can happen because WHS logic uses WHSInventReserve / reservation hierarchy and not purely InventTrans-based reservations
     
    3) Resolution
    - Do not rely only on InventUpd_Reservation when working with WHS-enabled items
    - Use WHS-aware reservation mechanisms
     
    Option 1 (Recommended)
    - Use reservation hierarchy properly
    - Ensure LP is part of reservation hierarchy for the item model group
    - Configure reservation hierarchy:
    - Include Location and License Plate levels
    - Ensure reservation is done at correct level expected by WHS
     
    Option 2
    - Use WHS reservation classes instead of InventUpd_Reservation
    - Implement reservation using WHSReservation classes to align with warehouse logic
    - Ensure the reservation reflects correct WHS dimensions (Location + LP)
     
    Option 3
    - Avoid pre-reserving and let WHS work create picking based on location directives
    - Configure location directives to prioritize specific LPs
    - This is the standard WHS approach (system-driven picking)
     
    Option 4 (Advanced customization)
    - Extend WHS work creation logic:
    - Review class WHSReleaseToWarehouse / WHSWorkCreateProd
    - Inject logic to respect existing InventTrans reservations
    - Modify query building for work creation to include reserved LP quantities
     
    Technical improvements in your code
    - You are reserving against inventDim (original) but passing inventDimAux as selection criteria:
    - Ensure reservation dimension and selection criteria fully match WHS hierarchy
    - Validate that:
    - InventDimFixed includes LP and Location
    - Reservation is at full WHS dimension level (not partial)
     
    Testing steps
    - Verify reservation hierarchy setup for item
    - Check InventTrans and WHS reservation tables
    - Release production order and trace WHSWorkCreateProd logic
    - Debug which quantities are considered "remaining" vs "already reserved"
     
    Key takeaway
    - InventUpd_Reservation is not sufficient for WHS scenarios
    - WHS work creation respects WHS reservation hierarchy not only InventTrans reservations
    - To achieve LP-driven picking you must either:
    - Align reservation with WHS reservation framework
    - Or control picking via location directives instead of manual reservation
     
    For a more detailed answer, please provide more information.
     

    Rg,

    Alexander

    *Due to the complex and different possibilities of deploying Dynamics 365 I highly recommend not to setup the application without some expert/partner or support. (For more information contact me under anassl@inno-solutions.info or visit www.inno-solutions.de)

    *The Information comes directly from the manufacturer or provider and are validated (not guaranteed) up to date of creation of the posting.

    References:

    1. Microsoft Licensing Guide
    2. Microsoft Doc`s/Learn

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 622

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 553 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 430

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans