web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

The stored procedure rmHistoricalAgedTrialBalance returned the following results DBMS: 2627, Microsoft GP: 0.

(0) ShareShare
ReportReport
Posted on by

Customer is getting an error when trying to run the Historial Aged Trial Balance report.  Why would someone get this and how can we fix it?

 

*This post is locked for comments

I have the same question (0)
  • Dave Dusek Profile Picture
    Microsoft Employee on at

    When you run the rm hatb, we call a stored proc called 'rmHistoricalAgedTrialBalance'.  The stored proc is not encrypted.  This proc inserts records into temp tables that are then used when the report prints.  The proc is trying to insert a duplicate into one of the temp tables.  You should be able to turn the sql profiler on and run it and let it get the error.  Then look at the profile and find the error.  You should be able to see the record it is failing on.  That might give you some idea of what is going on.  There are three temp tables passed into the 'rmHistoricalAgedTrialBalance' proc.  They are RM HATB Customer TEMP, RM HATB Document TEMP and RM HATB Applied TEMP in that order.  So if you do a dexterity script log, you will see the temp table names passed in and you should be able to figure out what table it's failing on as well.  I guess that's where I would start.  Sounds like a data issue for this customer.

  • Richard Wheeler Profile Picture
    75,852 Moderator on at

    May I add you should run the RM Duplicate Document Script. Dave is correct, there is probably bad data in one or more of your tables that is causing this. I believe you can obtain this script from Microsoft. You may need to open a case for this.

  • Community Member Profile Picture
    on at

    I opened a GP case. Thanks for the help though. I appreciate it.

  • Romryan Profile Picture
    on at

    LSandhawalia,

    Did you sort this issue and what was the solution. I am encountering this issue.

    Kindly assist.

    RomRyan

  • Derek Albaugh Profile Picture
    Microsoft Employee on at

    It appears they may have opened a support ticket to get a 'RM Duplicate Document ' script as the error is pretty much due to data, in this case having duplicate records trying to be inserted into the temporary table, i.e. ##021383F, thus the error message.

    In order to troubleshoot something like this, you'd need to look at what is being inserted into the temporary table and where the data is being pulled from, when it causes the duplicate error message, then find the duplicate record(s) to fix them.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Shravan Attelli Profile Picture

Shravan Attelli 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans