Controlling reservations for warehouse management enabled items (WHS) – Part 1


By Lennart Conrad,  Microsoft

This blog posting describes how you can make small code modifications to control how reservations will be handled.

The WHS reservation system makes it possible to do reservations on different levels which represents how specific inventory dimension are used. By associating a reservation hierarchy with an item, the hierarchy levels are used to control which inventory dimensions will be used for a reservation and when these dimensions needs to be assigned to the inventory transactions.

Readers are assumed to be familiar with the WHS reservation system and have knowledge about the reservation hierarchies and the new ways of calculating on-hand. If a brush up on the details about the reservation system is needed, the below resources can be useful:

We have received several different questions around how the rules about which levels the reservation should include, can be changed. Here are some of the scenarios we have heard of and replied to:

  • I always want my production orders to reserve on all the dimensions IF the location is specified 
  • I am rolling out WHS processes one warehouse at a time and want to have a WHS setup but  I want to control if the reservation includes all dimensions or not based on the warehouse in order to use the old WMS picking system for the transition period
  • I want my sales order taker to be able to reserve on all dimensions IF they specify the serial number for an item that has serial below location

The good news is that these requirements can quite easily be supported with minor modifications.

This blog post will describe how the WHS reservation strategies are determined and explain where in the code changes need to be made to achieve a different behavior.

Reservation strategies Currently the below strategies are supported. The ‘Above Location’ and ‘All’ are the main ones that impact most scenarios. The following table gives a short description of all the strategies.

Reservation strategy

Description 

None The reservation is made on the dimensions that are passed, if possible. This strategy is used by inventory blocking, and lets you make reservations on, for example, the site level or the warehouse level.
All The reservation is made on all of the dimensions in the reservation hierarchy. This strategy is used, for example, for transfer journals, or for warehouses that have not been enabled for warehouse management processes.
Above location

The reservation is made only on the dimensions above the location level. This strategy is used, for example, for sales and transfer orders when reservations are made in a warehouse that is enabled for warehouse management processes.

All not allowed blank The reservation is made on the first lowest level that does not allow for blank issue for the inventory dimensions. This strategy enables automatic reservations on non-license-plate-controlled locations.
Batch level This strategy is applied for items for which the Batch number dimension is selected and positioned above the Location dimension in the reservation hierarchy. This strategy is used when only reservations that are reserved ordered can be made. In that case, a reservation until the batch level is attempted.

The system will use the reservation strategy ‘Above Location’ when the following criteria’s are met:

  • The line for which the reservation is made can have reserved work. This is for example production lines, sales lines and transfer order lines.
  • The warehouse is either not specified or it is a warehouse enabled for Warehouse management processes

The reason for choosing the ‘Above Location’ strategy when the above criteria are met, is that a reservation above location is needed in order to create work.

If the reservation includes any dimensions at or below the location,the work cannot be created. This is to avoid a double reservation since work has its own inventory transactions. This subject is described in more details in  White paper – Reservations in Warehouse management AX 2012 R3 (http://www.microsoft.com/en-gb/download/details.aspx?id=43284).

If the system does not choose the ‘Above Location’ strategy, it will choose reservation strategies that can results in a reservation on all the physical dimensions. 

If batch number is active in the items storage dimension group and above the location in the hierarchy the Batch level strategy is applied. 

Modifying code to change the above behavior

In order to change the decision on whether to reserve above location, different methods can be changed.

The main decision is made in the determinePhysicalStrategyTypesMovement method which looks as below

\Classes\WHSReservationHierarchyLevelStrategy\determinePhysicalStrategyTypesMovement

private static container determinePhysicalStrategyTypesMovement(
    InventMovement _movement,
    InventDim _inventDimReservationCriteria)
{
    container strategyTypes;
 
    if (_movement.canHaveReservedWork()
    && (!_inventDimReservationCriteria.InventLocationId
    || InventLocation::find(_inventDimReservationCriteria.InventLocationId).whsEnabled))
    {
        strategyTypes = [WHSReservationHierarchyLevelStrategyType::AboveLocation];
    }
    else
    {
        strategyTypes = [WHSReservationHierarchyLevelStrategyType::All,
                        WHSReservationHierarchyLevelStrategyType::AllNotAllowedBlank];
    }
 
    return strategyTypes;
}

If the goal is to have a specific movement type do a reservation on all dimensions one option is to override the canHaveReservedWork() method on that movement type.

The below is an example where the method is overridden for the sales lines movement to control that reservation occurs on all dimensions, if any dimensions below or at the location level is specified. E.g. if the location is specified on the sales line then the reservation will happen on all dimensions. 

public boolean canHaveReservedWork() 
{
    return this.isItemWHSEnabled() && salesOrderLine.inventDimAllowsWHSProcessing();
}

If the desire is to have a change that affects all movements types, then the first If block could be extended.

Two other methods are important to pay attention to if a modification is done:

\Classes\InventMovement\getInventDimForIssueTransFromReceipt

This method is called when a receipt is updated and a related issue transaction needs to be updated as a consequence. An example could be a sales order line that is reserved ordered against a purchase line.

When the purchase order line is updated with dimensions, only dimensions above the location will be transferred if the movement is one for which work can be created.

\Classes\InventMovement\getInventDimForReservedTransPhysChange

This method is called when a receipt is updated to a status that impacts the physical inventory and a related issue transaction needs to be updated as a consequence.

An example could be a sales order line that is reserved ordered against a purchase order lines transactions. When the purchase order line is registered with all the physical dimensions, only dimensions above the location will be transferred if the movement is one for which work can be created.

With modifications to one or more of the above mentioned methods it is possible to control if the reservation will be made on dimensions above the location or on all dimensions by using the existing reservation strategies.

It is also possible to introduce new reservation strategies and thereby get different control on the levels that the reservations are made on. An example could be a reservation strategy that only reserves on the Site level. Such modifications will be covered in future blog 

As a final comment, then remember that the code is “alive and breathing”, so changes can and will occur as new hotfixes and updates are released. Hence, you should always verify if the usage of the methods covered here have been extended which means that other updates could be needed.

Please don’t hesitate to provide us feedback on this posting and the reservation system in general! 

Comments (16)

  1. Matias says:

    Hi Lennart,

    Thank you very much for your post. I´m having some problems with this. I´m trying to configure Ax to do this

    "I want my sales order taker to be able to reserve on all dimensions IF they specify the serial number for an item that has serial below location or batch below location".

    Actually the only way to allow sales order takers to do this, is putting the field above the location in the hierarchy and that complicates the warehouse operation, because I want to treat those as suggested items and then the worker can change it for other batch or serial, but the work created do this as mandatory, so I can´t find an alternative. The only way nowadays is by developing the classes you indicate??

    Thanks in advance,

    Matias.

  2. Hi Matias

    The scenario that you are after  where you can specify batch from the sales line and have the worker change it is unfortunately not supported by any of the modifications I describe.

    The challenge is that you cannot have a reservation that includes any dimension below the location AND create work for that reservation. The reasons are described in more details in the white paper.

    You will need a modification where the batch you are interested in is passed down to the location directive code and taken into consideration when finding the location to create the pick work from.

    /Lennart

  3. Maurice says:

    Hi Lennart,

    This what I'm trying to achieve for FEFO batch controlled items. I want to use the batch above the location to be able to use the sellable days functionality (it is not supported if batch is below location). So the work includes the Batch which is fine but I also want the worker to be able to override this batch if necessary. The Force or warn on the menu item does not seem to have any impact when the batch is above the location. In fact the batch is not even editable from the  mobile device work in this situation.

    Thanks

  4. Maurice says:

    Update: I see that CU9 introduced some improvements. The system now looks at the batch expiration dates and the customer's sellable days restriction when creating work for batch items that use the batch below the location (this allows users to override the batch if necessary). However, the system still considers the on hand for expired batches as ok to reserve (the system will just fail when creating the work). This is not ideal but a decent compromise until this gap can be closed.

  5. Ryan says:

    I have my location strategy to use FEFO.  The work is generated for the proper dimensions, but still does not specify a batch automatically.  I would like the batch numbers to be shown automatically with the ability to override if needed.  Any chance this is possible and someone could help me get the details correct?

    Thanks,

    Ryan

  6. Igor says:

    Hi Lennart,

    Could you please explain  some points of work creation logic. As I can see during picking all items should be placed on one license plate (e.g. worker should pick several pallets with different license plate number. Work with several picks is created according to the reservation hierarchy. when worker picks the first pallet the target license plate stays the same but for all other pick target license plate number is number of the first pallet). Is it possible to split picking for several license plates?  

  7. Javier says:

    Hi Lennart

    I am facing the following issue:

    I can post transfer, movement or Adjustment inventory journals, even if I have no Inventory on Hand at the Location level, the Item Model Group "Physical Negative Inventory" is disable. My storage dimensión is Wax enabled, so by default the "Physical Inventory" field is enable for all the Storage Dimensions. This is getting me a lot of headaches because now I have negative inventory in the On Hand. Do you know if this is related to WAX functionallity?

    Thanks,

  8. Massimo says:

    Hi Lennart,

    I read your post and found it very helpful, was looking for part 2 but could not find it. In any case I looking for a solution on how to exclude some locations from the reservation such as packing and staging locations. We are using batch FEFO reservation and we are facing issues as if the oldest lot happens to be in packing location it gets reserved even though it should not. The location directives make the picking fail but then the reservation has to be manually updated and in the next pick release run it is corrected. Would be interested in you thoughts on how to resolve this. Thanks

    Massimo

  9. Joe_Gramann says:

    Hi Igor,

    I am facing the same problem on the Target LP. Did you ever get an answer or found a solution to that?

  10. Benne55449@gmail says:

    When picking batches on production work we could pick multiple batches on an order line and need the ability to have the worker specify each batch.  Right now when work creates it will split the work on part into multiple lines instead of one line for the total quantity.  For example if I have a line for 50 on a batch controlled item I need the worker to scan the work line and enter the batch and quantity (12 of batch x, 12 of batch y and 26 of batch z) the hangup is our system may have more of each batch available for each batch at the time it is picked.  This system likes to assume that you have perfect inventory and creates lines for the exact quantity left for a specific batch.  

    1. YoungHansen says:

      Hi Benne55449
      We have the same issue. Did you get any reply on this?

  11. Hi Lennart,

    can we still expect a ‘part II’?

    Steven

    1. Hi Steven
      Yes, part 2 is in progress, part 3 is planned – sorry for the delay.
      /Lennart

      1. Hi Lennart,

        I’m specifically looking for the way of reserving batches/LP’s on the salesorderline and have the warehouseworker pick exactly those that I reserved (via work) and put them on a load (transportation management) as an ‘exception’ scenario (eg. using some new flag on the salesline) to the normal way of working being the warehouseworker having the freedom of selecting the batches/LP that will be delivered. In my case: some customers require that they can select what batch (or even pallets) get delivered to them from the ones that are available instead of us being able to select the batches/LP. Changing the “WHSReservationHierarchyLevelStrategyType” to ‘all’ removes the possibilty to have ‘work’ and use loads (have to check that last part). I want the warehouseworker to pick the exact batch/pallet I reserved on the salesline (it’s a bit like the ‘old’ way of working 🙂 )

        It would be great if you could handle this scenario in your next post!

      2. Steven H. says:

        Hi Lennart, how far are you on the ‘part 2’ 🙂 and the ‘part 3’? I’m still curious…

Skip to main content