do not use a cursor for this its simple set processing
Create Proc
Declare Variables
put values in variables
Insert 4 Temp Tables & Populate (#SI_OVER_I is one of them)
UPdate A
Set SI_Seq = b.maxsi + y.rn
from #SI_OVER_I as A
Inner Join (select incomingid,max(si_seq) as maxsi
from #si_pver_i
group by incomingid) as B
on a.incomingid=b.incomingid
Inner Join (select incomingid,row_number() over(order by si_id) as rn
from (select distinct incomingid,si_id from #si_over_i) as x
) as Y
on a.incomingid=y.incomingid
where IncomingId = @IncomingId and SI_ID = @SI_ID
Create Temp table to process the data
Create Final temp table to dump the needful data
Then update all the final data according to business rules