Dataport-problem

tomas.bark
Member Posts: 3
Hi there.
I have a dataport that should import a fixed file but with a pretty strange build.
The file looks like this:
*******************************************
3005294210035902 0620200707100205564164357
3205294210035902 000000000000020+00
3205294210035902 000000000027200+25
3205294210035902 000000000002000+25
3105294210035902 111553 000000000000445-
3105294210035902 113310 000000000032000-
3105294210035902 113410 000000000000960-
********************************************
The first line (300) is the salesheader and the other two (320 and 310) are the saleslines. Now I can't figure out how to get the data in the tables because every line is different from each other. My idea is to define 3 dataitems (Sales Header, Sales Line and Sales Line(2)) and define the dataportfields for each dataitem.
(The dataport should loop on the 300-line...)
But I cant get it to work...:(
Does anyone have any ideas?? plez help
I have a dataport that should import a fixed file but with a pretty strange build.
The file looks like this:
*******************************************
3005294210035902 0620200707100205564164357
3205294210035902 000000000000020+00
3205294210035902 000000000027200+25
3205294210035902 000000000002000+25
3105294210035902 111553 000000000000445-
3105294210035902 113310 000000000032000-
3105294210035902 113410 000000000000960-
********************************************
The first line (300) is the salesheader and the other two (320 and 310) are the saleslines. Now I can't figure out how to get the data in the tables because every line is different from each other. My idea is to define 3 dataitems (Sales Header, Sales Line and Sales Line(2)) and define the dataportfields for each dataitem.
(The dataport should loop on the 300-line...)
But I cant get it to work...:(
Does anyone have any ideas?? plez help
0
Comments
-
You can still use a dataport. But in it you can only put 1 field that is a text1024. In the "OnAfterImportRecord()"-trigger, you can analyze the string.
1 limit : NO line in the file may be larger than 1024 bytes!Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
You need to process you data externally, eg using Excel to a more Navision friendly format so that you can save time on not programming codeunits or dataports & Navision resources...
Only when your data is Navision friendly then you do the import...NAV - Norton Anti Virus
ERP Consultant (not just Navision) & Navision challenger0 -
Thanks for the replies..
One question though...
how do I get the codeunit to read one line? is there a special method?0 -
There are many posts about that in the forum. Just use the search functionality.
Among them, I found:
http://www.mibuso.com/forum/viewtopic.php?t=12123
http://www.mibuso.com/forum/viewtopic.php?t=2419
http://www.mibuso.com/forum/viewtopic.php?t=4483
...0
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