Missing G/L Dimensions; Code Check

geri79
geri79 Member Posts: 105
Hello,

I have G/L Account lines with "Global Dimension 1 Code" filled but no entry for that record in T255 Ledger Entry Dimension. Don't ask me how, but it has happened...

So I designed a small Report (Data Iem G/L Entry) to correct the my data.
I tried it on a test system in it works fine. Are there any other side effects where should think of?


IF "G/L Entry"."Global Dimension 1 Code"<>'' THEN BEGIN
IF NOT LedgerEntryDimension.GET(17,"Entry No.",Cost Center) THEN BEGIN
LedgerEntryDimension.INIT;
LedgerEntryDimension."Table ID":=17;
LedgerEntryDimension."Entry No.":="Entry No.";
LedgerEntryDimension."Dimension Code":='COST CENTER';
LedgerEntryDimension."Dimension Value Code":="Global Dimension 1 Code";
LedgerEntryDimension.INSERT;
END;
END;

Thanks for your comments.

geri
geri

Answers

  • Juha
    Juha Member Posts: 39
    Change this line
    IF NOT LedgerEntryDimension.GET(17,"Entry No.",Cost Center) THEN BEGIN
    to
    IF NOT LedgerEntryDimension.GET(17,"Entry No.",'COST CENTER') THEN BEGIN

    or better get table 98 and use General Ledger Setup.Global Dimension 1 Code instead of COST CENTER in

    IF NOT LedgerEntryDimension.GET(17,"Entry No.",Cost Center) THEN BEGIN
    and
    LedgerEntryDimension."Dimension Code":='COST CENTER';

    There is no side effects other than you might need to update analysis views using Global Dimension 1.
  • geri79
    geri79 Member Posts: 105
    Thanks
    geri
  • robertadi
    robertadi Member Posts: 8
    Hello people,

    I solved the problem writing some code in codeunit 12, updating the same info's as you guys said, just that that doesn't solves the whole issue!
    The Analysis by dimension entries are still generated without those dimensions.
    Anyone knows another solution to fix the whole issue :?:

    Thanks ,
    Robert