talha.quadri
8th November 2021, 11:00
I am trying to call the same funtion after incrementing the counter value. below is my code.
function extern check.next.approver(domain hrgen.desg hold.desg.local)
{
on case counter
case 1:
select hrper001.*
from hrper001
where hrper001.emno = :hrgen520.init
selectdo
select hrper103.*
from hrper103
where hrper103.desg = :hrper001.desg
selectdo
if hrgen520.nxta <> hrper103.dmgr then
hold.nxta = hrper103.dmgr
counter = counter + 1
else
counter = counter + 1
check.next.approver(hold.desg.local)
endif
endselect
endselect
break
case 2:
select hrper001.*
from hrper001
where hrper001.emno = :hrgen520.init
selectdo
select hrper103.*
from hrper103
where hrper103.desg = :hrper001.desg
selectdo
if hrgen520.nxta <> hrper103.hodp then
hold.nxta = hrper103.hodp
counter = counter + 1
else
counter = counter + 1
check.next.approver(hold.desg.local)
endif
endselect
endselect
break
}
function extern check.next.approver(domain hrgen.desg hold.desg.local)
{
on case counter
case 1:
select hrper001.*
from hrper001
where hrper001.emno = :hrgen520.init
selectdo
select hrper103.*
from hrper103
where hrper103.desg = :hrper001.desg
selectdo
if hrgen520.nxta <> hrper103.dmgr then
hold.nxta = hrper103.dmgr
counter = counter + 1
else
counter = counter + 1
check.next.approver(hold.desg.local)
endif
endselect
endselect
break
case 2:
select hrper001.*
from hrper001
where hrper001.emno = :hrgen520.init
selectdo
select hrper103.*
from hrper103
where hrper103.desg = :hrper001.desg
selectdo
if hrgen520.nxta <> hrper103.hodp then
hold.nxta = hrper103.hodp
counter = counter + 1
else
counter = counter + 1
check.next.approver(hold.desg.local)
endif
endselect
endselect
break
}