Good morning all,
I use Item Journal to enter items in inventory. When there are a lot of serial number, I must enter them one by one. It's very hard!!!
My question is : how can I import serial numbers of an item to the batch Item Traking Lines from EXCEL file ? Can I use the table Excel Buffer (ID 370) ?
Thank you in advance
Comments
In Excel:
Save As ... *.csv
(this type of text file is contains separators. The operator default value is ";", but this is depend on the operating system (for example Windows XP at the Regional Settings --> Numbers (List separator))
2)
Next, create a dataport, because it is more easier than other way. Or if you can import from Excel directly, it's better) :!:
Can you setup the properties in a dataport module?
for exapmle if the excel structure is the same as like tha table try select all in excel, copy, and paste to tha table
Some table it is works
But the dataport is the safeiest way
alternatively if you can provice your email id and i will email an object to import the file.
for example:
1) does the serial no. already exist in navision item ledger entry (ideally if you are importing that suggests a lot of s/numbers and it would be good if the client establishes duplicates before the dataport is imported, coz once it's imported its difficult to establish which one is the duplicate).
2) An exception report of the numbers that are not imported due any integrity issues.
Set the autoupdate and autosave to false on the dataport dataitem.
Set the fieldlist
On the afterimportrecord trigger have 2 journal records
lrJnl.init;
lrjnl.reset;
lrjnl.setcurrentkey("journal template name", "journal batch name", "line no.");
lrjnl.setrange("journal template name", ___________);
lrjnl.setrange("journal batch name", _____________);
if lrjnl.find('+') then
lrjnl2."line no." := lrjnl."line no." + 10000
else
lrjnl2."line no." := 10000;
then set the rest of the values for variable lrjnl2, using VALIDATES for any fields that lookup, then
lrjnl2.insert;
at the very end of the dataport put a commit;
Then you import to the journal not worrying about overwriting records or primary keys. You should NEVER write directly to posted (ledger) tables, this has amazing potential for disaster. Import to the journal, post manually; let the posting routine do it's job and put the data in the correct place.
-a