smusba
9th February 2009, 12:36
Dear Gurus,
Below is the script for inventory of ILC-INV-ITM001 Comparison.
field.item.f:
when.field.changes:
item.t = item.f
field.cwar.f:
when.field.changes:
cwar.t = cwar.f
|****************************** function section ******************************
functions:
function read.main.table()
{
select tdinv001.*, tiitm001.*
from tdinv001, tiitm001
where tdinv001.item between :item.f and :item.t
and tdinv001.item = tiitm001.item
order by tdinv001._index1
selectdo
tdilc101.strs = 0
select sum(tdilc101.stks):tdilc101.strs
from tdilc101
where tdilc101._index4 = {:tdinv001.cwar, "", :tdinv001.item}
selectdo
endselect
if tdilc101.strs <> tdinv001.stoc then
rprt_send()
endif
endselect
}
Problem:
1. This report gives ITM001 (tiitm001.stoc)(Stock in hand) correctly.(cumulative)
2. This report gives me ILC-INV correctly but according to warehouse. I just want (stock in hand) of all the warehouse cumulative.
Layout:
Item Desc ILC (stock in hand) INV(stock in hand)
Below is the script for inventory of ILC-INV-ITM001 Comparison.
field.item.f:
when.field.changes:
item.t = item.f
field.cwar.f:
when.field.changes:
cwar.t = cwar.f
|****************************** function section ******************************
functions:
function read.main.table()
{
select tdinv001.*, tiitm001.*
from tdinv001, tiitm001
where tdinv001.item between :item.f and :item.t
and tdinv001.item = tiitm001.item
order by tdinv001._index1
selectdo
tdilc101.strs = 0
select sum(tdilc101.stks):tdilc101.strs
from tdilc101
where tdilc101._index4 = {:tdinv001.cwar, "", :tdinv001.item}
selectdo
endselect
if tdilc101.strs <> tdinv001.stoc then
rprt_send()
endif
endselect
}
Problem:
1. This report gives ITM001 (tiitm001.stoc)(Stock in hand) correctly.(cumulative)
2. This report gives me ILC-INV correctly but according to warehouse. I just want (stock in hand) of all the warehouse cumulative.
Layout:
Item Desc ILC (stock in hand) INV(stock in hand)