Analysis View Budget Entry (table 366)

FaulconFaulcon Member Posts: 19
What exactly is the point of this table? The Analysis View Entry table is straightforward and useful, it compresses entries from the G/L Entry table based on the compression you select on the Analysis View, the budget entry table just... duplicates the G/L Budget Entry table. This is in Navision 2009 R2, we'd made a couple of changes to the Update Analysis View codeunit and I was wondering if that might have had an effect but even when I put the original object back in from the demo database I see the same thing. G/L Entry, compressed to a single entry for a year (based on the compression I selected), Budget Entry not compressed at all.

So unless this is just completely broken and I should be looking for a fix or patch or update I can't understand why the table even exists (and even if there is a reason I still think it's broken), I may as well use the G/L Budget Entry table directly for reporting.

Comments

  • FaulconFaulcon Member Posts: 19
    I'll take this to mean nobody has an explanation. Well with a bit of assistance I've worked out the problem is that it puts the budget entry number against every line meaning they're all distinct and can't be compressed unlike the UpdateAnalysisViewEntry function that takes this into account.

    Copying the code from that function to the UpdateAnalysisViewBudgetEntry appears to have fixed the issue.

    From
    IF GLBudgetEntry.Date < AnalysisView."Starting Date" THEN
      TempAnalysisViewBudgetEntry."Posting Date" := AnalysisView."Starting Date" - 1
    ELSE BEGIN
      TempAnalysisViewBudgetEntry."Posting Date" :=
        CalculatePeriodStart(GLBudgetEntry.Date,AnalysisView."Date Compression");
      IF TempAnalysisViewBudgetEntry."Posting Date" < AnalysisView."Starting Date" THEN
        TempAnalysisViewBudgetEntry."Posting Date" := AnalysisView."Starting Date";
    END;
    TempAnalysisViewBudgetEntry."Dimension 1 Value Code" := DimValue1;
    TempAnalysisViewBudgetEntry."Dimension 2 Value Code" := DimValue2;
    TempAnalysisViewBudgetEntry."Dimension 3 Value Code" := DimValue3;
    TempAnalysisViewBudgetEntry."Dimension 4 Value Code" := DimValue4;
    TempAnalysisViewBudgetEntry."Entry No." := GLBudgetEntry."Entry No.";
    
    To
    IF GLBudgetEntry.Date < AnalysisView."Starting Date" THEN BEGIN
      TempAnalysisViewBudgetEntry."Posting Date" := AnalysisView."Starting Date" - 1;
      EntryNo := 0;
    END ELSE BEGIN
      TempAnalysisViewBudgetEntry."Posting Date" :=
        CalculatePeriodStart(GLBudgetEntry.Date,AnalysisView."Date Compression");
      IF TempAnalysisViewBudgetEntry."Posting Date" < AnalysisView."Starting Date" THEN
        TempAnalysisViewBudgetEntry."Posting Date" := AnalysisView."Starting Date";
      IF AnalysisView."Date Compression" = AnalysisView."Date Compression"::None THEN
        EntryNo := GLBudgetEntry."Entry No."
      ELSE
        EntryNo := 0;
    END;
    TempAnalysisViewBudgetEntry."Dimension 1 Value Code" := DimValue1;
    TempAnalysisViewBudgetEntry."Dimension 2 Value Code" := DimValue2;
    TempAnalysisViewBudgetEntry."Dimension 3 Value Code" := DimValue3;
    TempAnalysisViewBudgetEntry."Dimension 4 Value Code" := DimValue4;
    TempAnalysisViewBudgetEntry."Entry No." := EntryNo;
    
    Don't know if this will be of assistance to anyone else but I've been told the same problem is present in the standard 2015 objects so I wouldn't be surprised if other people have encountered it.
Sign In or Register to comment.