Product is in stock with 0 quantity, location shows a quantity with no product

SOLVED

Hi there.

There seems to be a de-synchronization between the product and its location.

The product shows null quantity in the location.

The location shows a quantity (59) but a null product and is "empty"

Misc. issue and receipt is also messed up. Receipts work but taking the stock out saves the document with no location and does not change anything.

Location resync shows the product is in stock, and now the product shows in the location but with a null quantity. that means both location and detailed stock inquiry shows the product in the bin with a null quantity.

Stock resync of the product does not find any issues

This is as close as I was able to get the product showing 0 stock on both sides. Any help in this matter is appreciated. We have at least 5 locations like this at the moment. Adjusting a quantity into the location and stock changing it to a different location reset this process to the start, with the location showing a quantity of 59 and a null product code.

Any help with this issue would be appreciated.

Thank you,

Zoey

Top Replies

  • Hi  

    I suspect you have records in STOCK that are corrupted.

    Can you check if you have any record in STOCK table with one of the following field at zero (or emptied)?

    • QTYPCU: quantity in packing…
  • +1
    verified answer

    Hi  

    I suspect you have records in STOCK that are corrupted.

    Can you check if you have any record in STOCK table with one of the following field at zero (or emptied)?

    • QTYPCU: quantity in packing unit (PCU) -> when managing no packing unit you should have the same value than QTYSTU (and PCU should be equal to STU)
    • QTYSTU: quantity in stock unit (STU)
    • QTYSTUACT: Active quantity in stock unit -> If no potency managed, you should have the same value than QTYSTU

    Note: if you have no quantity in stock there should be no record in the Stock table for the selected product & site.

    Some processes are based on active quantity (FIFO cost, Materiual consumption, etc.) and other are based on stock unit quantity. That could explain why you have a partial success on some transactions.

    Receipts work but taking the stock out saves the document with no location and does not change anything.

    Can you check if the product-site record is location managed?

    I have witnessed strange behavior when managing no location on the product-site record but somehow I was able to transfer the stock to subcontractor. => If you manage subcontraction you must enable location management on the product-site.

  • 0 in reply to Julien Patureau

    Hi   , thanks for your reply!

    The quantities are all 0, but the locations affected all show as occupied with a product number.

    Based on your feedback I ran a query into the STOCK table to find a list of all of them where the product code exists but quantity is 0, and used DeleteByKey to remove the corrupted stock lines via the chronological stock number and stock site. I was then able to delete and recreate all the affected locations, and now they work and display properly. There was 'occupied' product lines from 2021 in there with no actual physical stock, so I assume some count got messed up or something since that's also showing the last time some of those products were ever counted.

    All the affected products showing with no quantity were set up properly as location managed as well, so I think it was just some corruption on saving of a stock count or otherwise.

    Anyhow, problem is fixed now, thanks for the help.

    Zoey

  • 0 in reply to Zoey Mattison
    SUGGESTED

    Hi  

    Glad that it worked.

    used DeleteByKey to remove the corrupted stock lines

    Normally the stock resynch tool (FUNSTOR if stock lines is ticked) is deleting STOCK record with quantity zero. I understand you tried the resynch already, this is why I suspect one quantity field was not zero (QTYPCU or QTYSTUACT). Deleting, STOCK record the way you did may have created desynch elsewhere, to be caution:

    • Check if you have a STOALL records linked to a missing STOCK record (link done via STOCOU and STOFCY)
    • Run FUNSTOR to
      • Resynch ITMMVT table (Product-site totals ticked)
      • Resycnch STOQLYH  & STOQLYD tables (Quality checks ticked)
      • Resynch STOLOTFCY table (Stock lots ticked)
      • Detect if you have in FIFO record desynch (STOCOST table):

      • Detect if you have in Serial number record desynch (STOSER table): if any run the Serial/stock resynchronization.
    • Run FUNLOCS to resynch the table STOLOC

    Please next time, consult with your partner or Sage before deleting records from the table and as a rule, always test this type of action before on a test folder.

  • 0 in reply to Julien Patureau

    Hi  

    Both Stock and Location resyncs returned no errors. Anything else I should take a look at?

  • 0 in reply to Zoey Mattison

    Hi  

    I can't think of any other things to do right now. If the daily operations are going well, this is proof enough you did right.

    Still, next time be more cautious before working in the table outside of the application. In case, of database corruption this is often the only way BUT better to know what you are doing before you start and always test before going live.