Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Items with History Changed to Lot Tracked

(0) ShareShare
ReportReport
Posted on by 4
Greetings, I've seen a few posts that address turning on lot tracking for an existing item that has history and understand the best methods to do so (if planned properly), however, in my case, the items have already been change via SQL. (To save face... I was not involved in this process). Long story short, hundreds of inventory items were change from not tracked to lot tracked via SQL (someone did not think this through). Now, as expected, every transaction for these items is failing because the quantities on hand or sold don’t have an associated lot number. We do a lot of RMAs and I’m having to manually “turn off” tracking while the user receives and then turn back on once complete. I can see this becoming a serious nightmare. Does anyone know of a way to get around this? I’m thinking of perhaps assigning a dummy lot number where appropriate (Sales History, Inventory on Hand, etc.) Thanks in advance! Jim

*This post is locked for comments

  • Mahmoud Saadi Profile Picture
    32,738 on at
    RE: Items with History Changed to Lot Tracked

    Hello Jim

    While following up with my cases, I found this one ... Pretty old I guess :)

    I am really curious to know how things went with you

  • Jim Lines Profile Picture
    4 on at
    RE: Items with History Changed to Lot Tracked

    Mahmoud,

    Fantastic response! Thanks so much for testing!  I'm just starting my testing on my test server this week.  I will keep you up to date as to the progress.  Thanks again!

    Jim

  • Mahmoud Saadi Profile Picture
    32,738 on at
    RE: Items with History Changed to Lot Tracked

    How is the progress of this interesting issue

    Looking forward to hearing your kind feedback

  • Suggested answer
    Mahmoud Saadi Profile Picture
    32,738 on at
    RE: Items with History Changed to Lot Tracked

    Hello Jim

    As derived from the complexity of lot number tracking process in Dynamics GP, and the degree to which it is involved in several distribution modules such as purchasing, sales, inventory, manufacturing ..etc. The test has been limited only to POP, SOP and IV lots. The lot number tracking primary tables, on which all the modules depend for open cost layers is (IV00300), this tables retrieves primarily form (IV10200) for the items with lot number tracking option enabled, and available quantity on hand.

    Other modules, stores historical lots and details since the open lot table (IV00300) get cleared out when the lot is consumed. I have followed the following testing criteria and here are my results:

    • Manual Insertion, for the primary Inventory table. Through this scenario, I posted all the pending transactions related to inventory, cleared all the lot related tables (POP10330, SOP10201 and IV00300, IV00301). Historical lot tables are not touched, since it should not affect open transactions, no harm to keep them. The following script was built to re-create the lot in IV00300

    USE TWO
    INSERT INTO dbo.IV00300
            ( ITEMNMBR ,
              LOCNCODE ,
              DATERECD ,
              DTSEQNUM ,
              LOTNUMBR ,
              QTYRECVD ,
              QTYSOLD ,
              ATYALLOC ,
              UNITCOST ,
              RCTSEQNM ,
              VNDRNMBR ,
              LTNUMSLD ,
              QTYTYPE ,
              BIN ,
              MFGDATE ,
              EXPNDATE
            )
    SELECT  A.ITEMNMBR ,
            A.TRXLOCTN AS LOCNCODE ,
            A.DATERECD ,
            A.DEX_ROW_ID AS DTSEQNUM ,
            A.DEX_ROW_ID AS LOTNUMBR ,
            A.QTYRECVD ,
            A.QTYSOLD ,
            0 AS ATYALLOC ,
            A.UNITCOST ,
            A.RCTSEQNM ,
            A.VENDORID ,
            0 AS LTNUMSLD ,
            A.QTYTYPE ,
            0 AS BIN ,
            '1900-01-01 00:00:00.000' AS MFGDATE ,
            '1900-01-01 00:00:00.000' AS EXPNDATE
    FROM    dbo.IV10200 AS A
    LEFT OUTER JOIN dbo.IV00101 AS B
    ON A.ITEMNMBR = B.ITEMNMBR
    WHERE B.ITMTRKOP =3 AND A.QTYRECVD-A.QTYSOLD <> 0 AND A.RCPTSOLD <> 1

    Furthermore, proceed with the usual reconciliation and check links as a must in such a case.

    • The second testing scenario, was more simple and straight forward. I followed the same steps by posting all the pending transactions, clearing the lot tables and then instead of inserting lot numbers manually (fabricated lots), I have proceeded with the reconciliation immediately. And here is the interesting part, new RECON lots have been created in all the lot associated tables according to the open cost layers. I believe, this is the ultimate solution instead of fabricating lots.

    Finally, as I previously mentioned, I do not recommend this solution as a work around, but it would be application in case further testing is applied. For the mean time, you may proceed with creating a testing environment , and apply the testing scenario.

    Keep me posted on your findings,

    Looking forward to hearing what's hiding beneath your database records, since your it has gone through a lot and we never know how things would go with you :)

  • Mahmoud Saadi Profile Picture
    32,738 on at
    RE: Items with History Changed to Lot Tracked

    I shall do a full cycle test and keep you updated

    I will get back to you shortly

  • Jim Lines Profile Picture
    4 on at
    RE: Items with History Changed to Lot Tracked

    Mahmoud,

    I'm finally getting around to fixing this because our inventory control people want to do another round of changing non-tracked to lot-tracked.  Regarding your original recommendation, I want to go with option 2 and create dummy lot numbers.  Can you advise how to go about doing this?  I know it's not the cleanest way of doing this, but if I could cut down the number of problems I have with turning on/off tracking so users can sell/receive, etc. it would be an enormous help.  

    Thank you in advance!

    Jim

  • Jim Lines Profile Picture
    4 on at
    RE: Items with History Changed to Lot Tracked

    Mahmoud,

    I presented the information to our inventory control team and they are going to make a decision on what to do.  I think we're going to go the route of backing out all inventory.  Once we complete, I'll give a follow up.  For now, I'll confirm your answer.  

    Thanks!

    JIm

  • Mahmoud Saadi Profile Picture
    32,738 on at
    RE: Items with History Changed to Lot Tracked

    Jim

    Any updates regarding your case ?

  • Mahmoud Saadi Profile Picture
    32,738 on at
    RE: Items with History Changed to Lot Tracked

    When posting a sales transaction with items tracked by lot numbers, the sales transaction is moved to history immediately, while lot details are stored in SOP10201, These details remain in history even if a return for the sales transaction is made afterwards. Meanwhile, you need to take into consideration that the RMA will store lot details in SVC05255. 

    Never hesitate to share any further inquiries, 

  • Jim Lines Profile Picture
    4 on at
    RE: Items with History Changed to Lot Tracked

    Mahmoud,

    What do you know about items that were sold (SOP Docs moved to history) and then items are returned via RMA?  Would you agree that those historical transactions would need to have a lot number assigned?

    Jim

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Almas Mahfooz Profile Picture

Almas Mahfooz 3 User Group Leader

Featured topics

Product updates

Dynamics 365 release plans