microsoft dynamics - GP proc only executes 42 transactions - Dexterity call to a SQL Procedure contains cursor -
i having issue calling sql procedure dexterity. procedure contains cursor. cursor suppose call procedure has call dynamics gp procedure 'tacomputerchecklineinsert'. working supposed overall process has insert transactions in payroll transaction entry. fixed number of 42 transactions inserted. have more 42 transactions. if execute same procedure sql server same parameters gives required result. issue comes when call dexterity. wrong?...i have been on long....and cannot figure out issue.
resolved finally. has got nothing go of 2 econnect procedures namely 'tacreatepayrollbatchheaderinsert' , 'tacomputerchecklineinsert'.
it had raised due select statement before batch creation tacreatepayrollbatchheaderinsert. select statement in place select parameters tacreatepayrollbatchheaderinsert.
the code worked fine when select statement commented.
create proc [dbo].[gtg_pr_create_abs_trx] @cmpanyid int , @uprbchor int -- 1 = computer check , 2 = manual check , @bachnumb char(15) , @employid char(15) , @comptrtp smallint -- computer transaction type:1 = pay code; 2 = deduction; 3 = benefit , @salchg smallint -- salary change ; required if passing salary pay code:1 = reallocate dollars; 2 = reallocate hours;3=reduce dollars;4=reduce hours;=5=additional amount , @uprtrxcd char(6) -- (ot , abs) , @trxbegdt datetime , @trxenddt datetime , @amount numeric(19 , 5) -- amount , @processstatus int out , @errorstate int out , @errstring varchar(255) out set @errorstate = 0 set @errstring = '' -- create batch if doesn`t exist if not exists( select 1 dynamics..upr10304 bachnumb = @bachnumb , cmpanyid = @cmpanyid , uprbchor = @uprbchor ) begin **--select @bachnumb -- ,@uprbchor -- ,@errorstate -- ,@errstring** exec tacreatepayrollbatchheaderinsert @i_vbachnumb = @bachnumb , @i_vuprbchor = @uprbchor , @o_ierrorstate = @errorstate out , @oerrstring = @errstring out -- associate employee deduction code if association doesn`t exist if not exists(select 1 upr00500 employid = @employid , deducton = @uprtrxcd) begin exec tacreateemployeededuction @i_vemployid = @employid , @i_vdeducton = @uprtrxcd , @o_ierrorstate = @errorstate out , @oerrstring = @errstring out end -- create transaction exec tacreatecomputerchecklineinsert @i_vbachnumb = @bachnumb , @i_vemployid = @employid , @i_vcomptrtp = @comptrtp , @i_vsalchg = @salchg , @i_vuprtrxcd = @uprtrxcd , @i_vtrxbegdt = @trxbegdt , @i_vtrxenddt = @trxenddt , @i_vvardbamt = @amount , @o_ierrorstate = @errorstate out , @oerrstring = @errstring out end go
Comments
Post a Comment