Importing same Doc. No's data in two different tables

Aravindh_Navision
Member Posts: 258
Hi Guys,
I have a a question in NAV Classic Client dataport.
Using one dataport, I need to import data into two different tables.
I need to insert records from a CSV file into NAV Purchase Journals (Gen. Journal Line table). This part is working fine. In CSV file, I have a two columns named Line Narration and Voucher Narration. I need to differentiate those columns and insert into Line Narration and Voucher Narration field in Gen. Journal Narration table.
Hint: In Gen. Journal Narration table, there are two fields Gen. Journal Line No. (for Line Narration) and Line No. (for Voucher Narration)
Example: Gen. Journal Narration

Can anyone explain how to do this task? Let me know if you need more clarification.
Regards,
Aarvi
I have a a question in NAV Classic Client dataport.
Using one dataport, I need to import data into two different tables.
I need to insert records from a CSV file into NAV Purchase Journals (Gen. Journal Line table). This part is working fine. In CSV file, I have a two columns named Line Narration and Voucher Narration. I need to differentiate those columns and insert into Line Narration and Voucher Narration field in Gen. Journal Narration table.
Hint: In Gen. Journal Narration table, there are two fields Gen. Journal Line No. (for Line Narration) and Line No. (for Voucher Narration)
Example: Gen. Journal Narration

Can anyone explain how to do this task? Let me know if you need more clarification.
Regards,
Aarvi
0
Answers
-
Hi Aarvi,
You answered your question yourself.
Just create a variable of table "Gen. Journal Narration". Just do an init and Insert with values of all these fields -
Journal Template Name
Journal Batch name
Document No.
Gen. Journal Line No.
Line No.
Narration.
What is the problem. How system Differs between Line Narration and Voucher Narration using "Gen. Journal Line No.". If its "0" that means its a voucher narration.
Let me know if any question.
Thanks & Regards,
Saurav Dhyani
Do you Know this About NAV?
Connect - Twitter | Facebook | Google + | YouTube
Follow - Blog | Facebook Page | Google + Page0 -
Thanks Saurav for your reply.
Please find the below screenshot. This is how the CSV file looks. Using this file, I need to insert values in two different tables: "Gen. Journal Line" table and "Gen. Journal Narrtion" table.
Line Narration and Voucher Narration will be given in CSV file by the user. For few lines, Voucher Narration will not be given (for this we need to change the "Gen. Journal Line No." to 0, if I am correct). How to determine the importing value is null or with value? It might be simple, but got struck up there
Could you please throw me some logic on this?
Regards,
Aarvi0 -
you can import the values to variables and not to fields directly.
you can check whether variables are blank or having data before proceeding?0 -
Hi Aarvi,
As Mohanan Suggested You can proceed with same approach.
While Inserting a Line It should be something like -If "Line Narration" <> '' THEN InsertNarration(TemplateName,BatchName,DocumentNo,GenLineNo,LineNo,"Line Narration"); If "Voucher Narration" <> '' THEN InsertNarration(TemplateName,BatchName,DocumentNo,GenLineNo,0,"Line Narration");
Where InsertNarration is a function which actually insert record. Hope it make sense.
Thanks & Regards,
Saurav Dhyani
Do you Know this About NAV?
Connect - Twitter | Facebook | Google + | YouTube
Follow - Blog | Facebook Page | Google + Page0
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