Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

error 20151

Posted on by Microsoft Employee

I have 2 inventory batches without transactions in them.  I am trying to delete them, but keep receiving "error message 20151 doesn't exist".  I have checked the links but can not seem to remove these empty batches.  Are there any further steps I need to take?

*This post is locked for comments

  • Suggested answer
    Vinutha Holla Profile Picture
    Vinutha Holla 705 on at
    Re: error 20151

    I have seen this error message when it pertains to missing Header or Detail records for the Transactions that are in the batch.

    Could you try to print the Batch Edit List from the Inventory Batch Entry Window? I suspect that there are incomplete records. You will need to take note of the Items on this list. You will be running an Inventory Reconcile on these Items after you remove the records from the IV10000, IV10001, and SY00500.

    Here are the steps that you can follow to resolve the issue:

    1. Make a backup of the Company database.

    2. Run the following SQL scripts in Query Analyzer against the Company database:

    SELECT * from IV10000 where BACHNUMB = 'XXX'

    SELECT * from IV10001 where IVDOCNBR in (SELECT IVDOCNBR from IV10000 where BACHNUMB = 'XXX')

    The IV10000 (Inventory Transaction Work) table holds the header information of the IV transaction while the IV10001 (Inventory Transaction Amounts Work) holds the line item information.

    If you can see that this is the transaction information that you would like to delete, then please run these DELETE statements:

    DELETE IV10001 where IVDOCNBR in (SELECT IVDOCNBR from IV10000 where BACHNUMB = 'XXX')

    DELETE IV10000 where BACHNUMB = 'XXX'

    3. To query on the batch record in SY00500 (Batch Header), please run this script :

    SELECT * from SY00500 where BACHNUMB = 'XXX'

    Is this the Batch ID record that you would like to delete? If yes, then run this DELETE statement:

    DELETE SY00500 where BACHNUMB = 'XXX' and DEX_ROW_ID=XXX

    Note: Please substitute in XXX with the correct DEX_ROW_ID value of this batch in SY00500 table.

    4. Pull up the Inventory Batch Entry window to see if the Batch was removed.

    5. Run Inventory Reconcile by going to MDGP | Tools | Utilities | Inventory | Reconcile and select the range of items found on the transactions in the batch in question to correct their allocation.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans