14 February 2011

Weekly Dynamic: Rerun FA GL Post Routine

So lets say that you run the GL post routine in Fixed Assets for Dynamics GP. We all know that this creates an unposted batch in GL. What if someone deletes that batch by mistake? Think about the thousands of depreciation line entries that could be in that file, now they’re gone. Not so fast. After a related incident at a client, Microsoft sent a us script to allow recreation of the GL batch. With their permission I’m reposting it here. Just to be clear, if you don’t run separate GL posting routines for additions, retirements and depreciation, this won’t let you undo that. You’ll still get one big file to sift through. But, if you run the GL routine to process additions and while you’re working on retirements someone whacks the unposted additions batch, you’re not stuck.

 

Delete  batch prior to posting then run this script. Afterward, rerun the GL Posting routine.

/*
** Procedure Name:  FA_Undo_GLBatch_Interface
**
** Description:
**
**    Resets the Batch ID to '' (blank) for the selected Batch ID in
**    the Financial Detail File (FA00902) so that the GL Interface can be run again
**    to pick up those details.
**
**    **WARNING: This does not change any GL tables
**
** Special Instructions:
**
**    set @BatchName = 'XXX' --XXX must be replaced with the Batch Name to be affected
**   
** Database:    Company
**
**
******************************************************************************************
*/

declare @BatchName char(15)
set @BatchName = 'XXX'

UPDATE FA00902
    SET GLINTBTCHNUM = '', GLINTTRXDATE = '1900-01-01 00:00:00.000'
    WHERE GLINTBTCHNUM = @BatchName

DELETE FA15000
    WHERE GLINTBTCHNUM = @BatchName

DELETE FAINDEX      

 

On  a related note, we had a client going live with Fixed Assets. One of their people was supposed to run the GL Posting interface through 12/31 and then delete batch prior to posting. This would take care of all of the integrated assets which were already in GL. They didn’t. When the first depreciation was run in January we got all the FA additions plus all of the fist month’s depreciation. This script bailed us out. We deleted the batch and reran the posting routine through 12/31. This created a batch of additions which we deleted. We then ran the GL process through 1/31 and got a batch with just January depreciation.