Friday, April 27, 2007

JD Edwards On Hand Qty. based on company & branch plant

drop table jde_rk।dbo।item_det_1select mcco,abat1,aban8,abalph,abeftb,liitm,limcu,sum(lipqoh) lipqoh,sum(LIPQOH-(LIPBCK+LIPREQ+LIQWBO+LIOT1P+LIOT2P+LIOT1A+LIHCOM+LIPCOM+LIFCOM+LIFUN1+LIQOWO+LIQTTR+LIQTIN+LIQONL+LIQTRI+LIQTRO+LIQTY1+LIQTY2)) QtyAval into jde_rk।dbo।item_det_1from proddta.f41021 left outer join proddta.f0006 on limcu=mcmculeft outer join proddta.f41001 on cimcu=limculeft outer join proddta.f0101 on cian8=aban8--left outer join proddta.f4105 on cian8=aban8where mcco =505 and lipqoh<>0group by mcco,abat1,aban8,liitm,limcu,abalph,abeftb







drop table jde_rk.dbo.item_det_2select a.*,imlitm,imaitm,imdsc1,aladd1,aladd2,alcty1,aladds,aladdz,alctr,councs/10000 Cost_02,(lipqoh*councs/10000) ExtCostinto jde_rk.dbo.item_det_2 from jde_rk.dbo.item_det_1 a left outer join proddta.f4101 on liitm=imitmleft outer join proddta.f4105 on liitm=coitm and limcu=comcu and coledg='02'left outer join proddta.f0116 on aban8=alan8 and abeftb=aleftbwhere coledg='02'
select* from jde_rk.dbo.item_det_2


www.svdeals.com super value deals

No comments: