Picking list journal: Inventory dimension Location must be specified

Picking list journal: Inventory dimension Location must be specified

One – if not the – notorious error in Dynamics 365 related to production and warehouse management manifests itself at the “Production floor execution” terminal during reporting as finished (RaF). On the screen, the error message “An error occurred while processing the job…” is displayed.

In the activity center, you receive the following detailed error message:

  • Posting – Picking list journal
  • Inventory dimension Location must be specified.

This is due to the failed material withdrawal following the Finish backflushing principle (actual quantity = planned quantity, see The case of a missing flushing principle). The causes are diverse, with the most common being an incomplete warehouse work. This means that the materials haven’t been brought to the machine’s input location, yet someone is trying to report the finished or semi-finished product as complete.

This error pops up very often during the testing phase of the Dynamics 365 implementation. You may say: “Hey, let them finish the picking work first; this may never happen in real life, since the materials are going to be missing for the assembly! The sequence of production steps must be adhered to!”

It is not that simple. I’d say we are talking about a significant design flaw in the Dynamics 365 for SCM system.

Let’s conduct a thought experiment. In an MTS (make-to-stock) scenario, imagine 3 production orders planned for the same product on the same day. All of them get released at once early in the morning, all of them produce warehouse work for the picking of the same raw material. If they are not consolidated into one production wave, it may happen that the warehouse work for the PO3 has been completed much earlier than the warehouse work for the PO1, but the PO1 is started and finished earlier. There is namely no particular order or priority in the warehouse work. The material is going to be at the inbound location of the work centre, the machine operator does not care if it’s for the current or for the next order. Yet reporting the progress at the terminal fails due to the mis-allocation of the material.

Explanation

Presuming the Automatic BOM consumption parameter in Production control > Setup > Manufacturing execution > Production order defaults is set to Flushing principle, and the Post automatically is set to Yes, then the material consumption becomes an integral part of every RaF transaction at the Production floor execution terminal. If the picking list posting fails, the whole transaction is rolled back:

In reality, it is even worse than a clean rollback. On each failed attempt of Progress reporting, a new picking list journal is created. The mere presence of such a picking list prevents any further attempts because the open line(s) in the picking list journal block a portion of the bill of materials through a TransChildRefId identifier – a relationship between the journal line and the BOM line.

With the advanced Warehouse management in Dynamics turned on, the warehouse locations in the master BOM must remain empty. They are allocated during the Release or Release to warehouse phase in Production. If the Resource consumption checkbox is set in every BOM line, then the input location of the work centre is evaluated by the Warehouse management module at the run time as the picking list journal lines are getting created. While doing do, for some reason they are looking for the location in the picking warehouse work. If the particular inbound location is not reserved there in the InventTrans, or the work is not closed yet, the Location dimension in the picking journal is going to be empty:

Troubleshooting

The troubleshooting steps are as follows:

  1. First and foremost, search for any open picking lists for the production order with the button View / Journals / Picking List.
  2. Alternatively, use the list of all open picking journals in the menu Production control > Adjustments > Picking List using the order number. This list should actually be empty, meaning all picking lists should have been posted.
  3. Select the open (not posted) picking list journals and delete them all at once.
  4. Look for any open warehouse work for production, meaning the warehouse work for materials picking: Pick at the main warehouse, Put to the inbound location of the machine. Use the button Warehouse / General / Work details at the production order.
  5. If there is open work, ensure it is processed on the mobile device.
  6. If there is no open warehouse work for the production order, initiate the warehouse picking process again using the button Release to warehouse. A new production wave will be generated, and new warehouse work will be created in the background. If the materials and parts are already at the machine’s location, this warehouse work will automatically be closed, and the materials will be reserved at that location for the production order. The next picking list will have the correct location in all lines, and posting this entry will likely work.
  7. This deals with the racing condition in the above thought experiment, too: the material already found at the location will be rearranged to the current order. However, any open warehouse work for the current order shall be cancelled first. This re-release of released orders may also be automated.
  8. If the report as finished continues to fail at the terminal, the operator may forcefully reduce the quantity using the Adjust material button: click on Adjust material, enter a zero. Repeat this process for all BOM lines. Then confirm the Adjust material screen with OK. Reporting as finished should work now, while the excess material can be eliminated in a manual picking list journal.

If the error happens often, some drastic measures may need to be taken. The point in time for the consumption of materials must namely be changed to At location for most materials and parts. This de-couples the material backflushing from the Report as finished feedback.

Consumable “Kanban” parts in D365 Warehouse management

Small consumable items (Kanban)
Small consumable items (Kanban)

Consumable “Kanban” parts in D365 Warehouse management

Low value parts such as bolts, screws, gaskets, clamps, and other fasteners, as well as small electric parts, are rarely retrieved from the main warehouse in the precise quantities by production order. Instead, they are stored in surplus at the workbenches, typically organized in boxes of various sizes. The usage of these parts is not actively monitored; rather, they are automatically deducted from the inventory based on the production bill of materials. Additionally, there is no manual counting of these items at the workbenches. Once the quantity reaches a predefined minimum level, the boxes must be promptly restocked, that’s why they may call them “Kanban” items.

The “canonical” solution in the Dynamics 365 Warehouse management is the Min/Max replenishment: https://learn.microsoft.com/en-us/dynamics365/supply-chain/warehousing/replenishment#minmax-replenishment  The locations to replenish are the input locations of the resources. One box typically stores one item. One screw may be needed at multiple machines = locations. From the list of items at every location you derive the list of locations per item, and these become the fixed locations of the items at the production warehouse. In accordance with the Set up a min-max replenishment process – Supply Chain Management | Dynamics 365 | Microsoft Learn guidance, you choose Replenish empty fixed locations (because a voluntary non-fixed location must have a quantity > 0 to get initially replenished, but this condition is not necessarily met) and Replenish only fixed locations.

In practise, this canonical solution does not always work well. First, the min/max replenishment must be set up to happen often, every 5-20 minutes to simulate an immediate response to the demand. Yet the processes in the Dynamics 365 Warehouse management are essentially PULL processes, and the replenishment is as fast as the warehouse personnel pulls the new work from the queue. It is a different sense of emergency as opposed to seeing a red Kanban card brought by the production worker. If the warehouse workers fall behind, the D365 system is going to detect the critical shortage and include the small parts into the regular production waves, and pick them for the production order(s) in small quantities.

Second, the min/max replenishment relies on the stock level monitoring in the boxes, and the backflushed quantity should better be exact. But the workers sometimes use more parts than stipulated in the BOM. The stock levels in the locations are going to start accumulating errors, and the actual quantity in the boxes is likely to be less than expected, while manual triggering of the replenishment is not possible. In the end, some sort of a spot counting will be needed.

Moreover, at the factory I am consulting right now some of the items are vendor-managed (VMI): a salesperson visits the factory regularly and replenishes the boxes; only a few days later the invoice for the goods is received by the accounting. This makes the internal stock level monitoring an impossible task.

One may suggest deleting these items from the BOM altogether, but this is going to (1) remove the “sink” for the quantities so that the stock levels will continuously grow, (2) distort the price of the product and (3) confuse the workers who use the BOM as a reference. Another suggestion was to make these items non-stocked [in the item model group], but a non-stocked item may not be added to a BOM in Dynamics 365. One may also declare a product not eligible to the Warehouse management, but this choice of the Storage dimension group may only be made once at the beginning of the product lifecycle, while the list of “Kanban” items undergo optimization often.

The below solution that really works relies on the negative picking from a non-advanced warehouse. The negative stock and the auto-consumption at the machine will deplete the stock. The usual purchase delivery note / VMI invoice will increase the stock. Sometimes the stock level recorded in D365 will be higher than the real one, sometimes it will be lower, sometimes it may even be negative, but the production process will not stop because of one allegedly missing screw. The replenishment happens outside of the system in a manual Kanban process triggered by the worker at the machine, or it may be vendor managed, or driven by the warehouse personnel regularly looking for empty boxes.

The setup is as follows:

  1. Create a new warehouse (e. g. NA) where the mode Use warehouse management processes is turned OFF. Set some Default input and production input locations.
  2. Choose this warehouse in the Default order settings of the item as the default purchase and inventory warehouse.
  3. Create if needed a dedicated Item model group, where the Physical negative inventory = Yes. Apply it to the item.
  4. At the released product, keep the usual options Flushing principle = Finish, Material picking in license plate locations = Order picking. You may also want to set the coverage group to Manual.
  5. Make sure the production parameter Journals / Picking list journal / Pick negative is ON, because the negative picking is only allowed when both Physical negative inventory + Pick negative are ON.
  6. In the BOM, use the “Kanban” items mostly as usual, but do NOT select the Resource consumption as we want to consume them from the virtual warehouse NA.

Kanban Items In The BOM

Refer to the blog The case of a missing flushing principle for more insight on the backflushing.

Batch jobs in D365: a Russian roulette

Batch jobs in D365: a Russian roulette

Real world production scenarios include automated batch tasks executed in the background with some cadence: Batch processing overview – Finance & Operations. They apply to sets of documents fetched at the run time, for example to sales orders delivered, but not invoiced yet. Obviously, every day the query with the documents should return a different set with the recently despatched sales orders. It is called Late selection: Late selection in D365FO – D365Tour. So far so known.

As the complexity of the business grows, so does the complexity of the batch jobs. You’ll need jobs consisting of multiple tasks, executed one after another. It is called task dependency, or task Constraints. One of the latest unpleasant discoveries was the fact, that you cannot always rely on the sequence of steps set in the batch job: the most useful tasks, such as the SalesFormLetter_Invoice and its likes (used to update sales and purchase orders with order confirmations, delivery notes and invoices) act as orchestrators and spin off child batch tasks for simultaneous, multi-threaded sales order, purchase order, production order processing. These child tasks are not constrained (!) and get executed at a first come, first served basis. They may still run while the master task SalesFormLetter_Invoice seemingly ends and relays the baton to the next task. This leads to interference and racing conditions. You better evaluate the average execution time of the master controller task as a whole, put these controllers into different batch jobs, schedule them at a safe time distance from one another.

Heterogenous batch jobs as the one shown below pose a different challenge.

Here is the how-to instruction:

  1. Spin off the first task from the main menu (here: Production control > Periodic tasks > Production order status update) and choose Run in the background / Batch processing. This will be your starting point, a template for the batch job.
  2. Locate the batch job in the My batch jobs list, set the status to Withheld and start editing.
  3. Every task within a batch job needs a Class name. Now you know the class name of the first task: ProdMultiCostEstimation. To add the next task, you have to manually specify its Class name. The owners of this framework provided a lookup list, but it is slow and completely dysfunctional: it shows just a fraction of the possible executable RunBase or SysOperation classes, sometimes it crashes if there are some bad customizations in the source code. If you don’t know the class name, repeat the step 1 to reveal it.
  4. Add the next task, type the class name in. The first time it will take the system up to 20-30 seconds to accept and retrieve the Class description.
  5. Most batch tasks need a query. Click Parameters to populate it. Here you experience another nasty trait of the batch framework: the query shown is the last one you used in the system elsewhere. It is not necessarily the one really persisting at the batch task. Another user is not going to see your query criteria at all: only the owner/creator has the control. *1) *2) *3)
  6. On the Batch task details tab, Constraints, choose the predecessor task to build a chain. You many need to change the Expected status to Ended or error if the batch job has to continue with the next task on an error somewhere in the chain.
  7. Check the recurrence, remove the Alerts if needed, and put the Batch job back to Waiting.

1) Lessons learned: take a screenshot of every query and parameter, document it thoroughly to pass the maintenance to the Dynamics system administrator.

2) In certain cases a manually added task does not let edit the execution parameters and/or the query. Sometimes(e.g. on sales order updates) it helps to execute the same periodic task in the normal user session once. This is the reason why it is often hard to pre-configure the batch jobs in a “Golden Config” environment: it may need real transactions to execute against. Sometimes it wishes to be initialised from the main menu and nowhere else because badly programmed. In such a case, start your step 1 – the key task – from this critical periodic task. Should there be 2 such bitchy tasks in one batch job chain, it is over. They must be separated into different batch jobs.  

3) As a really bad surprize came the fact that even the owner has no control over the query: if you use the Late selection, in a chain of nearly identical tasks as the ones below, the QUERY OF THE LAST TASK IS APPLIED TO EVERY TASK of the kind, at least in the case of the production order status updates.

You should let the bloody job run one first time, then put the batch job back on hold and adjust the queries in the tasks once more, then save and re-activate the batch job.