Skip to content

Compressing Item Ledger Entries in Dynamics NAVHow To Compress Item Ledger Entries in Dynamics NAV

There are different ways to reduce the size and speed of a Dynamics NAV upgrade. This blog will cover one component, compressing item ledger entries that may prove useful. However, it is important to note that with any major change such as this, it requires thorough testing of the solution and mapping out a blue print for the plan.

To begin, it is important ask yourself:

  1. Is this part of an upgrade plan to a new version of Dynamics NAV, or are is the client trying to do this in an existing database?
  2. Is the client planning to try to keep some of the historical data in the system for historical purposes for reporting and analysis? Alternatively, are they planning to clean the slate and go back to the historical data in a copy of the historical database prior to the process being run if any historical analysis is required?

Summary of Compressing Item Ledger Entries through an Upgrade Scenario

The following is a summary of what I have discussed with partners who have done the process through an upgrade scenario. In particular, this was completed often when moving from 2.X to 3.X Versions due to the significant change in data structure, which was a result of the introduction of the Value Entries in Version 3.X and prior. As a result, the process below requires modifications depending upon what data exists – i.e. Manufacturing, Assembly (2013 and later), Kit Data (2009 and earlier), open Orders – Sales/Purchase/Production/Assembly, Warehouse Entries, Location Setup, etc.

In the Database

Make sure all SO’s and PO’s are invoiced (no received/shipped not invoiced) and run the Adjust Cost Item Entries and Post Inventory Cost to G/L. This may entail having to use the Undo Receipt Shipment or Undo Receipt if the orders cannot be invoiced. This is key so that you do not delete Item Ledger Data that has dependencies on existing outstanding order status as well as any unprocessed adjustments for quantity or value.  NOTE: Further challenges come into play with Manufacturing Production Orders. The best practice is not to have partially processed transactions prior to deleting Item data, which can get to be quite challenging.

  1. Run Inventory calculation to find out what is on hand and export this to a file. (E.g., Dataport or XML Port would be required to export Quantity by Location/Variant/Lot No. /Serial No.)
  2. Make a backup of the base ILE object and Value entry Objects.
  3. Renumber the ILE and Value Entry Table to a table in the 50000 range with a new name if history is going to be retained in the database for reporting.
  4. Import the ILE and VE object again. Do this because there are usually too many records in the ILE to start copying them to another table. This is fast and easy. (It is also easier to write Reports and Forms of these Tables with pre-upgrade data. As a result, the upgrade will take hours instead of days.)
  5. Delete the Item Ledger (T-32), Item Register (T-46), Item Application Entries (T-339), Value Entries (T-5802), Average Cost Adjustment Entry Point (T-5804), Post Value Entry to G/L (T-5811 – should be cleared with Post cost in step 1), G/L - Item Ledger Relation (Table-5823 includes link of T-5802 to T-17- G/L Entries. Other possible Tables include Inventory Adjmt. Entry (Order) (T-5896) if NAV 203 or later, Reservations Entries (T-337), Capacity Ledger Entries (T-5832), Warehouse Entries (T7312).
  6. Complete the upgrade without Inventory, then import the qty. on hand (with serial and lot) and post it. This also makes a great opportunity to cleanup items not used anymore.
  7. Run a Dataport and Import into an Item Journal after the upgrade together with the Quantity on Hand with Unit Cost ($) desired)

The primary goal of this process is to be able to import and export data in the system and generate through Dataports the Item Journals to establish new Inventory data beginning quantity and cost.

The biggest challenge is managing some of the additional details, such as Item Tracking (LN and SN Data), Manufacturing, Assembly (or Kitting depending on Version), and other data linked to the existing ILE and VE data.

I hope this gets to a place to where there is a vision for the processing required. Again, I would test the process extensively because removal of data and identifying all related dependencies is an extremely challenging endeavor. I suggest referring to the Inventory Costing in Microsoft Dynamics NAV white paper. This is a good reference as a beginning point for consideration with the data structure for inventory posting and costing data analysis. While the paper was written for Dynamics NAV 2013, the fundamentals are still the same.

I wish to keep in mind that this is kind of a theoretical discussion. I have never blown away item data and then rebuilt it with the process. Through interactions with partners along the way, this has become kind of a moving document for how to manage the process. We would like to hear your thoughts and ideas. Please comment below.

For more Microsoft Dynamics NAV development related topics, please subscribe to our NAV Developer blog where you will find a plethora of development-related tips, how-to’s, and NAV-related discussions.

Blog Tags: 

Comments

Comment: 

Don't you end up with twice the inventory value in GL with this method? (Both the old value end the new value)

Comment: 

No, the inventory detail is deleted and only opening balances remain.

Comment: 

I like the overall approach, especially the trick of moving the data instead of deleting it. However, I still think there are a few typos in the described steps:

In step 3 & 4 you move ILE and VE from T32/T5802 to the 50000 range, but in step 5 you say to delete the content of these tables. Aren't they empty at step 5?

In step 6 you say to import and post the qty at hand. I guess in a Item Journal based on the file exported in step 1?

In step 7 you again say to import and post qty at hand. This seems to be redundant.

 

The inventory value in GL is not doubled - it seems to be tripled, or at which step is the Inventory value in GL resat?

Comment: 

Good observations. The bullet points aren't necessarily supposed to be executed in chronological order. They are suggestions. The basic premise is, delete inventory, import in opening balances. Result, Inventory contains one single ILE for each item that contains inventory.

Read ArcherPoint's Blog Follow us on Twitter Follow us on Facebook Follow us on LinkedIn Link to our RSS feed Join us on Google+ Watch us on YouTube
Get Help Now