Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Duplicate journal entry number in General Ledger - ( GL10000- GL20000)

(0) ShareShare
ReportReport
Posted on by 790

journal entry number error :

input variable contains a duplicate journal entry number (JRNENTRY) number in General Ledger - ( GL10000- GL20000)

This is my one of the client facing this error.He is using GP 10.0 version.  

how can i duplicate this error on my system.and  let me know  how can i solve this…

*This post is locked for comments

  • Mick Egan Profile Picture
    Mick Egan 3,561 on at
    RE: Duplicate journal entry number in General Ledger - ( GL10000- GL20000)

    Kavitha/Rohit,

    This sounds like the data is not being grouped correctly.

    The GL10000 table will be the Header, so sounds like the next header record is not grouped separately, but appearing as part of the previous record.

    The import would have many lines, but should be grouped for a header, but if each line was attempting to create Journal, then you would get this error.

    Mick

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Duplicate journal entry number in General Ledger - ( GL10000- GL20000)

    HI Leslie,

    I am also getting same issue 'Sql procedure error codes returned:

    Error Number = 687  Stored Procedure= taGLTransactionLineInsert  Error Description = Input variable contains a duplicate Journal Entry number in GL'

    When i am running the application by Window Scheduler that time i am facing this issue.  when i run the application that time its working fine.

    Please give me any solution.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Duplicate journal entry number in General Ledger - ( GL10000- GL20000)

    Thanks Sanjay - this worked for me.

  • L Vail Profile Picture
    L Vail 65,271 on at
    RE: Duplicate journal entry number in General Ledger - ( GL10000- GL20000)

    Hi,

    Just as a side note -  A journal entry number is duplicated if you are using a recurring batch or creating a reversing entry. You can also duplicate a JE without error if you are posting a transaction to history, and that JE number already exists in the history table. Seems like there is another scenario, but I can't think of it right now.

    Kind regards,

    Leslie

  • Richard Wheeler Profile Picture
    Richard Wheeler 75,788 Moderator on at
    RE: Duplicate journal entry number in General Ledger - ( GL10000- GL20000)

    Not necessarily. What if someone did a back-end correction and just changed a journal entry number or had errant custom code that dumped records into the GL20000 or GL30000 table? There would be two ways to do this. The first is the script you provided and the other would be to go to the GL setup table and get the next J/E number and then increment it. Now if someone has access to the GL setup screen and sets the number back, you have a problem.

  • Ian Richardson Profile Picture
    Ian Richardson 4,150 on at
    RE: Duplicate journal entry number in General Ledger - ( GL10000- GL20000)

    " It will not post and may not allow you to enter it at all. It should sense it is a duplicate journal entry number"

    but it obviously has posted if the client has it in their dbase.  Yes GP should sense the error, but it has not.  

    that makes replication very difficult.

    as a user I want to hear my VAR say do this this and this and you get the error, so that I know what not to do again.  

    as a former VAR the expectation is that you are an expert on everything.  VAR's certainly charge as if they are.

    Not knowing how this happened then is a hard thing to tell your customer.  I would expect it of my current VAR.

  • kavitha B Profile Picture
    kavitha B 790 on at
    RE: Duplicate journal entry number in General Ledger - ( GL10000- GL20000)

    Thanks Richard for explation,

    I have used  taGetNextJournalEntry stored procedure to get next journal entry number. But i am getting number that is already exist. so what i did , After getting journal entry i am checking in GL10001  Table.  If it is already there in this table so again am calling ' taGetNextJournalEntry  ' to get next number , until i find new number i am calling the stored procedure. Using this process am not getting any error.

    But one of the client system getting journal entry number error.

    Let me know am i doing correct  way to get next journal entry number. If not what is the best way to get journal number.

  • Richard Wheeler Profile Picture
    Richard Wheeler 75,788 Moderator on at
    RE: Duplicate journal entry number in General Ledger - ( GL10000- GL20000)

    Sanjay's reply will get you the maximum journal entry plus 1 in all three ledger tables. Now if you want to replicate the error, go into ledger setup and set the journal number to something lower than what Sanjay's query returned. The question is why do you want to do this? It will not post and may not allow you to enter it at all. It should sense it is a duplicate journal entry number. I think it would be more important to remove this error from your client's database. I would look for gaps in the journal entry sequence and then fill the gap. Which table contains the duplicate? If it is the GL10000 just delete it from the batch and re-enter it making sure your next journal number in GL setup has been set correctly.

  • kavitha B Profile Picture
    kavitha B 790 on at
    RE: Duplicate journal entry number in General Ledger - ( GL10000- GL20000)

    Thanks for your reply...i need to duplicate this error in my system. Let me know how can i do....

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Duplicate journal entry number in General Ledger - ( GL10000- GL20000)

    Run this script against company db

    select MAX(jrn) + 1 as jrn from (

    select MAX(jrnentry) as jrn from GL10000

    union all

    select MAX(jrnentry) as jrn from GL20000

    union all

    select MAX(jrnentry) as jrn from GL30000

    ) as t

    Take note of the journal number.  Update the next journal number at GL setup.

    Cheers!

    Sanjay

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,387 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans