How to validate 3rd global dim on Purch. lines

KisuKisu Member Posts: 381
I'm making a port which has 3 dimension fields 1, 2 and 7
I'm able to validate 1 and 2 but not 3rd one(dim 7), since its a variable on the Purch. line sub form instead of in the table :-k

The dimensions I have are
1. Department
2. Partner

3. Business Area
4. Workgroup
5. Item category
6. Cost centre
7. Project

Any help with this?
K.S.

Comments

  • kapamaroukapamarou Member Posts: 1,152
    From what I understand you are making a dataport to upload Purchase lines.

    In this case you should fill table 357 Document Dimension for the rest of the shortcut dimensions using Table Number, Document Type, Document No. and so on...

    When you validate the 2 global dimensions they are automatically inserted into that table. The rest should be done manually...
  • KisuKisu Member Posts: 381
    kapamarou wrote:
    From what I understand you are making a dataport to upload Purchase lines.

    In this case you should fill table 357 Document Dimension for the rest of the shortcut dimensions using Table Number, Document Type, Document No. and so on...

    When you validate the 2 global dimensions they are automatically inserted into that table. The rest should be done manually...


    Oo nice thanks.
    K.S.
  • KisuKisu Member Posts: 381
    Soo, I made record variable DocumentDim for that table and put this code on.
    (purchlines is the current rec)
    IF WF_lines.LEVEL3 = 7 THEN BEGIN // occurance none or once
    DocumentDim.INIT;        
    DocumentDim."Table ID" := DATABASE::"Purchase Line";        
    DocumentDim."Document Type" := purchlines."Document Type";        
    DocumentDim."Document No." := purchlines."Document No.";        
    DocumentDim."Line No." := purchlines."Line No.";        
    DocumentDim."Dimension Code" := 'PROJECT'; // not sure can I use that level no here too. :p
    DocumentDim.VALIDATE("Dimension Value Code",WF_lines.DIMENSION_VALUE3); 
    IF DocumentDim.INSERT THEN; 
    END;
    
    K.S.
Sign In or Register to comment.