Item Journal Dataport

Can anyone help me with this problem? I am trying to enter physical inventory quantities from Excel. I have exported the Physical Journal using dataport, copied the physical quantities into the spreadsheet, then saved in .csv format. When I go to import, I get an error message “Physical Inventory must be “Yes” in journal …line…”. I have looked at the journal and the Physical Inventory field is Yes - for all lines, both in the journal and in the import file. How can I get the quantities into the journal (besides re-keying them all) and also get the journal to update the Entry Type, Quantity and Amount fields? I’d ask my service provider, but this being Australia everyone’s on holiday till next year and we’re having our annual stocktake on Jan 2nd. Due to bad planning we don’t have access to Navision in the warehouse yet, hence the use of excel for the stocktake.

Hello, also I suppose to be on holiday, but I am complaining with Navision Dataports. The Dataports should be easy, but it seems that every dataport creation takes time. I could not get the exact scope to solve your problem, but you can try to open the C/AL Code on that dataport and write on OnAfterImportRecort()-line VALIDATE (“Physical Inventory Field”); this is just one suggestion. Because you are in Australia you may not have dual-language version and that won´t be a problem. Try also to save exel.csv to other formats like txt. That could help. Also I have one problem when I try to import new lines to Job Journal. I know that I should write: LOCTABLE; SETRANGE(“Journal Template Name”,‘JOB’); SETRANGE(“Journal Batch Name”, IMPORT’); IF FIND (’+’) THEN NextLineNo := “Line No.” +10000 ELSE NextLineNo := 10000; And this is to get new line numbers for the imports. I do not know the place to write this so it works. Could someone help me with this.

hi, If you run a export-dataport in one language, than you have to import this dataport also in the same languague, otherwise Navision has problems with the boolean translations. So try, Export you dataport in a English language import this dataport in other language : than you get an error message when you import boolean variables. either, if you export your dataport in English import your dataport in English : everything works fine This is a problem that I had seen a few times and on a lucky day I found the reason Enjoy your work Nico

Hello, also I fond a resolution to my problem and I hope that davoinoz found one too. If you did not, let us know. Resolution to my problem was found in these pages. David Cox’s way to do this really worked. Thank you. Just validate the fields required Example: If we was Importing Opening Sales Documents OnPreDataPort set your defaults “Gen. Journal Line”.Template:=‘SALES’; “Gen. Journal Line”.Batch:=‘OPENING’; “Gen. Journal Line”.Type:=“Gen. Journal Line”.Type::Customer; “Gen. Journal Line”.“Bal. Type”:=“Gen. Journal Line”.Type::“Account G/L”; “Gen. Journal Line”.“Bal. No.”:=BalAccount; ETC: ETC: NextLineNo:=0; OnAfterImportRecord() TempDescription:=Description; NextLineNo:=NextLineNo+10000; “Line No.” := NextLineNo; Validate(“No,”) will run the trigger code for the customer, giving an error for bad data! Replace the Description with the posting description Description:=TempDescription: Blank out VAT posting groups to post only the value (No VAT) then balance to a suspense account David Cox MindSource (UK) Limited Navision Solutions Partner Email: david@mindsource.co.uk Web: www.mindsource.co.uk Edited by - David Cox on 2001 Mar 22 22:53:20

Thanks for all the suggestions - you guys are great! But ohmygosh - you’re talking code!?!?! Yuuk. I’m just a humble enduser and barely know how to look at a dataport, let alone write one. Anyhow, I’ve tried the “.txt” solution - no go; I even get the same error when I import the file I just exported. Also tried with the “onafterimport” code you suggested (luckily I know just enough about c/al to do this) but it does nothing different either. So i’m back to square one - any more suggestions will be most welcome. Anyhow, glad you found a solution to your problem; if I can be of any further help just let me know:) Happy Christmas.

Key, man… let’s try to solve your problem before new year :slight_smile: I’ve done a test using no code at all for making what i’m thinking you did almost… :slight_smile: These are the steps i made for making it work. 1) Create a dataport using all the item journal lines fields as dataport fields (i know you won’t be using most of them for that… but that way you ensure you’re getting all the fields properly) 1b) Exported as .txt filtering by the journal template name of the physical inventory and the journal batch name of the batch i’m having the physical inventory lines. 2) Modify the physical quantities on the file for setting my own (used a text editor). 3) Ensuring that the value on physical quantity = quantity - quantity calculated. (in my case quantity calculated = 0 & physical quantity = quantity) on the file. 4) Ensuring that the field with physical inventory was set to “yes” on all of them on the .txt file 5) Saving again the file (.txt) 6) Importing again using the same dataport but in import mode and using again the filters for the journal template name and the journal batch name. 7) Checking that the values were properly changed on the journals. 8) Post… All worked fine… If after following these steps you’re still having problems send me an e-mail and i’ll try to help you :slight_smile: Happy Christmas. Alfonso Pertierra (Spain)apertierra@teleline.es