624: , business_group_id
625: , effective_start_date
626: , effective_end_date
627: , object_version_number
628: from pay_run_types_f
629: where run_type_name = p_rt_name
630: and business_group_id = (select pbg.business_group_id
631: from per_business_groups pbg
632: where upper(pbg.name) = upper(p_business_group))
673: , business_group_id
674: , effective_start_date
675: , effective_end_date
676: , object_version_number
677: from pay_run_types_f
678: where run_type_name = p_rt_name
679: and legislation_code = p_legislative_code
680: and business_group_id is null;
681: --
720: , business_group_id
721: , effective_start_date
722: , effective_end_date
723: , object_version_number
724: from pay_run_types_f prt
725: where run_type_name = p_rt_name
726: and business_group_id is null
727: and legislation_code is null;
728: --
884: , effective_end_date
885: , object_version_number
886: , l_mode
887: into rec_uploaded
888: from pay_run_types_f
889: where run_type_id = l_out_rt_id;
890: --
891: end insert_row;
892: -------------------------------------------
913: --
914: cursor chk_for_tl_children
915: is
916: select 1
917: from pay_run_types_f_tl
918: where run_type_id = l_rt_id;
919: --
920: cursor get_prods(p_sess number)
921: is
928: select l.language_code
929: from fnd_languages l
930: where l.installed_flag in ('I','B')
931: and exists (select null
932: from pay_run_types_f_tl rtt
933: where rtt.run_type_id = p_rt_id
934: and rtt.language = l.language_code);
935:
936: l_sess number;
962: pay_prt_ins.set_base_key_value(p_rt_id);
963: --
964: -- now delete the row
965: --
966: delete from pay_run_types_f
967: where run_type_id = p_rt_id;
968: --
969: --
970: -- also need to delete the tl table row, as if one exists for a partic
970: -- also need to delete the tl table row, as if one exists for a partic
971: -- run_type_id it will not insert another, hence updates will not get made
972: --
973: for each_row in get_langs loop
974: delete from pay_run_types_f_tl
975: where run_type_id = p_rt_id
976: and language = each_row.language_code;
977: end loop;
978: --
1079: , effective_end_date
1080: , object_version_number
1081: , l_mode
1082: into rec_uploaded
1083: from pay_run_types_f
1084: where run_type_id = l_out_rt_id;
1085: --
1086: end zap_insert;
1087: -------------------------------------------
1191: , effective_end_date
1192: , object_version_number
1193: , l_mode
1194: into rec_uploaded
1195: from pay_run_types_f
1196: where run_type_id = rec_uploaded.rt_id
1197: and effective_start_date = l_out_esd
1198: and effective_end_date = l_out_eed;
1199: --
1222: --
1223: cursor chk_for_tl_children
1224: is
1225: select 1
1226: from pay_run_types_f_tl
1227: where run_type_id = rec_uploaded.rt_id;
1228: --
1229: l_ch_rtu_id number;
1230: l_ch_ovn number;
2026: --
2027: cursor get_parent_id (p_bg_id number)
2028: is
2029: select prt.run_type_id
2030: from pay_run_types_f prt
2031: where prt.run_type_name = p_parent_run_type_name
2032: and p_effective_start_date between prt.effective_start_date
2033: and prt.effective_end_date
2034: and ((p_business_group is not null
2042: --
2043: cursor get_child_rt_id(p_bg_id number)
2044: is
2045: select prt.run_type_id
2046: from pay_run_types_f prt
2047: where prt.run_type_name = p_child_run_type_name
2048: and p_effective_start_date between prt.effective_start_date
2049: and prt.effective_end_date
2050: and ((p_child_bg is not null
2588: --
2589: cursor get_run_type_id(p_bg_id number)
2590: is
2591: select run_type_id
2592: from pay_run_types_f
2593: where run_type_name = p_base_rt_name
2594: and nvl(business_group_id, -1) = nvl(p_bg_id, -1)
2595: and nvl(legislation_code, 'CORE') = nvl(p_rt_leg_code, 'CORE');
2596: --
2771: -- Get the run type id
2772: --
2773: select prt.run_type_id
2774: into l_rt_id
2775: from pay_run_types_f prt
2776: where UPPER(prt.run_type_name) = p_rt_name
2777: and p_effective_start_date between prt.effective_start_date
2778: and prt.effective_end_date
2779: and ((p_rt_bg is not null
3092: -- Get the run_type_id
3093: --
3094: select prt.run_type_id
3095: into l_in_rt_id
3096: from pay_run_types_f prt
3097: where UPPER(prt.run_type_name) = p_rt_name
3098: and p_effective_start_date between prt.effective_start_date
3099: and prt.effective_end_date
3100: and ((p_rt_bg_name is not null
3245: ,p_rt_name varchar2)
3246: is
3247: select prt.run_type_name
3248: , prt.run_method
3249: from pay_run_types_f prt
3250: , pay_run_type_usages_f rtu
3251: where prt.run_method = 'C'
3252: and nvl(prt.legislation_code, 'NULL') = nvl(p_leg_code, 'NULL')
3253: and nvl(prt.business_group_id, -1) = nvl(p_bg, -1)
3254: and prt.run_type_name = p_rt_name
3255: and prt.run_type_id = rtu.child_run_type_id;
3256: --
3257: l_bg per_business_groups.business_group_id%type;
3258: l_rt_name pay_run_types_f.run_type_name%type;
3259: l_rt_method pay_run_types_f.run_method%type;
3260: l_meth_order varchar2(2);
3261: --
3262: begin
3255: and prt.run_type_id = rtu.child_run_type_id;
3256: --
3257: l_bg per_business_groups.business_group_id%type;
3258: l_rt_name pay_run_types_f.run_type_name%type;
3259: l_rt_method pay_run_types_f.run_method%type;
3260: l_meth_order varchar2(2);
3261: --
3262: begin
3263: hr_utility.set_location('Entering: pay_iterate.order_cumulative',5);