Posting Item Journal Lines Error.

I am new in navision i need some help if any one could.

I am trying to transfer the transfer the items from 1 bin to another bin like i will select the source bin and destination bin and all the items will transfered. At the end i have to click posting on the item journal lines to get it posted. The data transfer code is as follows it is coming every thing qty as well but when i click post it gives me error "You cannot post these lines because you have not entered a quantity on one or more of the lines"

Itemjnlline.INIT;
Itemjnlline.“Journal Template Name”:=Txttemplate;
Itemjnlline.“Journal Batch Name”:=Txtbinbatch;
Itemjnlline.“Entry Type”:=Itemjnlline.“Entry Type”::Transfer;
Itemjnlline.“Document No.”:= Noseries.GetNextNo(Txtnoseries,TODAY,FALSE);
Itemjnlline.VALIDATE(“Item No.”,Bincontent3.“Item No.”);
Itemjnlline.Barcode:=Bincontent3.“Item No.”;
Itemjnlline.“Line No.”:=lineno+10000;
Itemjnlline.“Variant Code”:=Txtvariant;
Itemjnlline.“Posting Date”:=WORKDATE;
Itemjnlline.“Location Code”:=Txtlocation;
Itemjnlline.“New Location Code”:=Txtlocation;
Itemjnlline.“Bin Code”:=Txtfrombincode;
Itemjnlline.“New Bin Code”:=Txttobincode;
Itemjnlline.“Unit of Measure Code”:=Bincontent3.“Unit of Measure Code”;
Itemjnlline.VALIDATE(Quantity,Txtransferqty);
Itemjnlline.INSERT;

I am trying to transfer data from BIN contents table to Item Journal Lines for posting.

The error message is quite clear. So what you need to ask yourself is “Why my Txtransferqty field is empty in one or more lines?”

Create all the Journal Lines but do not call the posting routines.

Open the journal and filter on the Quantity. You’ll probarly find at least one line with Quantity=0.

Salut!

Hi Kami,

Have you filtered down to your batch before posting as if you don’t the posting routine will try to post all lines in the Item Journal Line table.

Hi guys,

It is working fine now the problem is that there is one item with quantity 0.

Bincontent3.RESET;
Bincontent3.SETRANGE(Bincontent3.“Location Code”,Txtlocation);
Bincontent3.SETRANGE(Bincontent3.“Bin Code”,Txtfrombincode);
Bincontent3.SETRANGE(Bincontent3.“Quantity” > 0);

How can i make the temporary table with only the records where quantity not equal to 0 (zero).

So that it will only select the items whose quantity is greater than zero.

Thanks.