how can i check the negative no when import quanity from data port, because i import the quantity into item journal line
I skip the data port if quantiy is zero but how can i skip the data port when quantity is negative.
Thanks.
how can i check the negative no when import quanity from data port, because i import the quantity into item journal line
I skip the data port if quantiy is zero but how can i skip the data port when quantity is negative.
Thanks.
How are skipping zero quantity in items?
You can probably do this in coding with a less than zero if you can do it equal to zero, but I have two non-coding ways:
i) create your export without them, or remove them from the file prior to importing
ii) bring them into a journal, filter where the quantity is less than zero and delete the journal lines.
Declare qu as decimal in C/AL Local Variable.
qt := “Item Journal Line”.Quantity ;
IF qt = 0 THEN
BEGIN
CurrDataport.SKIP;
END
ELSE
“Item Journal Line”.Quantity := qt ;
I am afraid I am not a developer so I cannot really anbswer this, would “OR qt<0” before the then work?
Sorry Nuno I went to the end and thought it was a reply to my post not yours - I will leave it in your more than capable hands [:D] Although I would take the quick answer of filtering the journal and then deleting all the entries I do not want, as I knoew it would work!!
I’m also apologist of simply creating a filter in journal and deleting lines with unwanted values.
You can replace ‘=’ WITH ‘<=’
IF qt <= 0 THEN
BEGIN
CurrDataport.SKIP;
END
ELSE
“Item Journal Line”.Quantity := qt ;