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 :
Finance | Project Operations, Human Resources, ...
Suggested Answer

stored procedure FillTimesheetListTempTable Pass Through SQL

(1) ShareShare
ReportReport
Posted on by 2

User goes to her Home Page, clicks on the Procurement section and onto Timesheets and immediately gets the attached error. The stored procedure FillTimesheetsListTempTable. Pass Through SQL, returned the following results: DBMS: 2627, Microsoft Dynamics GP:

We cleared temp tables and all stuck batches, but unsure how else to resolve this.

Categories:
  • Suggested answer
    Assisted by AI
    CU-1234529-002 Profile Picture
    368 on at

    Hi,

    DBMS 2627 is a SQL Server "duplicate key / primary key violation" error. In this case, it's happening in the FillTimesheetsListTempTable stored procedure, which builds a temporary list of timesheets for the PTE navigation window, so this means there's a duplicate/orphaned record somewhere that's colliding when the temp table tries to populate.

    This is a known issue pattern in PTE (Project Time and Expense) — it was flagged and addressed in the GP 2016 RTM fix list for the same exact procedure, so if you're on an older build, a hotfix/update may resolve it directly. Worth checking your current GP version/build against the latest cumulative update.

    Since clearing temp tables and stuck batches didn't resolve it, the more likely cause now is a duplicate timesheet record sitting in both the work and history-related PTE tables (similar to the classic AP "record exists in both work and history" scenario that causes this same DBMS 2627 pattern). A few steps to narrow it down:

    1. Identify which specific timesheet is the culprit. Since the error fires immediately when navigating to Timesheets (not tied to one user action), check if a specific timesheet — possibly one of the ones already stuck/failed in your Approve/Complete screenshot (you show "1 failed" in the batch action) — has a duplicate entry across PTE's underlying SQL tables (e.g., check PA00300/related PTE work tables for duplicate TIMESHEETID + line combos).

    2. Check the timesheet that failed approval. Your screenshot shows "Approve/Complete action completed. 12 succeeded; 1 failed" — that failed one is a strong candidate. If its approval got interrupted mid-process, it may now exist in a state that conflicts with the temp table build (similar to the AP posting-interruption cause Microsoft describes for this same error type).

    3. Take a SQL backup first, then have your DBA/partner query the PTE-related tables for duplicate TIMESHEETID values (work vs. history) to confirm and manually remove the conflicting record — this mirrors Microsoft's official resolution for the same DBMS 2627 error in Payables (KB 852808), just applied to the PTE tables instead of PM tables.

    4. If you don't have direct DB access/expertise for this, this is a good candidate to escalate to your GP partner or Microsoft Support, since manually clearing duplicate SQL records needs care to avoid further data issues.

    If you can identify the failed timesheet's ID, checking that record specifically in SQL would be the fastest path to confirming the root cause.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 429 Most Valuable Professional

#2
CU10121822-0 Profile Picture

CU10121822-0 366

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 360 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans