Import Bank Flat File (CBI Italy)

francescom
Member Posts: 5
Hi,
first thanks for your support in advance! I already have learned a lot from this forum, you deserve the best.
I have a flat file which I'm trying to understand if I will be able to import with the import/export framework (alredy used from some xml, but not with flat files)
File example:
EC01030BT9FF010616CC03061614064665823
610000001 93003CONTO A PACCHETTCCK0103020602000001452348EUR010516C000000233813,87IT92
620000001001020516020516D000000000760,162626 0260001037400083NROSUPCBIN.D.
630000001001DISPOSIZIONE FILIALE DISPONENTE 1217 ID FLUSSO CBI: 23409779 NUM. TOT. PAGAMENTI: 1 IMPORTO BONIFICI: 759,4
6300000010011 IMPORTO COMMISSIONI: 0,75 ORD.ORIG:
620000001002020516020516D000000010240,752626 0260001014400006NROSUPCBIN.D.
630000001002DISPOSIZIONE FILIALE DISPONENTE 1217 ID FLUSSO CBI: 23399399 NUM. TOT. PAGAMENTI: 1 IMPORTO BONIFICI: 10.24
The first line is the opening line (bank statement)
The second line is something commercial (starting w/ 61*)
The third line is something I need to import (starting w/ 62*)
The lines starting with 63* are extensions of 62* lines
In XML this would be:
EC01030BT9FF010616CC03061614064665823
<61*>
<62*>
<63*>
...
...
How can I define this structure in a flat file import definition schema? Is it something that can be done?
Many thanks
Francesco
first thanks for your support in advance! I already have learned a lot from this forum, you deserve the best.
I have a flat file which I'm trying to understand if I will be able to import with the import/export framework (alredy used from some xml, but not with flat files)
File example:
EC01030BT9FF010616CC03061614064665823
610000001 93003CONTO A PACCHETTCCK0103020602000001452348EUR010516C000000233813,87IT92
620000001001020516020516D000000000760,162626 0260001037400083NROSUPCBIN.D.
630000001001DISPOSIZIONE FILIALE DISPONENTE 1217 ID FLUSSO CBI: 23409779 NUM. TOT. PAGAMENTI: 1 IMPORTO BONIFICI: 759,4
6300000010011 IMPORTO COMMISSIONI: 0,75 ORD.ORIG:
620000001002020516020516D000000010240,752626 0260001014400006NROSUPCBIN.D.
630000001002DISPOSIZIONE FILIALE DISPONENTE 1217 ID FLUSSO CBI: 23399399 NUM. TOT. PAGAMENTI: 1 IMPORTO BONIFICI: 10.24
The first line is the opening line (bank statement)
The second line is something commercial (starting w/ 61*)
The third line is something I need to import (starting w/ 62*)
The lines starting with 63* are extensions of 62* lines
In XML this would be:
EC01030BT9FF010616CC03061614064665823
<61*>
<62*>
<63*>
...
...
How can I define this structure in a flat file import definition schema? Is it something that can be done?
Many thanks
Francesco
0
Answers
-
Hy Francesco, you need a custom elaboration Codeunit to read cbi file. This work needs a Partner support.
By Marco0 -
You can use an XMLPort for that, here is an example, it only read the file, show a message with every line and at the end show a message with the number of lines readed. If you cann't import a text file let my know and I provide ypu with the FOB.
OBJECT XMLport 50000 Import CBI file
{
OBJECT-PROPERTIES
{
Date=19/07/16;
Time=18:49:55;
Modified=Yes;
Version List=190716;
}
PROPERTIES
{
Direction=Import;
Encoding=ISO-8859-2;
PreserveWhiteSpace=Yes;
TextEncoding=MS-DOS;
OnInitXMLport=BEGIN
i := 0;
END;
OnPostXMLport=BEGIN
MESSAGE('Lines read: %1', i);
END;
Format=Fixed Text;
}
ELEMENTS
{
{ [{E6C467BC-739F-47D2-91AF-03C48090661D}]; ;Root ;Element ;Text }
{ [{DCCD0916-786F-4E4C-890D-2F592E407636}];1 ;FileCBI ;Element ;Table ;
VariableName=Lines;
SourceTable=Table2000000026;
SourceTableView=SORTING(Field1)
WHERE(Field1=FILTER(1..));
AutoSave=No;
AutoUpdate=No;
AutoReplace=No }
{ [{1BE277B0-C8A3-4995-8E89-D9959ADF3532}];2 ;Line ;Element ;Text ;
Import::OnAfterAssignVariable=BEGIN
i := i + 1;
MESSAGE(Line);
END;
Width=1024 }
}
EVENTS
{
}
REQUESTPAGE
{
PROPERTIES
{
}
CONTROLS
{
}
}
CODE
{
VAR
i@1000000000 : Integer;
BEGIN
END.
}
}
Regards.1
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions