Tranferring scanned data to Job Journal
xesus_1
Member Posts: 4
Using Intermec 2410 bar code scanner we batch process data at day's end.
Currently there is one function not working correctly. Once data has been input from scanner to system there are three functions. One function is to issue inventory using a sales journal which dumps all the scanned data from temporary form, where the data is collected, to the sales order journal where parts can be posted to a specific Sales order.
Can someone recommend me a way to change the code to have it transferred to the Job Journal lines instead to post out to a job rather than a Sales order.
Thanx a million!
Code below...
MakeJournal(JournalType : 'Receive,Issue,Cycle')
// get EP Setup Values
recInventorySetup.GET('');
// setup for type of journal
CASE JournalType OF
JournalType::Receive: BEGIN
//MESSAGE('Receive');
xFunctionCode := '1';
recItemJournalTemplate.GET(recInventorySetup."2410 Receive Journal Template");
JTN := recInventorySetup."2410 Receive Journal Template";
JBN := recInventorySetup."2410 Receive Journal Batch";
DefaultLocation := recInventorySetup."2410 Location";
NewLocation := '';
ET := recItemJournalLine."Entry Type"::Purchase;
txttype := 'a Receive Item Purchase';
END;
JournalType::Issue: BEGIN
//MESSAGE('Issue');
xFunctionCode := '2';
recItemJournalTemplate.GET(recInventorySetup."2410 Issue Journal Template");
JTN := recInventorySetup."2410 Issue Journal Template";
JBN := recInventorySetup."2410 Issue Journal batch";
DefaultLocation := recInventorySetup."2410 Location";
NewLocation := '';
ET := recItemJournalLine."Entry Type"::Sale;
txttype := 'an Issue Item Sale';
END;
JournalType::Cycle: BEGIN
//MESSAGE('Cycle');
xFunctionCode := '3';
recItemJournalTemplate.GET(recInventorySetup."2410 Cycle Journal Template");
JTN := recInventorySetup."2410 Cycle Journal Template";
JBN := recInventorySetup."2410 Cycle Journal Batch";
//defaultlocation assigned below.
NewLocation := '';
ET := recItemJournalLine."Entry Type"::"Positive Adjmt.";
txttype := 'a Cycle Positive Adjustment';
END;
END;
// get last line no. in "Item Journal Line" table
intLastLine := 10000;
CLEAR(recItemJournalLine);
recItemJournalLine.SETRANGE("Journal Template Name", JTN );
recItemJournalLine.SETRANGE("Journal Batch Name", JBN );
IF recItemJournalLine.FIND('+') THEN
intLastLine := recItemJournalLine."Line No." + 10000;
// make the Item Journal Line's for this engine.
CLEAR(recScannerReadIn);
recScannerReadIn.SETRANGE(FunctionCode, xFunctionCode);
IF recScannerReadIn.COUNT > 0 THEN BEGIN
IF CONFIRM('Do you want to create %1 Journal for these %2 Item(s)?',FALSE,txttype, recScannerReadIn.COUNT) THEN BEGIN
IF recScannerReadIn.FIND('-') THEN REPEAT
WITH recItemJournalLine DO BEGIN
INIT;
CASE xFunctionCode OF
'1':
"Document No." := recScannerReadIn.PurchaseOrder;
'2':
"Document No." := recScannerReadIn.SalesOrder;
'3': BEGIN
"Document No." := '2410 Issue';
DefaultLocation := recScannerReadIn.Location;
END;
END;
"Journal Template Name" := JTN;
"Journal Batch Name" := JBN;
"Line No." := intLastLine;
VALIDATE("Item No.", recScannerReadIn.PartNumber);
"Posting Date" := WORKDATE;
VALIDATE("Entry Type", ET);
VALIDATE("Location Code", DefaultLocation);
"New Location Code" := NewLocation;
EVALUATE(intQty,recScannerReadIn.Qty);
VALIDATE(Quantity, intQty);
"Source Code" := recItemJournalTemplate."Source Code";
"Document Date" := WORKDATE;
Type := Type::" ";
COMMIT;
ItemCheckAvail.ItemJnlCheckLine(recItemJournalLine);
//insert Item Journal line
INSERT;
// if "Item Tracking Code" make a reservation entry on that "Item No."/"Serial No."
//recItem.GET(recScannerReadIn.PartNumber);
//IF (recItem."Item Tracking Code" <> '') AND ((recScannerReadIn.SerialNumber <> '')
//OR (recScannerReadIn.LotNumber <> '')) THEN
//IF intQty > 1 THEN
//MESSAGE(text001)
//ELSE
//MakeISReservation(intLastLine,JTN,JBN,DefaultLocation,intQty);
//Delete recScannerReadIn line
recScannerReadIn.DELETE;
intLastLine := intLastLine + 10000;
END;
UNTIL recScannerReadIn.NEXT=0;
END;
END
ELSE
MESSAGE('All Items have been Item Journaled.');
Currently there is one function not working correctly. Once data has been input from scanner to system there are three functions. One function is to issue inventory using a sales journal which dumps all the scanned data from temporary form, where the data is collected, to the sales order journal where parts can be posted to a specific Sales order.
Can someone recommend me a way to change the code to have it transferred to the Job Journal lines instead to post out to a job rather than a Sales order.
Thanx a million!
Code below...
MakeJournal(JournalType : 'Receive,Issue,Cycle')
// get EP Setup Values
recInventorySetup.GET('');
// setup for type of journal
CASE JournalType OF
JournalType::Receive: BEGIN
//MESSAGE('Receive');
xFunctionCode := '1';
recItemJournalTemplate.GET(recInventorySetup."2410 Receive Journal Template");
JTN := recInventorySetup."2410 Receive Journal Template";
JBN := recInventorySetup."2410 Receive Journal Batch";
DefaultLocation := recInventorySetup."2410 Location";
NewLocation := '';
ET := recItemJournalLine."Entry Type"::Purchase;
txttype := 'a Receive Item Purchase';
END;
JournalType::Issue: BEGIN
//MESSAGE('Issue');
xFunctionCode := '2';
recItemJournalTemplate.GET(recInventorySetup."2410 Issue Journal Template");
JTN := recInventorySetup."2410 Issue Journal Template";
JBN := recInventorySetup."2410 Issue Journal batch";
DefaultLocation := recInventorySetup."2410 Location";
NewLocation := '';
ET := recItemJournalLine."Entry Type"::Sale;
txttype := 'an Issue Item Sale';
END;
JournalType::Cycle: BEGIN
//MESSAGE('Cycle');
xFunctionCode := '3';
recItemJournalTemplate.GET(recInventorySetup."2410 Cycle Journal Template");
JTN := recInventorySetup."2410 Cycle Journal Template";
JBN := recInventorySetup."2410 Cycle Journal Batch";
//defaultlocation assigned below.
NewLocation := '';
ET := recItemJournalLine."Entry Type"::"Positive Adjmt.";
txttype := 'a Cycle Positive Adjustment';
END;
END;
// get last line no. in "Item Journal Line" table
intLastLine := 10000;
CLEAR(recItemJournalLine);
recItemJournalLine.SETRANGE("Journal Template Name", JTN );
recItemJournalLine.SETRANGE("Journal Batch Name", JBN );
IF recItemJournalLine.FIND('+') THEN
intLastLine := recItemJournalLine."Line No." + 10000;
// make the Item Journal Line's for this engine.
CLEAR(recScannerReadIn);
recScannerReadIn.SETRANGE(FunctionCode, xFunctionCode);
IF recScannerReadIn.COUNT > 0 THEN BEGIN
IF CONFIRM('Do you want to create %1 Journal for these %2 Item(s)?',FALSE,txttype, recScannerReadIn.COUNT) THEN BEGIN
IF recScannerReadIn.FIND('-') THEN REPEAT
WITH recItemJournalLine DO BEGIN
INIT;
CASE xFunctionCode OF
'1':
"Document No." := recScannerReadIn.PurchaseOrder;
'2':
"Document No." := recScannerReadIn.SalesOrder;
'3': BEGIN
"Document No." := '2410 Issue';
DefaultLocation := recScannerReadIn.Location;
END;
END;
"Journal Template Name" := JTN;
"Journal Batch Name" := JBN;
"Line No." := intLastLine;
VALIDATE("Item No.", recScannerReadIn.PartNumber);
"Posting Date" := WORKDATE;
VALIDATE("Entry Type", ET);
VALIDATE("Location Code", DefaultLocation);
"New Location Code" := NewLocation;
EVALUATE(intQty,recScannerReadIn.Qty);
VALIDATE(Quantity, intQty);
"Source Code" := recItemJournalTemplate."Source Code";
"Document Date" := WORKDATE;
Type := Type::" ";
COMMIT;
ItemCheckAvail.ItemJnlCheckLine(recItemJournalLine);
//insert Item Journal line
INSERT;
// if "Item Tracking Code" make a reservation entry on that "Item No."/"Serial No."
//recItem.GET(recScannerReadIn.PartNumber);
//IF (recItem."Item Tracking Code" <> '') AND ((recScannerReadIn.SerialNumber <> '')
//OR (recScannerReadIn.LotNumber <> '')) THEN
//IF intQty > 1 THEN
//MESSAGE(text001)
//ELSE
//MakeISReservation(intLastLine,JTN,JBN,DefaultLocation,intQty);
//Delete recScannerReadIn line
recScannerReadIn.DELETE;
intLastLine := intLastLine + 10000;
END;
UNTIL recScannerReadIn.NEXT=0;
END;
END
ELSE
MESSAGE('All Items have been Item Journaled.');
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 327 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