1 package body pay_kr_nonstat_spay_efile_fun as
2 /*$Header: pykrnspen.pkb 120.0 2005/05/29 10:46:38 appldev noship $ */
3
4 /*************************************************************************
5 * Function that count the Previous Employers.
6 *
7 *************************************************************************/
8 function get_prev_emp_count (p_assignment_action_id IN Number) return Number
9 is
10 l_prev_emp_count NUMBER(4);
11 cursor csr_get_prev_emp_count
12 is
13 select
14 nvl(count(fue.user_entity_id),0) prev_emp_count
15 from ff_Archive_items fai
16 ,ff_user_entities fue
17 where fue.user_entity_id = fai.user_entity_id
18 and fue.user_entity_name = 'X_KR_PREV_BP_NUMBER'
19 and fai.context1 = p_assignment_action_id
20 group by fai.context1;
21 begin
22 open csr_get_prev_emp_count;
23 fetch csr_get_prev_emp_count into l_prev_emp_count;
24 close csr_get_prev_emp_count;
25 return nvl(l_prev_emp_count, 0);
26 end get_prev_emp_count;
27
28 end pay_kr_nonstat_spay_efile_fun;