Importing Serial no from text file using dataport

Freekster
Member Posts: 5
Since this is my first visit - hi all!
Problem:
I'm importing a text file with Orderno;Lineno;Itemno;Qty;Serialno
If there's a serialno, I want to assign that serialno to the item on the sales line and then the user should Post (Ship or Ship/Invoice) the order.
I've come so far that the serial no is assigned to the line (I see it on from 6510) and everything looks OK. BUT when I try to post it (Ship) it breaks in CU 22 function CheckItemTracking. The error message is Text015 (Serial no is required for item XX...).
I've checked out the code on form 6510 and it seems to me that assigning a serial no is quit a complicated operation. I've tried to replicate the functions used in form 6510 and CU 9900832 in my dataport but without result. There's a lot of varibles declared as temporary records and I'm not sure I've done it right.
If you guys have any input that could help me solve this problem I would be very thankful.
Cheers / fredrik
Problem:
I'm importing a text file with Orderno;Lineno;Itemno;Qty;Serialno
If there's a serialno, I want to assign that serialno to the item on the sales line and then the user should Post (Ship or Ship/Invoice) the order.
I've come so far that the serial no is assigned to the line (I see it on from 6510) and everything looks OK. BUT when I try to post it (Ship) it breaks in CU 22 function CheckItemTracking. The error message is Text015 (Serial no is required for item XX...).
I've checked out the code on form 6510 and it seems to me that assigning a serial no is quit a complicated operation. I've tried to replicate the functions used in form 6510 and CU 9900832 in my dataport but without result. There's a lot of varibles declared as temporary records and I'm not sure I've done it right.
If you guys have any input that could help me solve this problem I would be very thankful.
Cheers / fredrik
0
Comments
-
Hi,
I'm sorry to say, one of my colleagues has been trying the same without success...?
Would like to hear if You find a solution...Regards,
Henrik Frederiksen, Denmark0 -
Hi you will need to enter the Serial No. directly into the "Reservation Entry"
Table (337)ReservEntry.RESET; ReservEntry.LOCKTABLE; ReservEntry.FIND('+'); NextEntryNo := ReservEntry."Entry No." + 1; ReservEntry.INIT; ReservEntry."Entry No." := NextEntryNo; ReservEntry."Creation Date" := WORKDATE; ReservEntry."Source Type" := DATABASE::"Sales Line"; ReservEntry."Source Subtype" := "Sales Line"."Document Type"; ReservEntry."Source ID" := SalesLineLine."Document No."; ReservEntry."Source Ref. No." := SalesLine."Line No."; ReservEntry."Reservation Status" := ReservEntry."Reservation Entry"::Surplus; ReservEntry."Item No." := SalesLine."Item No."; ReservEntry."Serial No." := SerialNo; ReservEntry."Location Code" := SalesLine."Location Code"; ReservEntry.Quantity := SalesLine.Quantity; ReservEntry."Quantity (Base)" := SalesLine."Quantity (Base)"; ReservEntry."Qty. to Handle" := SalesLine."Qty. to Ship"; ReservEntry."Qty. to Handle (Base)" := SalesLine."Qty. to Ship (Base)"; ReservEntry."Qty. to Invoice" := SalesLine."Qty. to Invoice"; ReservEntry."Qty. to Invoice (Base)" := SalesLine."Qty. to Invoice (Base)"; ReservEntry."Qty. Per Unit of Measure" := SalesLine."Qty. Per Unit of Measure"; ReservEntry.INSERT; NextEntryNo := NextEntryNo + 1;
This should help point you in the right direction.Answer the question and wait for the answer.0 -
Thanks Stephen, it looks like it works,
//
Fredrik0
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