Saturday, April 2, 2011

JD Edwards Fixing Advance Pricing data F4074..

drop table jde_rk.dbo.tempadprc
select distinct sddoco addoco ,sdlnid adlnid  into jde_rk.dbo.tempadprc from jde_production.proddta.f4211 
left outer join jde_production.proddta.f4074 on sddoco=aldoco and  sddcto=aldcto and  sdkcoo=alkcoo and sdlnid=allnid and ALOSEQ=0
where sdlttr != '980' AND sddcto='SO' and sdlnty='S' AND SDTRDJ  > 111000  and aldoco is null
and sdkcoo in ('00667')
 


insert jde_production.proddta.f4074
select
sddoco ALDOCO,sddcto ALDCTO,sdkcoo ALKCOO,'' ALSFXO,sdlnid ALLNID,0 ALAKID,'' ALSRCFD,0 ALOSEQ,0 ALSUBSEQ,0 ALTIER,'' ALASN,'' ALAST,
sditm ALITM,0 ALAN8,sdcrcd ALCRCD,sduom ALUOM,0 ALMNQ,'' ALLEDG,'' ALFRMN,'' ALBSCD,(sdsoqs*10000)ALFVTR,'' ALABAS,Sduprc ALUPRC,
0 ALFUP,'' ALGLC,'' ALARSN,'' ALACNT,'' ALSBIF,'' ALMDED,1 ALPROV,0 ALATID,0 ALIGID,0 ALCGID,0 ALOGID,0 ALANPS,0 ALBSDVAL,'' ALSRFLAG,
'' ALADJCAL,0 ALNBRORD,'' ALUOMVID,'' ALOLVL,'' ALADJSTS,'' ALADJREF,0 ALACCAN8,0 ALBNAD,'' ALADJGRP,'' ALMEADJ,'' ALFVUM,'' ALPDCL,
0 ALCFGID,0 ALCFGCID,''ALAPRP1,''ALAPRP2,''ALAPRP3,''ALAPRP4,''ALAPRP5,''ALAPRP6,''ALNDPI,'SQLFIX'ALUSER,'SQLFIX'ALPID,'SQLFIX'ALJOBN,
'111094' ALUPMJ,sdtday ALTDAY,'' ALPMTN,'' ALRULENAME,'' ALPA04
from jde_production.proddta.f4211
left outer join jde_rk.dbo.tempadprc on sddoco=addoco and sdlnid=adlnid
where  addoco is not null

No comments: