The long fix is to follow MS Techknowledge Article ID 850209, A batch is held in posting, busy, marked, locked, or edited status in MS Dynamics GP.
If you know the batch has zero transactions and you know the user name or batch name just run a delete statement on SY00800 for the batch or userid.
Of course do an SQL backup of the company database and Dynamics database first.
In a new query run the following in MS SQL Management Studio.
SELECT * FROM DYNAMICS..SY00800
Identify the batch and userid.
Run the following delete statement again against system database.
delete SY00800 where BACHNUMB = ‘XXX’
In MS Dynamics GP in the company go to Batches for the module in quesion and select and delete the batch name.
There may be several problems that come up were you need to delete and create the MS Dynamics GP AP temp tables. If you print AP checks and get strange invoices printing on the check stub or duplicates on the check stub you may need to clear out these files.
The temp tables are:
PM10600 PM Distrbution Void Work Temporary file
PM10900 Void Payment Work Temporary File
PM10901 PM Void Transaction WORK Temporary FIle
PM10902 PM Tax Void WORK Temporary File
You should create a full backup of the company file in SQL Server Management Stuidio.
Delete or rename the files. You must also recreate these files yourself. MS Dynamics will not recreate these temp files for you if you delete them.
One easy way to do this is go to Maintenance – SQL, select the Company, leave the Product on MS Dynamics GP. Select the file name in the list that I gave you above. Click on Drop Table and Create Table, then click Process. Complete this process for each table in the list above. You can also hold down the Ctrl key and select multiple table names.
It’s best to be logged when as sa when completing these operations. You may also need to set permissions to the newly created database files. To do this go into SQL Server Management Studio, click the + by databases, click the + by tables, right click on the database file for example PM10600, right click and select Properties, click on Permissions, browse to find Dyngrp and click the check box, on Grant click Insert, Update, Delete, and Select, then click OK.