I have a CSV file as below and I'm trying and failing to import it into BC table: "Gen. Journal Line" (81) using an XmlPort.
"GENERAL","DEFAULT","TLPUK0099","","","95.460","01/01/2018"
"GENERAL","DEFAULT","TLPUK0099","Revalued Source","","-5.370","31/01/2018"
"GENERAL","DEFAULT","TLPUK0099","Revalued Source","REVERSING ENTRY","5.370","01/02/2018"
"GENERAL","DEFAULT","TLPUK0099","Revalued Source","","-8.500","28/02/2018"
"GENERAL","DEFAULT","TLPUK0099","Revalued Source","REVERSING ENTRY","8.500","01/03/2018"
"GENERAL","DEFAULT","TLPUK0099","Revalued Source","","-5.760","10/10/2019"
"GENERAL","DEFAULT","TLPUK0099","Revalued Source","","-5.760","10/10/2019"
"GENERAL","DEFAULT","TLPUK0099","Revalued Source","REVERSING ENTRY","5.760","01/05/2019"
"GENERAL","DEFAULT","TLPUK0099","Revalued Source","REVERSING ENTRY","5.760","01/05/2019"
Here's my XmlPort:-
xmlport 50000 XmlPortGenJrnl
{
Format = FixedText;
Direction = Import;
TextEncoding = UTF8;
UseRequestPage = false;
TableSeparator = '';
schema
{
textelement(Root)
{
tableelement(GenJournalLine; "Gen. Journal Line")
{
XmlName = 'GenJnlLine';
fieldelement(JournalTemplateName; GenJournalLine."Journal Template Name") { }
fieldelement(JournalBatchName; GenJournalLine."Journal Batch Name") { }
fieldelement(AccNum; GenJournalLine."Account No.") { }
fieldelement(Description; GenJournalLine.Description) { }
fieldelement(DocumentNo; GenJournalLine."Document No.") { }
fieldelement(Amount; GenJournalLine.Amount) { }
fieldelement(PostingDate; GenJournalLine."Posting Date") { }
}
}
}
var
myInt: Integer;
}
When I call XmlPort.Run(50000, false, true); in a Page extension action, I get error: Posting Date must have a value in Gen. Journal Line: Journal Template Name=, Journal Batch Name=, Line No.=0. It cannot be zero or empty.
Where am I going wrong? Any help would be greatly appreciated.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156