15: */
16: procedure upg_single_lat_bal_tab (p_person_id in number)
17: is
18: --
19: type t_def_bal_id is table of pay_latest_balances.defined_balance_id%type
20: index by binary_integer;
21: type t_asg_act_id is table of pay_latest_balances.assignment_action_id%type
22: index by binary_integer;
23: type t_asg_id is table of pay_latest_balances.assignment_id%type
17: is
18: --
19: type t_def_bal_id is table of pay_latest_balances.defined_balance_id%type
20: index by binary_integer;
21: type t_asg_act_id is table of pay_latest_balances.assignment_action_id%type
22: index by binary_integer;
23: type t_asg_id is table of pay_latest_balances.assignment_id%type
24: index by binary_integer;
25: type t_per_id is table of pay_latest_balances.person_id%type
19: type t_def_bal_id is table of pay_latest_balances.defined_balance_id%type
20: index by binary_integer;
21: type t_asg_act_id is table of pay_latest_balances.assignment_action_id%type
22: index by binary_integer;
23: type t_asg_id is table of pay_latest_balances.assignment_id%type
24: index by binary_integer;
25: type t_per_id is table of pay_latest_balances.person_id%type
26: index by binary_integer;
27: type t_value is table of pay_latest_balances.value%type
21: type t_asg_act_id is table of pay_latest_balances.assignment_action_id%type
22: index by binary_integer;
23: type t_asg_id is table of pay_latest_balances.assignment_id%type
24: index by binary_integer;
25: type t_per_id is table of pay_latest_balances.person_id%type
26: index by binary_integer;
27: type t_value is table of pay_latest_balances.value%type
28: index by binary_integer;
29: type t_lat_bal_id is table of pay_latest_balances.latest_balance_id%type
23: type t_asg_id is table of pay_latest_balances.assignment_id%type
24: index by binary_integer;
25: type t_per_id is table of pay_latest_balances.person_id%type
26: index by binary_integer;
27: type t_value is table of pay_latest_balances.value%type
28: index by binary_integer;
29: type t_lat_bal_id is table of pay_latest_balances.latest_balance_id%type
30: index by binary_integer;
31: type t_tu_id is table of pay_latest_balances.tax_unit_id%type
25: type t_per_id is table of pay_latest_balances.person_id%type
26: index by binary_integer;
27: type t_value is table of pay_latest_balances.value%type
28: index by binary_integer;
29: type t_lat_bal_id is table of pay_latest_balances.latest_balance_id%type
30: index by binary_integer;
31: type t_tu_id is table of pay_latest_balances.tax_unit_id%type
32: index by binary_integer;
33: type t_jc is table of pay_latest_balances.jurisdiction_code%type
27: type t_value is table of pay_latest_balances.value%type
28: index by binary_integer;
29: type t_lat_bal_id is table of pay_latest_balances.latest_balance_id%type
30: index by binary_integer;
31: type t_tu_id is table of pay_latest_balances.tax_unit_id%type
32: index by binary_integer;
33: type t_jc is table of pay_latest_balances.jurisdiction_code%type
34: index by binary_integer;
35: type t_oe_id is table of pay_latest_balances.original_entry_id%type
29: type t_lat_bal_id is table of pay_latest_balances.latest_balance_id%type
30: index by binary_integer;
31: type t_tu_id is table of pay_latest_balances.tax_unit_id%type
32: index by binary_integer;
33: type t_jc is table of pay_latest_balances.jurisdiction_code%type
34: index by binary_integer;
35: type t_oe_id is table of pay_latest_balances.original_entry_id%type
36: index by binary_integer;
37: type t_si is table of pay_latest_balances.source_id%type
31: type t_tu_id is table of pay_latest_balances.tax_unit_id%type
32: index by binary_integer;
33: type t_jc is table of pay_latest_balances.jurisdiction_code%type
34: index by binary_integer;
35: type t_oe_id is table of pay_latest_balances.original_entry_id%type
36: index by binary_integer;
37: type t_si is table of pay_latest_balances.source_id%type
38: index by binary_integer;
39: type t_st is table of pay_latest_balances.source_text%type
33: type t_jc is table of pay_latest_balances.jurisdiction_code%type
34: index by binary_integer;
35: type t_oe_id is table of pay_latest_balances.original_entry_id%type
36: index by binary_integer;
37: type t_si is table of pay_latest_balances.source_id%type
38: index by binary_integer;
39: type t_st is table of pay_latest_balances.source_text%type
40: index by binary_integer;
41: type t_st2 is table of pay_latest_balances.source_text2%type
35: type t_oe_id is table of pay_latest_balances.original_entry_id%type
36: index by binary_integer;
37: type t_si is table of pay_latest_balances.source_id%type
38: index by binary_integer;
39: type t_st is table of pay_latest_balances.source_text%type
40: index by binary_integer;
41: type t_st2 is table of pay_latest_balances.source_text2%type
42: index by binary_integer;
43: type t_sn is table of pay_latest_balances.source_number%type
37: type t_si is table of pay_latest_balances.source_id%type
38: index by binary_integer;
39: type t_st is table of pay_latest_balances.source_text%type
40: index by binary_integer;
41: type t_st2 is table of pay_latest_balances.source_text2%type
42: index by binary_integer;
43: type t_sn is table of pay_latest_balances.source_number%type
44: index by binary_integer;
45: type t_tg is table of pay_latest_balances.tax_group%type
39: type t_st is table of pay_latest_balances.source_text%type
40: index by binary_integer;
41: type t_st2 is table of pay_latest_balances.source_text2%type
42: index by binary_integer;
43: type t_sn is table of pay_latest_balances.source_number%type
44: index by binary_integer;
45: type t_tg is table of pay_latest_balances.tax_group%type
46: index by binary_integer;
47: type t_pay_id is table of pay_latest_balances.payroll_id%type
41: type t_st2 is table of pay_latest_balances.source_text2%type
42: index by binary_integer;
43: type t_sn is table of pay_latest_balances.source_number%type
44: index by binary_integer;
45: type t_tg is table of pay_latest_balances.tax_group%type
46: index by binary_integer;
47: type t_pay_id is table of pay_latest_balances.payroll_id%type
48: index by binary_integer;
49: type t_cont_nm is table of ff_contexts.context_name%type
43: type t_sn is table of pay_latest_balances.source_number%type
44: index by binary_integer;
45: type t_tg is table of pay_latest_balances.tax_group%type
46: index by binary_integer;
47: type t_pay_id is table of pay_latest_balances.payroll_id%type
48: index by binary_integer;
49: type t_cont_nm is table of ff_contexts.context_name%type
50: index by binary_integer;
51: type t_cont_vl is table of pay_balance_context_values.value%type
222: --
223: end loop;
224: --
225: forall i in 1..l_def_bal_id_ins.count
226: insert into pay_latest_balances
227: (latest_balance_id,
228: defined_balance_id,
229: assignment_action_id,
230: value,
381: end if;
382: end loop;
383: --
384: forall i in 1..l_def_bal_id_ins.count
385: insert into pay_latest_balances
386: (latest_balance_id,
387: defined_balance_id,
388: assignment_action_id,
389: value,
1224: select ''
1225: into l_dummy
1226: from dual
1227: where exists (select ''
1228: from pay_latest_balances plb
1229: where plb.person_id = p_object_id
1230: );
1231:
1232: l_qualifier := 'Y';
1238: --
1239: end qual_latest_bal_pg;
1240: --
1241: /* Name : upgrade_latest_bal_pg
1242: Purpose : This performs the upgrade of pay_latest_balances from person to
1243: process group
1244: Arguments :
1245: Notes :
1246: */
1264: close c_process_group_id;
1265:
1266: -- perform upgrade
1267: if l_process_group_id2 is null then
1268: update pay_latest_balances
1269: set process_group_id = l_process_group_id
1270: where person_id = p_person_id
1271: and assignment_id is null
1272: and process_group_id is null
1278: and d.dimension_type = 'O'
1279: and d.dimension_level = 'PG');
1280:
1281: else
1282: delete from pay_latest_balances
1283: where assignment_id is null
1284: and person_id = p_person_id
1285: and process_group_id is null
1286: and defined_balance_id in (