Insert data in JD Edwards E1 tables create Item branch F4102 , Item Location F41021 and item cost F4105 using sql-server.
create proc insert_IM_BP_CO as
declare @fmcu varchar(12)
declare @tmcu varchar(12)
set @fmcu='SOUTHAFRICA'
set @tmcu=' SAFRICA-INT'
drop table jde_rk.dbo.mar021
select * into jde_rk.dbo.mar021 from proddta.f41021 where ltrim(limcu) =@fmcu and lipqoh<>0 and lipbin='P'
update jde_rk.dbo.mar021 set limcu =@tmcu ,lipqoh=0,lipcom=0,lilrcj=0, liuser='SQL-SERVER',liupmj=109343
-----------------------------------------------
drop table jde_rk.dbo.mar02
select * into jde_rk.dbo.mar02 from proddta.f4102 where ibitm in(select liitm from jde_rk.dbo.mar021)
and ltrim(ibmcu) =@fmcu
update jde_rk.dbo.mar02 set IBmcu =@tmcu , ibuser='SQL-SERVER',IBupmj=109343
------------------------------
drop table jde_rk.dbo.mar05
select * into jde_rk.dbo.mar05 from proddta.f4105
where coitm in(select liitm from jde_rk.dbo.mar021) and ltrim(comcu) =@fmcu
update jde_rk.dbo.mar05 set comcu =@tmcu , couser='SQL-SERVER',coupmj=109343
-------
insert into proddta.f41021
select * from jde_rk.dbo.mar021
insert into proddta.f4102
select * from jde_rk.dbo.mar02
insert into proddta.f4105
select * from jde_rk.dbo.mar05
No comments:
Post a Comment