How to dataport into General Journal

Dear Navision gurus! It must be something easy but I can’t figure out how to dataport a simple .csv file into General Journal. It looks like the SourceTable for General Journal (form 39) is table # 81 but in fact it’s more than that! We have ShortCut Dimensions 1-7 which appears to be located in the separate table! [:(] Please help me with this puzzle. Thanks!

Create a function with parameters Dim (integer) and DimValue (Code) GenJnlLineDim.INIT; GenJnlLineDim."Table ID" := DATABASE::"Gen. Journal Line"; GenJnlLineDim."Journal Template Name" := GenJnlLine."Journal Template Name"; GenJnlLineDim."Journal Batch Name" := GenJnlLine."Journal Batch Name"; GenJnlLineDim."Journal Line No." := GenJnlLine."Line No."; CASE Dim OF 1 : GenJnlLineDim.VALIDATE("Dimension Code", GeneralLedgerSetup."Shortcut Dimension 1 Code); 2 : GenJnlLineDim.VALIDATE("Dimension Code", GeneralLedgerSetup."Shortcut Dimension 2 Code); // Similar code for 3..7 END; GenJnlLineDim.VALIDATE("Dimension Value Code", DimValue); GenJnlLineDim.INSERT(TRUE); where GenJnlLineDim is a record of type Journal Line Dimension - hope you get the gist…

Hi Denis, In this case u can import the data into the variables and then insert wherever u want. Cheers

Hi,

I have created a dataport to import journal entries from a CSV file. However when I run the dataport only the last line on the csv file appears in General Journal. Can someone please advise? I am using Navision 2009.

Thanks,

Teena

the key is “Journal Template Name,Journal Batch Name,Line No.”

are you including an incremental “Line No” in your CSV file?

If not you can add it to the code of the dataport.

“Line No.” := “Line No.” + 10000;