Options

Dimension Flow

PassHopePassHope Member Posts: 25
I am having a little difficult to understand the flow of dimensions, and would be happy if someone with knowledge of this would reply.

I found this table in the Dev II coursebook, but it is hard to find detailed description of this topic.

Dimension Table - Type of Entry
352 Default Dimension - Master file records
355 Ledger Entry Dimension - Ledger entries
356 Journal Line Dimension - Journal lines
357 Document Dimension - Document headers and lines
358 Production Document Dim. - Production orders, lines and components
359 Posted Document Dim. - Posted document headers and lines
361 G/L Budget Dimension - Budget entries

Example : If I write a sales order, with dimensions Project and Department.
When I post this, what is the dimesion flow?
I know it will be posted under document header and lines(Sales Invoice/Sales Shipment).

I know the final target is the ledger table, but before this it goes to a journal table, Item Journal if it an Item sold, Res Journal if it is a resource.

In this example what dimensions are used? Only the Document? Or also Journal? What about ledger?

I would appreciate a little help here. I have trie to find a description about this, but haven't succeeded.

Comments

  • Options
    kinekine Member Posts: 12,562
    All is connected to flow of data - Document => Journal => Ledger entries. It means - all data from document are posted through journals (GL, item, resource etc. journals) and are ending in some Ledger entry tables (GL, item, customer, vendor, resource, job etc.).

    Default dimesnions are the dimensions on the cards etc. it means - from the card the dimensions go to document. After posting, the document is copied into some posted document table - for example posted invoice, posted shipment etc...

    final flow:

    Default Dim - Document Dim - Journal Dim - Ledger Dim & Posted Doc Dim
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Default Dim - Document Dim - Journal Dim - Ledger Dim & 
                            |
                            |->   Posted Doc Dim
    
  • Options
    PassHopePassHope Member Posts: 25
    Thanks for reply.
    Maybee I have hard to understand, but I need a litle more help here.

    Well I know that it would end up in the ledger with the dimension that originaly came from the document dimensions.
    Is it so that if I enter data in sales order, then only Document Dimensions is used (those dimensions flow through journal and ends in G/L)? and goes to Posted Doc Dim.

    There is an exam question about that, it is below, but I also has wants to know how this works.

    45) insert a record in sales order. What dimensions are used?
    a) Default dimension
    b) Journal dimension
    c) Ledger
    d) Document
    e) Document posting

    g) Default + journal
    h) Journal+ document
    i) Ledger + document posting


    I see a lot of H answere here, but if you could help me here, I might understand it.
  • Options
    Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    I don't know about the exam questions.

    Look in codeunit 80. Do a find on "DimMgt". This will point out the places where the dimensions are copied.

    If you do the same in codeunit 12 or in table 36/37 you can see exactly for yourself how the dimension flow is.

    Good luck.
  • Options
    kinekine Member Posts: 12,562
    I think that it is not easy to answer this question, because:

    1) What does it mean "insert a record"? It is only inserting empty record?
    Or Insert record, and fill the data (customer no. etc.)?
    2) what does it mean "What dimensions are used"? Does it mean "From which table are the dimension taken?", or "into which table are the dimension saved"? Or "Which tables are used for working with dimensions (every dim table used during whole proces of creating the document)?"

    If you are creating the document, only default dim and document dim table is used. When you are posting, document dim, journal dim, entry dim and posted doc dim are used...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • Options
    Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Insert of Sales Header
    DimMgt.InsertDocDim(
      DATABASE::"Sales Header","Document Type","No.",0,
      "Shortcut Dimension 1 Code","Shortcut Dimension 2 Code");
    

    DimMgt:
    IF TempDimBuf2.FIND('-') THEN
      UpdateDocDefaultDim(TableID,DocType,DocNo,LineNo,GlobalDim1Code,GlobalDim2Code);
    

    UpdateDocDefaultDim
    GetGLSetup;
    DocDim.SETRANGE("Table ID",TableID);
    DocDim.SETRANGE("Document Type",DocType);
    DocDim.SETRANGE("Document No.",DocNo);
    DocDim.SETRANGE("Line No.",LineNo);
    DocDim.DELETEALL;
    GlobalDim1Code := '';
    GlobalDim2Code := '';
    IF TempDimBuf2.FIND('-') THEN BEGIN
      REPEAT
        DocDim.INIT;
        DocDim.VALIDATE("Table ID",TableID);
        DocDim.VALIDATE("Document Type",DocType);
        DocDim.VALIDATE("Document No.",DocNo);
        DocDim.VALIDATE("Line No.",LineNo);
        DocDim."Dimension Code" := TempDimBuf2."Dimension Code";
        DocDim."Dimension Value Code" := TempDimBuf2."Dimension Value Code";
        DocDim.INSERT;
        RecRef.GETTABLE(DocDim);
        ChangeLogMgt.LogInsertion(RecRef);
        IF DocDim."Dimension Code" = GLSetupShortcutDimCode[1] THEN
          GlobalDim1Code := DocDim."Dimension Value Code";
        IF DocDim."Dimension Code" = GLSetupShortcutDimCode[2] THEN
          GlobalDim2Code := DocDim."Dimension Value Code";
      UNTIL TempDimBuf2.NEXT = 0;
      TempDimBuf2.RESET;
      TempDimBuf2.DELETEALL;
    END;
    

    Just follow the path of DimMgt...
  • Options
    PassHopePassHope Member Posts: 25
    Hello.
    I am grateful for your replies.

    I have followed the code (a bit over my head just now), but as as far as I have seen, it is like this:
    - Reads G/L Setup dimension codes (No dim).
    - Updates several document dimensions.
    - Updates several Journal dimensions.
    - Updates several ledger dimensions. (Item, cust. etc)

    So if you post this sales order it will use (if I refer to tables) Firs doc - dimension, posted doc dimensions, journal dimension and finally several ledger dimension.

    I guess the real question is not litteraly as the one I found on this site, but I might think that is just to enter a sales line. Until you post it, document dimensions might be the right answere.

    Following that code has given me a bit more understanding.
Sign In or Register to comment.