The G/L - Item Ledger Relation already exists

avinashavinash Member Posts: 25
Hi Friends,
I am facing a problem when run the batch of cost post to G/L then shown Error: The G/L - Item Ledger Relation already exists. Identification fields and values: G/L Entry No.='2131452',Value Entry No.='855268'. and when check table Item ledger relation where these entry no. not exist please give me solution for this.

Thanks

Comments

  • jglathejglathe Member Posts: 639
    Hi avinash,
    sounds like a posting bug. Could be tricky to debug, though. Do you have additional information, like which NAV version? Do you have a breakpoint where the error occurs?
    with best regards
    Jens
  • geordiegeordie Member Posts: 655
    Please also ensure that nobody deleted some transactions from the database, this could also be the reason for this error.
  • avinashavinash Member Posts: 25
    Thanks for Reply
    Jglathe and Geordie

    I am using nav 2013 r2 and I am sure that nobody deleted transaction from the database
  • krikikriki Member, Moderator Posts: 9,112
    [Topic moved from 'Navision Financials' forum to 'NAV Three Tier' forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • AstiniaAstinia Member Posts: 40
    Hello, I facing same error in PO with Report Preview Posting.

    Did you slove your issue?

    NAV 2016.

    I'm working with Test Company, so I'm sure nobody deleted any records.

    The error comes from Codeunit 5802 Inventory Posting To G/L CreateGLItemLedgRelationEntry.

    In Table 5823 is nothing with those Value Entry No.


    Thanks


  • jglathejglathe Member Posts: 639
    Hi Astinia,

    well, interesting. It would imply that the same relation between G/L entry and value entry is posted twice. Could it be that the preview posting actually posted the entries already? This was a bug in the early releases of NAV2016.

    with best regards

    Jens
  • chets0810chets0810 Member Posts: 5
    edited 2017-02-10
    Nav 2016.
    Here the same error i got. I am getting this error while posting the Purchase Invoice.

    The G/L - Item Ledger Relation already exists. Identification fields and values: G/L Entry No.='0',Value Entry No.='17111'.

    For Rectification:
    I deleted all the entries in G/L - Item Ledger Relation table but still facing this issue. Yes, while upload the GL opening we deleted some G/L Entries entries.

    Causing code is:
    Codeunit 5802 Inventory Posting To G/L CreateGLItemLedgRelationEntry.
    Please help. Let me know if anyone fixed this issue.

    Thanks!!
  • chets0810chets0810 Member Posts: 5
    I figured out the solution, on "Inventory setup" there is the field "Expected cost post to G/L" is True. I just uncheck this tick. Now, I am able to preview posting & as well as I can post the invoice.
    This works for me.
  • xhekixheki Member Posts: 3
    HI All, I am facing same error on NAV 2016 when i am trying to post purchase invoices with three or more lines.

    I found this change on cumulative update 29 for Codeunit 12.
    This change comes from earlier cumulative update.


    Before (BEFORE)
    Codeunit 12
    Function FinishPosting
    OnAfterInsertGlobalGLEntry(GlobalGLEntry);
    UNTIL TempGLEntryBuf.NEXT = 0;

    IF NOT GenJnlPostPreview.IsStarted THEN BEGIN
    GLReg."To VAT Entry No." := NextVATEntryNo - 1;
    IF GLReg."To Entry No." = 0 THEN BEGIN
    GLReg."To Entry No." := GlobalGLEntry."Entry No.";
    GLReg.INSERT;
    END ELSE BEGIN
    GLReg."To Entry No." := GlobalGLEntry."Entry No.";
    GLReg.MODIFY;
    END;
    END;
    END;
    GlobalGLEntry.CONSISTENT(
    After (AFTER)
    OnAfterInsertGlobalGLEntry(GlobalGLEntry);
    UNTIL TempGLEntryBuf.NEXT = 0;

    GLReg."To VAT Entry No." := NextVATEntryNo - 1;
    IF GLReg."To Entry No." = 0 THEN BEGIN
    GLReg."To Entry No." := GlobalGLEntry."Entry No.";
    GLReg.INSERT;
    END ELSE BEGIN
    GLReg."To Entry No." := GlobalGLEntry."Entry No.";
    GLReg.MODIFY;
    END;
    END;
    GlobalGLEntry.CONSISTENT(
Sign In or Register to comment.