After upgrading Dynamics GP (9 to 2013 (sp2), I am getting some error while posting the GL Batches... everything is working properly (even from the sub modules posting also working fine) except GL batch posting...when posing the GL i am getting the error message - " The stored procedure glpBatchCleanup retuned the following results: DBMS: 0, Microsoft Dynamics GP: 20820." - when I checked it in the database, original batch data isn’t cleared out from the entry tables (SY00500, GL10000, but from GL10001 its cleared ) although the batch was actually posted.
For Testing purpose I created one sample company in the same server and created some accounts and try to post, its working perfectly.....without any error...
appreciate if anybody can explain why this error occurring and applicable solutions.
Thanks in advance.
The issue apparently lies within mostly the batch data. Therefore, I might check the following;
Your feedback is highly appreciated.
Mahmoud M. AlSaadi
Dynamics GP Essentials | mahmoudsaadi.blogspot.com
below update from the stored procedure glpBatchCleanup is failing that's why you are getting error.
begin update SY00500 set BCHSTTUS = @BATCH_AVAILABLE where BCHSOURC = @I_cBatchSource and BACHNUMB = @I_cBatchNumber and BACHNUMB in (select RSRCID from DYNAMICS13.dbo.SY00801 where RULEID = @RULE_RESERVESTATE and RSRCID = @I_cBatchNumber and RSRCSBID = @I_cBatchSource and CMPANYID = @I_sCompanyID and USERID = @I_cUserID and RSRDESC = str(@I_iSQLSessionID) ) and BCHSTTUS = @BATCH_PRINTING
if @@rowcount <> 1 begin select @O_iErrorState = 20820 return
As you mentioned, original batch data isn’t cleared out from the entry tables. I would suggest you to check SY00500 and SY00801 too. Check Batch status and batch source fields, what values are there, if you will find record in SY00801 then it means posting had issue and that's why record inserted into SY00801.
Hi Mahmoud , This solution is fine if the error will appear sometimes, but i am getting this error for each and every GL batches while posting...
Anyway thanks for the reply
Thanks, I have check the SY00500 status is 6 / in SY00801, record is available... in GL100001 no data available, but Gl10000 Header Part of the GL is available (same available in GL20000) - so every time I have to remove this manually and run the reconcile / check links.... Any suggestions please....
Issue is with your posting, and I think first you need to find out the reason of issue.
Can you do it.
1.Create new batch in any module, lets say sales module with only having one transaction.(saving existing transaction in your new batch).
do batch posting and then check your sy00500 table. if everything seems fine then go further.
query the SY00500 table and share the results here.
We will move further to GL posting after will be done at that point.
For this batch specifically, post corruption occurred leaving part of the batch in GL10000 (Work) and moving part of the batch to GL200000 (Posted). In order to get this problem specifically solved, you need to do the following;
SELECT * FROM DYNAMICS..ACTIVITY
SELECT * FROM DYNAMICS..SY00800
SELECT * FROM DYNAMICS..SY00801
SELECT * FROM TEMPDB..DEX_LOCK
SELECT * FROM TEMPDB..DEX_SESSION
UPDATE SY00500 SET MKDTOPST=0, BCHSTTUS=0 WHERE BACHNUMB = '#BachNumber'
After applying the steps above, you will have the batch released. Go to the original batch entry and get it posted. Please note that you need to check GL2000 for any potential duplication.
Now, most importantly, you have mentioned that the problem occurs quite often, then you need to determine what is causing this issue. Would it be Server Performance, network performance ... etc. There are a long list to check regarding this issue, thorough diagnosis for your environment is a must.
Hope this helps,
Thanks for the msg, As I mentioned in my first query, I have mentioned there, if i post from any sub modules, its posting fine, only from GL I am getting this error.... anyways I have sort it out this issue in another way..Thanks for the support..
Hi Mahmoud , this solution is ok for 1 or 2 transaction and if its happens for once in a while, my situation is , transactions are 100's daily, and the DB size is almost 24 GB... and 20-25 users are online at the sometime...Anyway I almost found a solution in other way-around to overcome this...Anyways thank you for the support..
Regards / Biju
Biju, I am glad that you are able to solve your problem, and I am also keen to know your work around. Hope you will share here it with all of us.
When we have these types of posting issues we always try to find things by breaking it, that's why I asked you to first post on sub modules, because sometimes some data creats problem otherwise you have mentioned all the things in your first post. Actually fixing posting issues are just like a detective work.
Hi Almas, As I mentioned earlier, I have created a separate company for Testing purpose, with some demo data, I dint face any issue while posting.. So I focused on that way only... take out all the data out through BCP.. then removed the DB, created the Company DB again with same ID, insert the data into the newly created DB (BCP ), Made necessary changes in DB ( before doing this process in the LIVE company, I did it in a TEST company for checking, when everything was fine, then I did it for the LIVE company,) anyway everything is fine, including posting :)
good. when there is a will,there is always some work around.(Y)
thanks for sharing.
Other Microsoft Sites
I'm a Customer
I'm a Partner
Follow Microsoft Dynamics