Addressing Stock Value Discrepancies in Sage X3:
A Step-by-Step Guide

By: | Category: ERP

Resolving Stock Quantity Mismatches in STOLOTFCY and STOJOU Tables

Before we explore how to resolve mismatches between quantity values in STOLOTFCY and STOJOU, let’s first understand why they happen. These discrepancies can be caused by a failure to update the STOCK table after a stock movement, incorrect creation or modification of deletion records, or the failure to generate the proper STOJOU record following a STOCK update. Understanding these causes is key to effectively troubleshooting and preventing future issues. 

Running FUNSTOR (Stock Resynchronization & Control)   

This function ensures consistent quantities across most stock tables, with the STOCK table serving as the reference point.  Please note that STOJOU and possibly STOCOST tables are exceptions to this. 

Suspended Transactions   

If you use suspended transactions (STJ.UPDCOD_0=1), then mismatches between these tables should be expected because the software is designed not to update the STOCK table when this occurs.  Suspended Transactions are typically used to allow for the sale of stock that is not yet recorded in the system, thereby technically allowing negative stock, but in a controlled manner. To address this issue, simply run the function FUNSHTSEL (Adjustment of Stock Shortages), which is the process of clearing up the negative stock scenario after stock has been received. 

Troubleshooting Process  

If running the FUNSTOR and FUNSHTSEL functions don’t resolve the mismatch, try following these troubleshooting steps:  

  1. Check for Manual Changes: Review the AESPION table to ensure no manual modifications were made to the STOCK or STOJOU tables.  
  2. Review Custom Code: Identify any custom code that might affect stock movements.   
  3. Compare Quantities: Assess the impact of the desync by mass comparing lot quantities between the STOCK and STOLOTFCY tables, (which should be identical after running FUNSTOR) and stock movements using SQL queries (by adding all quantities received and issues per site, the item and lot should provide the current stock quantities). 
  4. Identify the Discrepancy: For a specific site-product-lot out of sync, try to identify the movement responsible for the desync.  Note that it’s recommended this analysis be performed on a fresh case and that running the query mentioned in step 3 daily makes them easy to find.  
  5. Look for Patterns: If you fail to resolve the issue after step number four, repeat the process on a different site-product-lot that is out of sync and look for patterns between all cases. 

We hope you enjoyed this blog and found it insightful. If following the steps mentioned fail to resolve your issue, we recommend opening a support ticket with your local support team or contacting the experts with Net at Work for further investigation.