143: function table_contents return varchar2 is
144: l_appls varchar2(4000); -- Bug 3214063
145: l_max number;
146: BEGIN
147: hr_utility.set_location('IN hrhirapl.table_contents',490);
148: l_max := p_table.COUNT;
149: hr_utility.trace('table rows : '||to_char(l_max));
150: for v_index in 1..l_max loop
151:
145: l_max number;
146: BEGIN
147: hr_utility.set_location('IN hrhirapl.table_contents',490);
148: l_max := p_table.COUNT;
149: hr_utility.trace('table rows : '||to_char(l_max));
150: for v_index in 1..l_max loop
151:
152: l_appls := l_appls||' ('||to_char(p_table(v_index).id)||')'
153: ||p_table(v_index).process_flag;
152: l_appls := l_appls||' ('||to_char(p_table(v_index).id)||')'
153: ||p_table(v_index).process_flag;
154:
155: END LOOP;
156: hr_utility.set_location('OUT hrhirapl.table_contents',495);
157: return(l_appls);
158: END;
159: --
160: --
177: -- END WWBUG fix for 1390173
178: --
179: --
180: begin
181: hr_utility.set_location('hr_person.get_period_of_service',1);
182: --
183: if p_emp_apl ='Y' then
184: begin
185: select pps.period_of_service_id
193: return v_dummy;
194: --
195: exception
196: when no_data_found then
197: hr_utility.set_message(801,'HR_6346_EMP_ASS_NO_POS');
198: hr_utility.raise_error;
199: when others then
200: null;
201: end;
194: --
195: exception
196: when no_data_found then
197: hr_utility.set_message(801,'HR_6346_EMP_ASS_NO_POS');
198: hr_utility.raise_error;
199: when others then
200: null;
201: end;
202: else
199: when others then
200: null;
201: end;
202: else
203: hr_utility.set_location('hr_person.get_period_of_service',2);
204: begin
205: select per_periods_of_service_s.nextval
206: into v_dummy
207: from sys.dual;
206: into v_dummy
207: from sys.dual;
208: exception
209: when no_data_found then
210: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
211: hr_utility.set_message_token('PROCEDURE','get_period_of_service');
212: hr_utility.set_message_token('STEP',1);
213: hr_utility.raise_error;
214: when others then null;
207: from sys.dual;
208: exception
209: when no_data_found then
210: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
211: hr_utility.set_message_token('PROCEDURE','get_period_of_service');
212: hr_utility.set_message_token('STEP',1);
213: hr_utility.raise_error;
214: when others then null;
215: end;
208: exception
209: when no_data_found then
210: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
211: hr_utility.set_message_token('PROCEDURE','get_period_of_service');
212: hr_utility.set_message_token('STEP',1);
213: hr_utility.raise_error;
214: when others then null;
215: end;
216: --
209: when no_data_found then
210: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
211: hr_utility.set_message_token('PROCEDURE','get_period_of_service');
212: hr_utility.set_message_token('STEP',1);
213: hr_utility.raise_error;
214: when others then null;
215: end;
216: --
217: hr_utility.set_location('hr_person.get_period_of_service',3);
213: hr_utility.raise_error;
214: when others then null;
215: end;
216: --
217: hr_utility.set_location('hr_person.get_period_of_service',3);
218: begin
219: insert into per_periods_of_service
220: (period_of_service_id
221: ,business_group_id
242: --
243: -- Bug No 4457579 Moved this check above call to ben_pps_ler.ler_chk
244: --
245: if SQL%ROWCOUNT < 1 then
246: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
247: hr_utility.set_message_token('PROCEDURE','get_period_of_service');
248: hr_utility.set_message_token('STEP',2);
249: hr_utility.raise_error;
250: end if;
243: -- Bug No 4457579 Moved this check above call to ben_pps_ler.ler_chk
244: --
245: if SQL%ROWCOUNT < 1 then
246: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
247: hr_utility.set_message_token('PROCEDURE','get_period_of_service');
248: hr_utility.set_message_token('STEP',2);
249: hr_utility.raise_error;
250: end if;
251: hr_utility.set_location('hr_person.get_period_of_service',4);
244: --
245: if SQL%ROWCOUNT < 1 then
246: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
247: hr_utility.set_message_token('PROCEDURE','get_period_of_service');
248: hr_utility.set_message_token('STEP',2);
249: hr_utility.raise_error;
250: end if;
251: hr_utility.set_location('hr_person.get_period_of_service',4);
252: --
245: if SQL%ROWCOUNT < 1 then
246: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
247: hr_utility.set_message_token('PROCEDURE','get_period_of_service');
248: hr_utility.set_message_token('STEP',2);
249: hr_utility.raise_error;
250: end if;
251: hr_utility.set_location('hr_person.get_period_of_service',4);
252: --
253: -- START WWBUG fix for 1390173
247: hr_utility.set_message_token('PROCEDURE','get_period_of_service');
248: hr_utility.set_message_token('STEP',2);
249: hr_utility.raise_error;
250: end if;
251: hr_utility.set_location('hr_person.get_period_of_service',4);
252: --
253: -- START WWBUG fix for 1390173
254: --
255: l_new.PERSON_ID := p_person_id;
293: --
294: --
295: begin
296: --
297: hr_utility.set_location('hr_person.update_primary_assignment',1);
298: --
299: insert into per_assignments_f
300: (assignment_id
301: ,effective_start_date
506: -- effective start date of the current assignment.(#1981550)
507: --
508: --
509: --if SQL%ROWCOUNT < 1 THEN
510: -- hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
511: -- hr_utility.set_message_token('PROCEDURE','update_primary_assignment');
512: -- hr_utility.set_message_token('STEP','1');
513: -- hr_utility.raise_error;
514: --end if;
507: --
508: --
509: --if SQL%ROWCOUNT < 1 THEN
510: -- hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
511: -- hr_utility.set_message_token('PROCEDURE','update_primary_assignment');
512: -- hr_utility.set_message_token('STEP','1');
513: -- hr_utility.raise_error;
514: --end if;
515: --
508: --
509: --if SQL%ROWCOUNT < 1 THEN
510: -- hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
511: -- hr_utility.set_message_token('PROCEDURE','update_primary_assignment');
512: -- hr_utility.set_message_token('STEP','1');
513: -- hr_utility.raise_error;
514: --end if;
515: --
516: end update_primary_assignment;
509: --if SQL%ROWCOUNT < 1 THEN
510: -- hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
511: -- hr_utility.set_message_token('PROCEDURE','update_primary_assignment');
512: -- hr_utility.set_message_token('STEP','1');
513: -- hr_utility.raise_error;
514: --end if;
515: --
516: end update_primary_assignment;
517: -- +-----------------------------------------------------------------------+
727: begin
728: -- # 2366672
729: -- Application needs to be end dated before the apl asg get updated.
730: --
731: hr_utility.set_location('hrhirapl.make_secondary',1);
732: -- +-----------------------------------------------------------------------+
733: -- +------------------------ End Application -----------------------------+
734: -- +-----------------------------------------------------------------------+
735: -- Does the Retain value exist in the table ?
738: -- we are "double-checking" that previous updates were successfull
739: -- that is why where clause checks for accepted and unaccepted, despite
740: -- the fact the table does not have stored a retain value .
741: --
742: hr_utility.set_location('hrhiapl.make_secondary',2);
743: --
744: update per_applications pap
745: set date_end = p_start_date -1,
746: successful_flag = 'Y'
776: and pa.effective_end_date);
777:
778: if SQL%NOTFOUND then
779: -- could not update the application
780: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
781: hr_utility.set_message_token('PROCEDURE','make_secondary ');
782: hr_utility.set_message_token('STEP','5');
783: hr_utility.raise_error;
784: end if;
777:
778: if SQL%NOTFOUND then
779: -- could not update the application
780: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
781: hr_utility.set_message_token('PROCEDURE','make_secondary ');
782: hr_utility.set_message_token('STEP','5');
783: hr_utility.raise_error;
784: end if;
785: end if; -- retain value in table?
778: if SQL%NOTFOUND then
779: -- could not update the application
780: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
781: hr_utility.set_message_token('PROCEDURE','make_secondary ');
782: hr_utility.set_message_token('STEP','5');
783: hr_utility.raise_error;
784: end if;
785: end if; -- retain value in table?
786: --
779: -- could not update the application
780: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
781: hr_utility.set_message_token('PROCEDURE','make_secondary ');
782: hr_utility.set_message_token('STEP','5');
783: hr_utility.raise_error;
784: end if;
785: end if; -- retain value in table?
786: --
787:
788: open get_flex_def;
789: fetch get_flex_def into l_col_name;
790: close get_flex_def;
791: --
792: hr_utility.set_location('hrhirapl.make_secondary',2);
793: --
794: -- Update all accepted assignments making them all
795: -- secondary (also end dates the assignment type 'A'
796: -- Unless the update primary_flag is set, in which case
796: -- Unless the update primary_flag is set, in which case
797: -- update all save the chosen assignment.
798: --
799: /* fix for the bug 5498344
800: hr_utility.set_location('p_update_primary_flag '||p_update_primary_flag,2);
801: if p_update_primary_flag not in ('C','N') then commented for bug 5589928*/
802:
803: open ass_cur;
804: loop
812: -- Ensure (R)etain or (E)nd date flags have not been set
813: if hr_employee_applicant_api.is_convert(p_table
814: ,l_asg_rec.assignment_id)
815: then
816: hr_utility.set_location('hrhirapl.make_secondary',333);
817: hr_utility.trace(' asg id = '||to_char(l_asg_rec.assignment_id));
818: hr_utility.trace(' start date = '||to_char(l_asg_rec.effective_start_date,'dd/mm/yy'));
819:
820: -- +--------------------------------------------------+
813: if hr_employee_applicant_api.is_convert(p_table
814: ,l_asg_rec.assignment_id)
815: then
816: hr_utility.set_location('hrhirapl.make_secondary',333);
817: hr_utility.trace(' asg id = '||to_char(l_asg_rec.assignment_id));
818: hr_utility.trace(' start date = '||to_char(l_asg_rec.effective_start_date,'dd/mm/yy'));
819:
820: -- +--------------------------------------------------+
821: -- +--- End Date assignment type 'A' -----------------+
814: ,l_asg_rec.assignment_id)
815: then
816: hr_utility.set_location('hrhirapl.make_secondary',333);
817: hr_utility.trace(' asg id = '||to_char(l_asg_rec.assignment_id));
818: hr_utility.trace(' start date = '||to_char(l_asg_rec.effective_start_date,'dd/mm/yy'));
819:
820: -- +--------------------------------------------------+
821: -- +--- End Date assignment type 'A' -----------------+
822: -- +--------------------------------------------------+
1010: ,l_asg_rec.job_post_source_name -- added for 4486233
1011: ,l_asg_rec.supervisor_assignment_id); ---#4053244
1012: exception
1013: when others then
1014: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1015: hr_utility.set_message_token('PROCEDURE','make_secondary => ASGID: '
1016: ||to_char(l_asg_rec.assignment_id));
1017: hr_utility.set_message_token('STEP','2');
1018: hr_utility.raise_error;
1011: ,l_asg_rec.supervisor_assignment_id); ---#4053244
1012: exception
1013: when others then
1014: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1015: hr_utility.set_message_token('PROCEDURE','make_secondary => ASGID: '
1016: ||to_char(l_asg_rec.assignment_id));
1017: hr_utility.set_message_token('STEP','2');
1018: hr_utility.raise_error;
1019:
1013: when others then
1014: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1015: hr_utility.set_message_token('PROCEDURE','make_secondary => ASGID: '
1016: ||to_char(l_asg_rec.assignment_id));
1017: hr_utility.set_message_token('STEP','2');
1018: hr_utility.raise_error;
1019:
1020: end;
1021: -- +----------- END end date of assignment -----------+
1014: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1015: hr_utility.set_message_token('PROCEDURE','make_secondary => ASGID: '
1016: ||to_char(l_asg_rec.assignment_id));
1017: hr_utility.set_message_token('STEP','2');
1018: hr_utility.raise_error;
1019:
1020: end;
1021: -- +----------- END end date of assignment -----------+
1022: -- +--------------------------------------------------+
1187: ,p_employee_number
1188: ,p_assignment_sequence
1189: ,p_assignment_number);
1190: --
1191: hr_utility.set_location('hrhirapl.make_secondary',3);
1192: --
1193: -- fix for 7120387
1194: declare
1195:
1209: open appl_rec_det(l_asg_rec.application_id) ;
1210: fetch appl_rec_det into l_proj_hire_date;
1211: close appl_rec_det;
1212:
1213: hr_utility.set_location('l_asg_rec .assignment_id :'||l_asg_rec.assignment_id,20);
1214: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,20);
1215: hr_utility.set_location('make secondary proj end details ',20);
1216: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,20);
1217:
1210: fetch appl_rec_det into l_proj_hire_date;
1211: close appl_rec_det;
1212:
1213: hr_utility.set_location('l_asg_rec .assignment_id :'||l_asg_rec.assignment_id,20);
1214: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,20);
1215: hr_utility.set_location('make secondary proj end details ',20);
1216: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,20);
1217:
1218: if l_proj_hire_date is null then
1211: close appl_rec_det;
1212:
1213: hr_utility.set_location('l_asg_rec .assignment_id :'||l_asg_rec.assignment_id,20);
1214: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,20);
1215: hr_utility.set_location('make secondary proj end details ',20);
1216: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,20);
1217:
1218: if l_proj_hire_date is null then
1219:
1212:
1213: hr_utility.set_location('l_asg_rec .assignment_id :'||l_asg_rec.assignment_id,20);
1214: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,20);
1215: hr_utility.set_location('make secondary proj end details ',20);
1216: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,20);
1217:
1218: if l_proj_hire_date is null then
1219:
1220: if ( l_asg_rec.probation_period is not null)
1221: and
1222: (l_asg_rec.probation_unit is not null ) then
1223:
1224:
1225: hr_utility.set_location('p_start_date :'||p_start_date,11);
1226: hr_utility.set_location('l_asg_rec.assignment_id :'||l_asg_rec.assignment_id,11);
1227: hr_utility.set_location('l_asg_probation_det.probation_period :'||l_asg_rec.probation_period,12);
1228: hr_utility.set_location('l_asg_probation_det.probation_unit :'||l_asg_rec.probation_unit,15);
1229: l_date_probation_end :=NULL;
1222: (l_asg_rec.probation_unit is not null ) then
1223:
1224:
1225: hr_utility.set_location('p_start_date :'||p_start_date,11);
1226: hr_utility.set_location('l_asg_rec.assignment_id :'||l_asg_rec.assignment_id,11);
1227: hr_utility.set_location('l_asg_probation_det.probation_period :'||l_asg_rec.probation_period,12);
1228: hr_utility.set_location('l_asg_probation_det.probation_unit :'||l_asg_rec.probation_unit,15);
1229: l_date_probation_end :=NULL;
1230: hr_assignment.gen_probation_end
1223:
1224:
1225: hr_utility.set_location('p_start_date :'||p_start_date,11);
1226: hr_utility.set_location('l_asg_rec.assignment_id :'||l_asg_rec.assignment_id,11);
1227: hr_utility.set_location('l_asg_probation_det.probation_period :'||l_asg_rec.probation_period,12);
1228: hr_utility.set_location('l_asg_probation_det.probation_unit :'||l_asg_rec.probation_unit,15);
1229: l_date_probation_end :=NULL;
1230: hr_assignment.gen_probation_end
1231: (p_assignment_id => l_asg_rec.assignment_id
1224:
1225: hr_utility.set_location('p_start_date :'||p_start_date,11);
1226: hr_utility.set_location('l_asg_rec.assignment_id :'||l_asg_rec.assignment_id,11);
1227: hr_utility.set_location('l_asg_probation_det.probation_period :'||l_asg_rec.probation_period,12);
1228: hr_utility.set_location('l_asg_probation_det.probation_unit :'||l_asg_rec.probation_unit,15);
1229: l_date_probation_end :=NULL;
1230: hr_assignment.gen_probation_end
1231: (p_assignment_id => l_asg_rec.assignment_id
1232: ,p_probation_period => l_asg_rec.probation_period
1233: ,p_probation_unit => l_asg_rec.probation_unit
1234: ,p_start_date => p_start_date
1235: ,p_date_probation_end => l_date_probation_end
1236: );
1237: hr_utility.set_location('l_date_probation_end :'||l_date_probation_end,10);
1238: l_asg_rec.date_probation_end :=l_date_probation_end;
1239: end if;
1240: end if; -- proj hire end
1241:
1291: , pa.date_probation_end =l_asg_rec.date_probation_end --7120387
1292: where current of ass_cur; -- pa.rowid = p_rowid;
1293: exception
1294: when others then
1295: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1296: hr_utility.set_message_token('PROCEDURE','make_secondary => ASGID: '
1297: ||to_char(l_asg_rec.assignment_id));
1298: hr_utility.set_message_token('STEP','3');
1299: hr_utility.raise_error;
1292: where current of ass_cur; -- pa.rowid = p_rowid;
1293: exception
1294: when others then
1295: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1296: hr_utility.set_message_token('PROCEDURE','make_secondary => ASGID: '
1297: ||to_char(l_asg_rec.assignment_id));
1298: hr_utility.set_message_token('STEP','3');
1299: hr_utility.raise_error;
1300:
1294: when others then
1295: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1296: hr_utility.set_message_token('PROCEDURE','make_secondary => ASGID: '
1297: ||to_char(l_asg_rec.assignment_id));
1298: hr_utility.set_message_token('STEP','3');
1299: hr_utility.raise_error;
1300:
1301: end;
1302: --Start of fix 12812436
1295: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1296: hr_utility.set_message_token('PROCEDURE','make_secondary => ASGID: '
1297: ||to_char(l_asg_rec.assignment_id));
1298: hr_utility.set_message_token('STEP','3');
1299: hr_utility.raise_error;
1300:
1301: end;
1302: --Start of fix 12812436
1303: hr_security_internal.add_to_person_list(
1315: from PER_VAC_LINKED_ASSIGNMENTS
1316: where tgt_apl_asg_id = p_assignment_id
1317: and sysdate between nvl(start_date,sysdate) and nvl(end_date,sysdate) ;
1318:
1319: hr_utility.set_location('p_assignment_id :'||p_assignment_id,10);
1320: hr_utility.set_location('l_irc_link_exists :'||l_irc_link_exists,10);
1321:
1322:
1323: if l_irc_link_exists <> -1 then
1316: where tgt_apl_asg_id = p_assignment_id
1317: and sysdate between nvl(start_date,sysdate) and nvl(end_date,sysdate) ;
1318:
1319: hr_utility.set_location('p_assignment_id :'||p_assignment_id,10);
1320: hr_utility.set_location('l_irc_link_exists :'||l_irc_link_exists,10);
1321:
1322:
1323: if l_irc_link_exists <> -1 then
1324:
1326: from per_assignment_status_types
1327: where PER_SYSTEM_STATUS= 'ACTIVE_ASG_IN_OTH_BG'
1328: and ACTIVE_FLAG ='Y' and DEFAULT_FLAG='Y';
1329:
1330: hr_utility.set_location('l_irc_spl_status :'||l_irc_spl_status,10);
1331:
1332: IRC_ASG_STATUS_API.create_irc_asg_status
1333: (p_assignment_id => p_assignment_id
1334: ,p_assignment_status_type_id => l_irc_spl_status
1384: if (p_legislation_code = 'GB' ) then
1385: PER_GB_PENSRV_SVPN.AUTO_CALC_FTE(P_ASSIGNMENT_ID => p_assignment_id,P_EFFECTIVE_START_DATE => p_session_date) ;
1386: end if;
1387:
1388: hr_utility.set_location('hrhirapl.make_secondary',4);
1389: --
1390: hr_assignment.load_budget_values(p_assignment_id
1391: ,p_business_group_id
1392: ,p_user_id
1418: -- +--------------------------------------------------+
1419: -- +--- End Date assignment --------------------------+
1420: -- +--------------------------------------------------+
1421: --
1422: hr_utility.set_location('hrhirapl.make_secondary',5);
1423: l_chk_assg_end_dated := 'Y'; -- bug 6310975
1424: begin
1425: update per_assignments_f
1426: set effective_end_date = p_start_date -1
1430: per_otherbg_apl_api.close_otherbg_applications(l_asg_rec.assignment_id,p_start_date -1,'HIRE_END');
1431: end if;
1432: exception
1433: when others then
1434: hr_utility.set_location('hrhirapl.make_secondary ASGID : '||
1435: to_char(l_asg_rec.assignment_id),66);
1436: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1437: hr_utility.set_message_token('PROCEDURE','make_secondary ');
1438: hr_utility.set_message_token('STEP','4');
1432: exception
1433: when others then
1434: hr_utility.set_location('hrhirapl.make_secondary ASGID : '||
1435: to_char(l_asg_rec.assignment_id),66);
1436: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1437: hr_utility.set_message_token('PROCEDURE','make_secondary ');
1438: hr_utility.set_message_token('STEP','4');
1439: hr_utility.raise_error;
1440: end;
1433: when others then
1434: hr_utility.set_location('hrhirapl.make_secondary ASGID : '||
1435: to_char(l_asg_rec.assignment_id),66);
1436: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1437: hr_utility.set_message_token('PROCEDURE','make_secondary ');
1438: hr_utility.set_message_token('STEP','4');
1439: hr_utility.raise_error;
1440: end;
1441: end if; -- convert flag is set.
1434: hr_utility.set_location('hrhirapl.make_secondary ASGID : '||
1435: to_char(l_asg_rec.assignment_id),66);
1436: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1437: hr_utility.set_message_token('PROCEDURE','make_secondary ');
1438: hr_utility.set_message_token('STEP','4');
1439: hr_utility.raise_error;
1440: end;
1441: end if; -- convert flag is set.
1442: --
1435: to_char(l_asg_rec.assignment_id),66);
1436: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1437: hr_utility.set_message_token('PROCEDURE','make_secondary ');
1438: hr_utility.set_message_token('STEP','4');
1439: hr_utility.raise_error;
1440: end;
1441: end if; -- convert flag is set.
1442: --
1443:
1466: */
1467: --
1468: --bug fix 6310975
1469:
1470: hr_utility.set_location('hrhirapl.make_secondary',500);
1471: IF l_chk_assg_end_dated <> 'Y' THEN
1472:
1473:
1474: OPEN get_pay_proposal(l_asg_rec.assignment_id);
1474: OPEN get_pay_proposal(l_asg_rec.assignment_id);
1475: FETCH get_pay_proposal INTO l_pay_pspl_id,l_pay_obj_number,l_proposed_sal_n, l_dummy_change_date;
1476: if get_pay_proposal%found then
1477: close get_pay_proposal;
1478: hr_utility.set_location('hrhirapl.make_secondary',501);
1479: hr_utility.set_location('hrhirapl.make_secondary '||l_asg_rec.assignment_id,502);
1480: hr_utility.set_location(' make_secondary.l_dummy_change_date '||l_dummy_change_date,502);
1481: hr_utility.set_location(' make_secondary.l_pay_pspl_id '||l_pay_pspl_id,502);
1482: hr_utility.set_location(' make_secondary.l_proposed_sal_n '|| l_proposed_sal_n,502);
1475: FETCH get_pay_proposal INTO l_pay_pspl_id,l_pay_obj_number,l_proposed_sal_n, l_dummy_change_date;
1476: if get_pay_proposal%found then
1477: close get_pay_proposal;
1478: hr_utility.set_location('hrhirapl.make_secondary',501);
1479: hr_utility.set_location('hrhirapl.make_secondary '||l_asg_rec.assignment_id,502);
1480: hr_utility.set_location(' make_secondary.l_dummy_change_date '||l_dummy_change_date,502);
1481: hr_utility.set_location(' make_secondary.l_pay_pspl_id '||l_pay_pspl_id,502);
1482: hr_utility.set_location(' make_secondary.l_proposed_sal_n '|| l_proposed_sal_n,502);
1483:
1476: if get_pay_proposal%found then
1477: close get_pay_proposal;
1478: hr_utility.set_location('hrhirapl.make_secondary',501);
1479: hr_utility.set_location('hrhirapl.make_secondary '||l_asg_rec.assignment_id,502);
1480: hr_utility.set_location(' make_secondary.l_dummy_change_date '||l_dummy_change_date,502);
1481: hr_utility.set_location(' make_secondary.l_pay_pspl_id '||l_pay_pspl_id,502);
1482: hr_utility.set_location(' make_secondary.l_proposed_sal_n '|| l_proposed_sal_n,502);
1483:
1484: -- fix for the bug 7636109 passing the value as null as requested by sal admin team.
1477: close get_pay_proposal;
1478: hr_utility.set_location('hrhirapl.make_secondary',501);
1479: hr_utility.set_location('hrhirapl.make_secondary '||l_asg_rec.assignment_id,502);
1480: hr_utility.set_location(' make_secondary.l_dummy_change_date '||l_dummy_change_date,502);
1481: hr_utility.set_location(' make_secondary.l_pay_pspl_id '||l_pay_pspl_id,502);
1482: hr_utility.set_location(' make_secondary.l_proposed_sal_n '|| l_proposed_sal_n,502);
1483:
1484: -- fix for the bug 7636109 passing the value as null as requested by sal admin team.
1485: l_pay_pspl_id:=null;
1478: hr_utility.set_location('hrhirapl.make_secondary',501);
1479: hr_utility.set_location('hrhirapl.make_secondary '||l_asg_rec.assignment_id,502);
1480: hr_utility.set_location(' make_secondary.l_dummy_change_date '||l_dummy_change_date,502);
1481: hr_utility.set_location(' make_secondary.l_pay_pspl_id '||l_pay_pspl_id,502);
1482: hr_utility.set_location(' make_secondary.l_proposed_sal_n '|| l_proposed_sal_n,502);
1483:
1484: -- fix for the bug 7636109 passing the value as null as requested by sal admin team.
1485: l_pay_pspl_id:=null;
1486: l_pay_obj_number:=null;
1509: OPEN get_pay_proposal(l_asg_rec.assignment_id);
1510: FETCH get_pay_proposal INTO l_pay_pspl_id,l_pay_obj_number,l_proposed_sal_n, l_dummy_change_date;
1511: if get_pay_proposal%found then
1512: close get_pay_proposal;
1513: hr_utility.set_location('hrhirapl.make_secondary',521);
1514: hr_utility.set_location('hrhirapl.make_secondary '||l_asg_rec.assignment_id,502);
1515:
1516: hr_maintain_proposal_api.cre_or_upd_salary_proposal(
1517: p_validate => false,
1510: FETCH get_pay_proposal INTO l_pay_pspl_id,l_pay_obj_number,l_proposed_sal_n, l_dummy_change_date;
1511: if get_pay_proposal%found then
1512: close get_pay_proposal;
1513: hr_utility.set_location('hrhirapl.make_secondary',521);
1514: hr_utility.set_location('hrhirapl.make_secondary '||l_asg_rec.assignment_id,502);
1515:
1516: hr_maintain_proposal_api.cre_or_upd_salary_proposal(
1517: p_validate => false,
1518: p_pay_proposal_id => l_pay_pspl_id ,
1525: p_approved_warning => l_approved_warning,
1526: p_payroll_warning => l_payroll_warning,
1527: p_proposed_salary_n => l_proposed_sal_n,
1528: p_business_group_id => p_business_group_id);
1529: hr_utility.set_location('hrhirapl.make_secondary',522);
1530: else
1531: close get_pay_proposal;
1532: end if;
1533:
1531: close get_pay_proposal;
1532: end if;
1533:
1534: end if;
1535: hr_utility.set_location('hrhirapl.make_secondary',524);
1536:
1537: --
1538: --bug fix 6310975
1539: --added by amigarg for bug 4882512 end
1545: /*else
1546: -- fix for the bug
1547: -- first process the primary assignment id so that the assignment number is
1548: -- correclty generated
1549: hr_utility.set_location('hrhirapl.make_secondary',400);
1550: open csr_ass_cur_for_primary;
1551: loop
1552: fetch csr_ass_cur_for_primary into l_asg_rec; --#2119831
1553: exit when csr_ass_cur_for_primary%NOTFOUND;
1559: -- Ensure (R)etain or (E)nd date flags have not been set
1560: if hr_employee_applicant_api.is_convert(p_table
1561: ,l_asg_rec.assignment_id)
1562: then
1563: hr_utility.set_location('hrhirapl.make_secondary',401);
1564: hr_utility.trace(' asg id = '||to_char(l_asg_rec.assignment_id));
1565: hr_utility.trace(' start date = '||to_char(l_asg_rec.effective_start_date,'dd/mm/yy'));
1566:
1567: -- +--------------------------------------------------+
1560: if hr_employee_applicant_api.is_convert(p_table
1561: ,l_asg_rec.assignment_id)
1562: then
1563: hr_utility.set_location('hrhirapl.make_secondary',401);
1564: hr_utility.trace(' asg id = '||to_char(l_asg_rec.assignment_id));
1565: hr_utility.trace(' start date = '||to_char(l_asg_rec.effective_start_date,'dd/mm/yy'));
1566:
1567: -- +--------------------------------------------------+
1568: -- +--- End Date assignment type 'A' -----------------+
1561: ,l_asg_rec.assignment_id)
1562: then
1563: hr_utility.set_location('hrhirapl.make_secondary',401);
1564: hr_utility.trace(' asg id = '||to_char(l_asg_rec.assignment_id));
1565: hr_utility.trace(' start date = '||to_char(l_asg_rec.effective_start_date,'dd/mm/yy'));
1566:
1567: -- +--------------------------------------------------+
1568: -- +--- End Date assignment type 'A' -----------------+
1569: -- +--------------------------------------------------+
1757: ,l_asg_rec.job_post_source_name -- added for 4486233
1758: ,l_asg_rec.supervisor_assignment_id); ---#4053244
1759: exception
1760: when others then
1761: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1762: hr_utility.set_message_token('PROCEDURE','make_secondary => ASGID: '
1763: ||to_char(l_asg_rec.assignment_id));
1764: hr_utility.set_message_token('STEP','2');
1765: hr_utility.raise_error;
1758: ,l_asg_rec.supervisor_assignment_id); ---#4053244
1759: exception
1760: when others then
1761: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1762: hr_utility.set_message_token('PROCEDURE','make_secondary => ASGID: '
1763: ||to_char(l_asg_rec.assignment_id));
1764: hr_utility.set_message_token('STEP','2');
1765: hr_utility.raise_error;
1766:
1760: when others then
1761: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1762: hr_utility.set_message_token('PROCEDURE','make_secondary => ASGID: '
1763: ||to_char(l_asg_rec.assignment_id));
1764: hr_utility.set_message_token('STEP','2');
1765: hr_utility.raise_error;
1766:
1767: end;
1768: -- +----------- END end date of assignment -----------+
1761: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1762: hr_utility.set_message_token('PROCEDURE','make_secondary => ASGID: '
1763: ||to_char(l_asg_rec.assignment_id));
1764: hr_utility.set_message_token('STEP','2');
1765: hr_utility.raise_error;
1766:
1767: end;
1768: -- +----------- END end date of assignment -----------+
1769: -- +--------------------------------------------------+
1933: ,p_employee_number
1934: ,p_assignment_sequence
1935: ,p_assignment_number);
1936: --
1937: hr_utility.set_location('hrhirapl.make_secondary',402);
1938: begin
1939: update per_assignments_f pa
1940: set pa.assignment_status_type_id = p_assignment_status_type_id
1941: , pa.assignment_type = 'E'
1983: , pa.ass_attribute30 = l_ass_attribute30
1984: where current of csr_ass_cur_for_primary; -- pa.rowid = p_rowid;
1985: exception
1986: when others then
1987: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1988: hr_utility.set_message_token('PROCEDURE','make_secondary => ASGID: '
1989: ||to_char(l_asg_rec.assignment_id));
1990: hr_utility.set_message_token('STEP','3');
1991: hr_utility.raise_error;
1984: where current of csr_ass_cur_for_primary; -- pa.rowid = p_rowid;
1985: exception
1986: when others then
1987: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1988: hr_utility.set_message_token('PROCEDURE','make_secondary => ASGID: '
1989: ||to_char(l_asg_rec.assignment_id));
1990: hr_utility.set_message_token('STEP','3');
1991: hr_utility.raise_error;
1992:
1986: when others then
1987: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1988: hr_utility.set_message_token('PROCEDURE','make_secondary => ASGID: '
1989: ||to_char(l_asg_rec.assignment_id));
1990: hr_utility.set_message_token('STEP','3');
1991: hr_utility.raise_error;
1992:
1993: end;
1994: -- Start of fix 3564129
1987: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
1988: hr_utility.set_message_token('PROCEDURE','make_secondary => ASGID: '
1989: ||to_char(l_asg_rec.assignment_id));
1990: hr_utility.set_message_token('STEP','3');
1991: hr_utility.raise_error;
1992:
1993: end;
1994: -- Start of fix 3564129
1995: if l_asg_rec.vacancy_id is not null then --fix for bug8488222
2002: end if;
2003: -- End of fix 3564129
2004: -- Bug 401669
2005: --
2006: hr_utility.set_location('hrhirapl.make_secondary',4);
2007: --
2008: hr_assignment.load_budget_values(p_assignment_id
2009: ,p_business_group_id
2010: ,p_user_id
2035: -- +--------------------------------------------------+
2036: -- +--- End Date assignment --------------------------+
2037: -- +--------------------------------------------------+
2038: --
2039: hr_utility.set_location('hrhirapl.make_secondary',5);
2040: begin
2041: update per_assignments_f
2042: set effective_end_date = p_start_date -1
2043: where current of csr_ass_cur_for_primary;
2042: set effective_end_date = p_start_date -1
2043: where current of csr_ass_cur_for_primary;
2044: exception
2045: when others then
2046: hr_utility.set_location('hrhirapl.make_secondary ASGID : '||
2047: to_char(l_asg_rec.assignment_id),66);
2048: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2049: hr_utility.set_message_token('PROCEDURE','make_secondary ');
2050: hr_utility.set_message_token('STEP','4');
2044: exception
2045: when others then
2046: hr_utility.set_location('hrhirapl.make_secondary ASGID : '||
2047: to_char(l_asg_rec.assignment_id),66);
2048: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2049: hr_utility.set_message_token('PROCEDURE','make_secondary ');
2050: hr_utility.set_message_token('STEP','4');
2051: hr_utility.raise_error;
2052: end;
2045: when others then
2046: hr_utility.set_location('hrhirapl.make_secondary ASGID : '||
2047: to_char(l_asg_rec.assignment_id),66);
2048: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2049: hr_utility.set_message_token('PROCEDURE','make_secondary ');
2050: hr_utility.set_message_token('STEP','4');
2051: hr_utility.raise_error;
2052: end;
2053: end if; -- convert flag is set.
2046: hr_utility.set_location('hrhirapl.make_secondary ASGID : '||
2047: to_char(l_asg_rec.assignment_id),66);
2048: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2049: hr_utility.set_message_token('PROCEDURE','make_secondary ');
2050: hr_utility.set_message_token('STEP','4');
2051: hr_utility.raise_error;
2052: end;
2053: end if; -- convert flag is set.
2054: --
2047: to_char(l_asg_rec.assignment_id),66);
2048: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2049: hr_utility.set_message_token('PROCEDURE','make_secondary ');
2050: hr_utility.set_message_token('STEP','4');
2051: hr_utility.raise_error;
2052: end;
2053: end if; -- convert flag is set.
2054: --
2055:
2084:
2085: -- now process all seconday or non primary assignments
2086:
2087:
2088: hr_utility.set_location('hrhirapl.make_secondary',403);
2089: open csr_ass_cur_for_nonprimary;
2090: loop
2091: fetch csr_ass_cur_for_nonprimary into l_asg_rec; --#2119831
2092: exit when csr_ass_cur_for_nonprimary%NOTFOUND;
2098: -- Ensure (R)etain or (E)nd date flags have not been set
2099: if hr_employee_applicant_api.is_convert(p_table
2100: ,l_asg_rec.assignment_id)
2101: then
2102: hr_utility.set_location('hrhirapl.make_secondary',404);
2103: hr_utility.trace(' asg id = '||to_char(l_asg_rec.assignment_id));
2104: hr_utility.trace(' start date = '||to_char(l_asg_rec.effective_start_date,'dd/mm/yy'));
2105:
2106: -- +--------------------------------------------------+
2099: if hr_employee_applicant_api.is_convert(p_table
2100: ,l_asg_rec.assignment_id)
2101: then
2102: hr_utility.set_location('hrhirapl.make_secondary',404);
2103: hr_utility.trace(' asg id = '||to_char(l_asg_rec.assignment_id));
2104: hr_utility.trace(' start date = '||to_char(l_asg_rec.effective_start_date,'dd/mm/yy'));
2105:
2106: -- +--------------------------------------------------+
2107: -- +--- End Date assignment type 'A' -----------------+
2100: ,l_asg_rec.assignment_id)
2101: then
2102: hr_utility.set_location('hrhirapl.make_secondary',404);
2103: hr_utility.trace(' asg id = '||to_char(l_asg_rec.assignment_id));
2104: hr_utility.trace(' start date = '||to_char(l_asg_rec.effective_start_date,'dd/mm/yy'));
2105:
2106: -- +--------------------------------------------------+
2107: -- +--- End Date assignment type 'A' -----------------+
2108: -- +--------------------------------------------------+
2296: ,l_asg_rec.job_post_source_name -- added for 4486233
2297: ,l_asg_rec.supervisor_assignment_id); ---#4053244
2298: exception
2299: when others then
2300: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2301: hr_utility.set_message_token('PROCEDURE','make_secondary => ASGID: '
2302: ||to_char(l_asg_rec.assignment_id));
2303: hr_utility.set_message_token('STEP','2');
2304: hr_utility.raise_error;
2297: ,l_asg_rec.supervisor_assignment_id); ---#4053244
2298: exception
2299: when others then
2300: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2301: hr_utility.set_message_token('PROCEDURE','make_secondary => ASGID: '
2302: ||to_char(l_asg_rec.assignment_id));
2303: hr_utility.set_message_token('STEP','2');
2304: hr_utility.raise_error;
2305:
2299: when others then
2300: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2301: hr_utility.set_message_token('PROCEDURE','make_secondary => ASGID: '
2302: ||to_char(l_asg_rec.assignment_id));
2303: hr_utility.set_message_token('STEP','2');
2304: hr_utility.raise_error;
2305:
2306: end;
2307: -- +----------- END end date of assignment -----------+
2300: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2301: hr_utility.set_message_token('PROCEDURE','make_secondary => ASGID: '
2302: ||to_char(l_asg_rec.assignment_id));
2303: hr_utility.set_message_token('STEP','2');
2304: hr_utility.raise_error;
2305:
2306: end;
2307: -- +----------- END end date of assignment -----------+
2308: -- +--------------------------------------------------+
2472: ,p_employee_number
2473: ,p_assignment_sequence
2474: ,p_assignment_number);
2475: --
2476: hr_utility.set_location('hrhirapl.make_secondary',405);
2477: begin
2478: update per_assignments_f pa
2479: set pa.assignment_status_type_id = p_assignment_status_type_id
2480: , pa.assignment_type = 'E'
2522: , pa.ass_attribute30 = l_ass_attribute30
2523: where current of csr_ass_cur_for_nonprimary; -- pa.rowid = p_rowid;
2524: exception
2525: when others then
2526: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2527: hr_utility.set_message_token('PROCEDURE','make_secondary => ASGID: '
2528: ||to_char(l_asg_rec.assignment_id));
2529: hr_utility.set_message_token('STEP','3');
2530: hr_utility.raise_error;
2523: where current of csr_ass_cur_for_nonprimary; -- pa.rowid = p_rowid;
2524: exception
2525: when others then
2526: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2527: hr_utility.set_message_token('PROCEDURE','make_secondary => ASGID: '
2528: ||to_char(l_asg_rec.assignment_id));
2529: hr_utility.set_message_token('STEP','3');
2530: hr_utility.raise_error;
2531:
2525: when others then
2526: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2527: hr_utility.set_message_token('PROCEDURE','make_secondary => ASGID: '
2528: ||to_char(l_asg_rec.assignment_id));
2529: hr_utility.set_message_token('STEP','3');
2530: hr_utility.raise_error;
2531:
2532: end;
2533: -- Start of fix 3564129
2526: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2527: hr_utility.set_message_token('PROCEDURE','make_secondary => ASGID: '
2528: ||to_char(l_asg_rec.assignment_id));
2529: hr_utility.set_message_token('STEP','3');
2530: hr_utility.raise_error;
2531:
2532: end;
2533: -- Start of fix 3564129
2534: IRC_ASG_STATUS_API.create_irc_asg_status
2539: ,p_object_version_number => l_asg_status_ovn);
2540: -- End of fix 3564129
2541: -- Bug 401669
2542: --
2543: hr_utility.set_location('hrhirapl.make_secondary',406);
2544: --
2545: hr_assignment.load_budget_values(p_assignment_id
2546: ,p_business_group_id
2547: ,p_user_id
2572: -- +--------------------------------------------------+
2573: -- +--- End Date assignment --------------------------+
2574: -- +--------------------------------------------------+
2575: --
2576: hr_utility.set_location('hrhirapl.make_secondary',407);
2577: begin
2578: update per_assignments_f
2579: set effective_end_date = p_start_date -1
2580: where current of csr_ass_cur_for_nonprimary;
2579: set effective_end_date = p_start_date -1
2580: where current of csr_ass_cur_for_nonprimary;
2581: exception
2582: when others then
2583: hr_utility.set_location('hrhirapl.make_secondary ASGID : '||
2584: to_char(l_asg_rec.assignment_id),408);
2585: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2586: hr_utility.set_message_token('PROCEDURE','make_secondary ');
2587: hr_utility.set_message_token('STEP','4');
2581: exception
2582: when others then
2583: hr_utility.set_location('hrhirapl.make_secondary ASGID : '||
2584: to_char(l_asg_rec.assignment_id),408);
2585: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2586: hr_utility.set_message_token('PROCEDURE','make_secondary ');
2587: hr_utility.set_message_token('STEP','4');
2588: hr_utility.raise_error;
2589: end;
2582: when others then
2583: hr_utility.set_location('hrhirapl.make_secondary ASGID : '||
2584: to_char(l_asg_rec.assignment_id),408);
2585: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2586: hr_utility.set_message_token('PROCEDURE','make_secondary ');
2587: hr_utility.set_message_token('STEP','4');
2588: hr_utility.raise_error;
2589: end;
2590: end if; -- convert flag is set.
2583: hr_utility.set_location('hrhirapl.make_secondary ASGID : '||
2584: to_char(l_asg_rec.assignment_id),408);
2585: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2586: hr_utility.set_message_token('PROCEDURE','make_secondary ');
2587: hr_utility.set_message_token('STEP','4');
2588: hr_utility.raise_error;
2589: end;
2590: end if; -- convert flag is set.
2591: --
2584: to_char(l_asg_rec.assignment_id),408);
2585: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2586: hr_utility.set_message_token('PROCEDURE','make_secondary ');
2587: hr_utility.set_message_token('STEP','4');
2588: hr_utility.raise_error;
2589: end;
2590: end if; -- convert flag is set.
2591: --
2592:
2617:
2618: end loop;
2619: --
2620: close csr_ass_cur_for_nonprimary;
2621: hr_utility.set_location('hrhirapl.make_secondary',409);
2622: end if;
2623: hr_utility.set_location('hrhirapl.make_secondary',410);
2624: -- end of bug 5498344
2625: commented for bug 5589928*/
2619: --
2620: close csr_ass_cur_for_nonprimary;
2621: hr_utility.set_location('hrhirapl.make_secondary',409);
2622: end if;
2623: hr_utility.set_location('hrhirapl.make_secondary',410);
2624: -- end of bug 5498344
2625: commented for bug 5589928*/
2626: --
2627: -- add condition: number of updates should be the same as number
2627: -- add condition: number of updates should be the same as number
2628: -- of inserts
2629: /*
2630: if ass_cur%ROWCOUNT > v_count then
2631: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2632: hr_utility.set_message_token('PROCEDURE','make_secondary');
2633: hr_utility.set_message_token('STEP','2');
2634: hr_utility.raise_error;
2635: end if;
2628: -- of inserts
2629: /*
2630: if ass_cur%ROWCOUNT > v_count then
2631: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2632: hr_utility.set_message_token('PROCEDURE','make_secondary');
2633: hr_utility.set_message_token('STEP','2');
2634: hr_utility.raise_error;
2635: end if;
2636: */
2629: /*
2630: if ass_cur%ROWCOUNT > v_count then
2631: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2632: hr_utility.set_message_token('PROCEDURE','make_secondary');
2633: hr_utility.set_message_token('STEP','2');
2634: hr_utility.raise_error;
2635: end if;
2636: */
2637: --
2630: if ass_cur%ROWCOUNT > v_count then
2631: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2632: hr_utility.set_message_token('PROCEDURE','make_secondary');
2633: hr_utility.set_message_token('STEP','2');
2634: hr_utility.raise_error;
2635: end if;
2636: */
2637: --
2638: --
2663: l_asg_start_date date;
2664: l_asg_end_date date;
2665:
2666: begin
2667: hr_utility.set_location('IN Verify future assignments',901);
2668: open fut_asg;
2669: loop
2670: fetch fut_asg into l_rowid, l_future_asg_id,l_asg_start_date, l_asg_end_date
2671: ;
2694: close fut_asg;
2695: --
2696: -- Show any errors raised by previous routines
2697: --
2698: hr_utility.raise_error;
2699: end;
2700: end loop;
2701: close fut_asg;
2702: hr_utility.set_location('OUT Verify future assignments',903);
2698: hr_utility.raise_error;
2699: end;
2700: end loop;
2701: close fut_asg;
2702: hr_utility.set_location('OUT Verify future assignments',903);
2703: end Verify_future_assignments;
2704: --
2705: --
2706: -- +-----------------------------------------------------------------------+
2909: l_asg_start_date date;
2910: l_asg_end_date date;
2911:
2912: begin
2913: hr_utility.set_location('IN Delete future assignments',201);
2914: open fut_asg;
2915: loop
2916: fetch fut_asg into l_rowid, l_future_asg_id,l_asg_start_date, l_asg_end_date
2917: ;
2924:
2925: exception
2926: when others then
2927: close fut_asg;
2928: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2929: hr_utility.set_message_token('PROCEDURE','Delete_future_assignments');
2930: hr_utility.set_message_token('STEP','911');
2931: hr_utility.raise_error;
2932: end;
2925: exception
2926: when others then
2927: close fut_asg;
2928: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2929: hr_utility.set_message_token('PROCEDURE','Delete_future_assignments');
2930: hr_utility.set_message_token('STEP','911');
2931: hr_utility.raise_error;
2932: end;
2933: end loop;
2926: when others then
2927: close fut_asg;
2928: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2929: hr_utility.set_message_token('PROCEDURE','Delete_future_assignments');
2930: hr_utility.set_message_token('STEP','911');
2931: hr_utility.raise_error;
2932: end;
2933: end loop;
2934: close fut_asg;
2927: close fut_asg;
2928: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
2929: hr_utility.set_message_token('PROCEDURE','Delete_future_assignments');
2930: hr_utility.set_message_token('STEP','911');
2931: hr_utility.raise_error;
2932: end;
2933: end loop;
2934: close fut_asg;
2935: hr_utility.set_location('OUT Delete future assignments',203);
2931: hr_utility.raise_error;
2932: end;
2933: end loop;
2934: close fut_asg;
2935: hr_utility.set_location('OUT Delete future assignments',203);
2936: end Delete_future_assignments;
2937: --
2938: --
2939: begin
2937: --
2938: --
2939: begin
2940: --
2941: hr_utility.set_location('hrhirapl.create_primary_assignment',1);
2942: --
2943: -- VT 06/14/00
2944: open cur_apl_asg;
2945: fetch cur_apl_asg into apl_asg_rec;
2958: fetch csr_pay_actions into l_dummy;
2959: close csr_pay_actions;
2960:
2961: if l_dummy = 'Y' then
2962: hr_utility.set_message(800,'PER_449877_FUTURE_PAY_ACTIONS');
2963: hr_utility.raise_error;
2964: end if;
2965:
2966: end if;
2959: close csr_pay_actions;
2960:
2961: if l_dummy = 'Y' then
2962: hr_utility.set_message(800,'PER_449877_FUTURE_PAY_ACTIONS');
2963: hr_utility.raise_error;
2964: end if;
2965:
2966: end if;
2967: end if;
2983: open cur_get_asg_num(emp_asg_rec.assignment_id);
2984: fetch cur_get_asg_num into l_asg_num;
2985: close cur_get_asg_num;
2986:
2987: hr_utility.set_message(800,'PER_449891_FUT_PRI_CHG_EXISTS');
2988: hr_utility.set_message_token('ASG_NUM',l_asg_num);
2989: hr_utility.set_message_token('CHG_DATE',l_chg_date);
2990: hr_utility.raise_error;
2991: end if;
2984: fetch cur_get_asg_num into l_asg_num;
2985: close cur_get_asg_num;
2986:
2987: hr_utility.set_message(800,'PER_449891_FUT_PRI_CHG_EXISTS');
2988: hr_utility.set_message_token('ASG_NUM',l_asg_num);
2989: hr_utility.set_message_token('CHG_DATE',l_chg_date);
2990: hr_utility.raise_error;
2991: end if;
2992: -- End changes for bug 9644377
2985: close cur_get_asg_num;
2986:
2987: hr_utility.set_message(800,'PER_449891_FUT_PRI_CHG_EXISTS');
2988: hr_utility.set_message_token('ASG_NUM',l_asg_num);
2989: hr_utility.set_message_token('CHG_DATE',l_chg_date);
2990: hr_utility.raise_error;
2991: end if;
2992: -- End changes for bug 9644377
2993:
2986:
2987: hr_utility.set_message(800,'PER_449891_FUT_PRI_CHG_EXISTS');
2988: hr_utility.set_message_token('ASG_NUM',l_asg_num);
2989: hr_utility.set_message_token('CHG_DATE',l_chg_date);
2990: hr_utility.raise_error;
2991: end if;
2992: -- End changes for bug 9644377
2993:
2994: Delete_future_assignments(p_assignment_id => emp_asg_rec.assignment_id);
3006: and p_start_date between pa.effective_start_date
3007: and pa.effective_end_date;
3008: --
3009: if SQL%ROWCOUNT <1 then
3010: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
3011: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
3012: hr_utility.set_message_token('STEP','1');
3013: hr_utility.raise_error;
3014: end if;
3007: and pa.effective_end_date;
3008: --
3009: if SQL%ROWCOUNT <1 then
3010: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
3011: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
3012: hr_utility.set_message_token('STEP','1');
3013: hr_utility.raise_error;
3014: end if;
3015: end;
3008: --
3009: if SQL%ROWCOUNT <1 then
3010: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
3011: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
3012: hr_utility.set_message_token('STEP','1');
3013: hr_utility.raise_error;
3014: end if;
3015: end;
3016: end if;
3009: if SQL%ROWCOUNT <1 then
3010: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
3011: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
3012: hr_utility.set_message_token('STEP','1');
3013: hr_utility.raise_error;
3014: end if;
3015: end;
3016: end if;
3017: --
3014: end if;
3015: end;
3016: end if;
3017: --
3018: hr_utility.set_location('hrhirapl.create_primary_assignment',2);
3019: --
3020: begin
3021: --
3022: --
3061: and pa.effective_end_date;
3062: --
3063: --
3064: if SQL%ROWCOUNT <1 then
3065: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
3066: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
3067: hr_utility.set_message_token('STEP','2');
3068: hr_utility.raise_error;
3069: end if; */
3062: --
3063: --
3064: if SQL%ROWCOUNT <1 then
3065: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
3066: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
3067: hr_utility.set_message_token('STEP','2');
3068: hr_utility.raise_error;
3069: end if; */
3070:
3063: --
3064: if SQL%ROWCOUNT <1 then
3065: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
3066: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
3067: hr_utility.set_message_token('STEP','2');
3068: hr_utility.raise_error;
3069: end if; */
3070:
3071: -- Start changes for bug 9644377
3064: if SQL%ROWCOUNT <1 then
3065: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
3066: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
3067: hr_utility.set_message_token('STEP','2');
3068: hr_utility.raise_error;
3069: end if; */
3070:
3071: -- Start changes for bug 9644377
3072: if p_update_primary_flag = 'C' and p_emp_apl = 'Y' then
3080: and pa.assignment_id = p_new_primary_id
3081: and p_start_date between pa.effective_start_date and pa.effective_end_date;
3082:
3083: if SQL%ROWCOUNT <1 then
3084: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
3085: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
3086: hr_utility.set_message_token('STEP','2');
3087: hr_utility.raise_error;
3088: end if;
3081: and p_start_date between pa.effective_start_date and pa.effective_end_date;
3082:
3083: if SQL%ROWCOUNT <1 then
3084: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
3085: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
3086: hr_utility.set_message_token('STEP','2');
3087: hr_utility.raise_error;
3088: end if;
3089:
3082:
3083: if SQL%ROWCOUNT <1 then
3084: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
3085: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
3086: hr_utility.set_message_token('STEP','2');
3087: hr_utility.raise_error;
3088: end if;
3089:
3090: open cur_pri_asg_info(p_new_primary_id);
3083: if SQL%ROWCOUNT <1 then
3084: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
3085: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
3086: hr_utility.set_message_token('STEP','2');
3087: hr_utility.raise_error;
3088: end if;
3089:
3090: open cur_pri_asg_info(p_new_primary_id);
3091: fetch cur_pri_asg_info into l_object_version_number;
3113: and p_start_date between pa.effective_start_date
3114: and pa.effective_end_date;
3115:
3116: if SQL%ROWCOUNT <1 then
3117: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
3118: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
3119: hr_utility.set_message_token('STEP','2');
3120: hr_utility.raise_error;
3121: end if;
3114: and pa.effective_end_date;
3115:
3116: if SQL%ROWCOUNT <1 then
3117: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
3118: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
3119: hr_utility.set_message_token('STEP','2');
3120: hr_utility.raise_error;
3121: end if;
3122:
3115:
3116: if SQL%ROWCOUNT <1 then
3117: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
3118: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
3119: hr_utility.set_message_token('STEP','2');
3120: hr_utility.raise_error;
3121: end if;
3122:
3123: end if;
3116: if SQL%ROWCOUNT <1 then
3117: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
3118: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
3119: hr_utility.set_message_token('STEP','2');
3120: hr_utility.raise_error;
3121: end if;
3122:
3123: end if;
3124: -- End changes for bug 9644377
3125: --
3126: -- Bug #4462906 Moved the hrutility call
3127: -- after SQL%ROWCOUNT check
3128: --
3129: hr_utility.set_location('hrhirapl.employ_applicant',99);
3130: --
3131: hrentmnt.maintain_entries_asg(p_new_primary_id
3132: ,p_business_group_id
3133: ,'HIRE_APPL' -- ,'ASG_CRITERIA' for bug 5547271
3138: ,p_start_date
3139: ,p_end_of_time);
3140: end;
3141: -- Bug 14551643
3142: hr_utility.set_location('hrhirapl.employ_applicant',100);
3143: OPEN emp_asg;
3144: FETCH emp_asg INTO l_rowid;
3145: CLOSE emp_asg;
3146:
3202: ,p_ass_attribute27 => apl_rec.ass_attribute27
3203: ,p_ass_attribute28 => apl_rec.ass_attribute28
3204: ,p_ass_attribute29 => apl_rec.ass_attribute29
3205: ,p_ass_attribute30 => apl_rec.ass_attribute30);
3206: hr_utility.set_location('hrhirapl.employ_applicant',101);
3207: -- Bug 14551643
3208: else
3209: --
3210: hr_utility.set_location('hrhirapl.create_primary_assignment',3);
3206: hr_utility.set_location('hrhirapl.employ_applicant',101);
3207: -- Bug 14551643
3208: else
3209: --
3210: hr_utility.set_location('hrhirapl.create_primary_assignment',3);
3211: --
3212:
3213: declare
3214: --
3299: --
3300: -- VT 06/14/00
3301: if p_update_primary_flag = 'Y' then
3302:
3303: hr_utility.set_location('primary_flag = Y',480);
3304: hr_utility.trace(' p_start_date = '||to_char(p_start_date,'dd-MON-yyyy'));
3305: hr_utility.trace(' p_end_of_time = '||to_char(p_end_of_time,'dd-MON-yyyy'));
3306: hr_utility.trace(' assignment_id = '||to_char(p_assignment_id));
3307: hr_utility.trace(' l_asg_end_date = '||to_char(l_asg_end_date,'dd-MON-yyyy'));
3300: -- VT 06/14/00
3301: if p_update_primary_flag = 'Y' then
3302:
3303: hr_utility.set_location('primary_flag = Y',480);
3304: hr_utility.trace(' p_start_date = '||to_char(p_start_date,'dd-MON-yyyy'));
3305: hr_utility.trace(' p_end_of_time = '||to_char(p_end_of_time,'dd-MON-yyyy'));
3306: hr_utility.trace(' assignment_id = '||to_char(p_assignment_id));
3307: hr_utility.trace(' l_asg_end_date = '||to_char(l_asg_end_date,'dd-MON-yyyy'));
3308: --
3301: if p_update_primary_flag = 'Y' then
3302:
3303: hr_utility.set_location('primary_flag = Y',480);
3304: hr_utility.trace(' p_start_date = '||to_char(p_start_date,'dd-MON-yyyy'));
3305: hr_utility.trace(' p_end_of_time = '||to_char(p_end_of_time,'dd-MON-yyyy'));
3306: hr_utility.trace(' assignment_id = '||to_char(p_assignment_id));
3307: hr_utility.trace(' l_asg_end_date = '||to_char(l_asg_end_date,'dd-MON-yyyy'));
3308: --
3309: -- Start of BEN Call
3302:
3303: hr_utility.set_location('primary_flag = Y',480);
3304: hr_utility.trace(' p_start_date = '||to_char(p_start_date,'dd-MON-yyyy'));
3305: hr_utility.trace(' p_end_of_time = '||to_char(p_end_of_time,'dd-MON-yyyy'));
3306: hr_utility.trace(' assignment_id = '||to_char(p_assignment_id));
3307: hr_utility.trace(' l_asg_end_date = '||to_char(l_asg_end_date,'dd-MON-yyyy'));
3308: --
3309: -- Start of BEN Call
3310: -- Bug 3506363
3303: hr_utility.set_location('primary_flag = Y',480);
3304: hr_utility.trace(' p_start_date = '||to_char(p_start_date,'dd-MON-yyyy'));
3305: hr_utility.trace(' p_end_of_time = '||to_char(p_end_of_time,'dd-MON-yyyy'));
3306: hr_utility.trace(' assignment_id = '||to_char(p_assignment_id));
3307: hr_utility.trace(' l_asg_end_date = '||to_char(l_asg_end_date,'dd-MON-yyyy'));
3308: --
3309: -- Start of BEN Call
3310: -- Bug 3506363
3311: hr_utility.set_location('OAB Call',485);
3307: hr_utility.trace(' l_asg_end_date = '||to_char(l_asg_end_date,'dd-MON-yyyy'));
3308: --
3309: -- Start of BEN Call
3310: -- Bug 3506363
3311: hr_utility.set_location('OAB Call',485);
3312:
3313: -- Start changes for bug 13059935
3314: /*ben_dt_trgr_handle.assignment
3315: (p_rowid => p_rowid
3367: ,p_ass_attribute29 => apl_asg_rec.ass_attribute29
3368: ,p_ass_attribute30 => apl_asg_rec.ass_attribute30
3369: );*/
3370: -- End changes for bug 13059935
3371: hr_utility.set_location('After OAB Call',490);
3372: -- End of Bug 3506363
3373: -- End of BEN Call
3374: -- 7120387
3375: open appl_rec_det1(apl_asg_rec.application_id);
3375: open appl_rec_det1(apl_asg_rec.application_id);
3376: fetch appl_rec_det1 into l_proj_hire_date;
3377: close appl_rec_det1;
3378:
3379: hr_utility.set_location('l_asg_probation_det.assignment_id :'|| apl_asg_rec.assignment_id,10);
3380: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,10);
3381: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,10);
3382:
3383: if l_proj_hire_date is null then -- proj hire date
3376: fetch appl_rec_det1 into l_proj_hire_date;
3377: close appl_rec_det1;
3378:
3379: hr_utility.set_location('l_asg_probation_det.assignment_id :'|| apl_asg_rec.assignment_id,10);
3380: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,10);
3381: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,10);
3382:
3383: if l_proj_hire_date is null then -- proj hire date
3384:
3377: close appl_rec_det1;
3378:
3379: hr_utility.set_location('l_asg_probation_det.assignment_id :'|| apl_asg_rec.assignment_id,10);
3380: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,10);
3381: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,10);
3382:
3383: if l_proj_hire_date is null then -- proj hire date
3384:
3385: if ( apl_asg_rec.probation_period is not null)
3385: if ( apl_asg_rec.probation_period is not null)
3386: and
3387: (apl_asg_rec.probation_unit is not null ) then
3388:
3389: hr_utility.set_location('p_start_date :'||p_start_date,10);
3390: hr_utility.set_location('l_asg_probation_det.assignment_id :'||apl_asg_rec.assignment_id,10);
3391: hr_utility.set_location('l_asg_probation_det.probation_period :'||apl_asg_rec.probation_period,10);
3392: hr_utility.set_location('l_asg_probation_det.probation_unit :'||apl_asg_rec.probation_unit,10);
3393: l_date_probation_end :=NULL;
3386: and
3387: (apl_asg_rec.probation_unit is not null ) then
3388:
3389: hr_utility.set_location('p_start_date :'||p_start_date,10);
3390: hr_utility.set_location('l_asg_probation_det.assignment_id :'||apl_asg_rec.assignment_id,10);
3391: hr_utility.set_location('l_asg_probation_det.probation_period :'||apl_asg_rec.probation_period,10);
3392: hr_utility.set_location('l_asg_probation_det.probation_unit :'||apl_asg_rec.probation_unit,10);
3393: l_date_probation_end :=NULL;
3394: hr_assignment.gen_probation_end
3387: (apl_asg_rec.probation_unit is not null ) then
3388:
3389: hr_utility.set_location('p_start_date :'||p_start_date,10);
3390: hr_utility.set_location('l_asg_probation_det.assignment_id :'||apl_asg_rec.assignment_id,10);
3391: hr_utility.set_location('l_asg_probation_det.probation_period :'||apl_asg_rec.probation_period,10);
3392: hr_utility.set_location('l_asg_probation_det.probation_unit :'||apl_asg_rec.probation_unit,10);
3393: l_date_probation_end :=NULL;
3394: hr_assignment.gen_probation_end
3395: (p_assignment_id => apl_asg_rec.assignment_id
3388:
3389: hr_utility.set_location('p_start_date :'||p_start_date,10);
3390: hr_utility.set_location('l_asg_probation_det.assignment_id :'||apl_asg_rec.assignment_id,10);
3391: hr_utility.set_location('l_asg_probation_det.probation_period :'||apl_asg_rec.probation_period,10);
3392: hr_utility.set_location('l_asg_probation_det.probation_unit :'||apl_asg_rec.probation_unit,10);
3393: l_date_probation_end :=NULL;
3394: hr_assignment.gen_probation_end
3395: (p_assignment_id => apl_asg_rec.assignment_id
3396: ,p_probation_period => apl_asg_rec.probation_period
3397: ,p_probation_unit => apl_asg_rec.probation_unit
3398: ,p_start_date => p_start_date
3399: ,p_date_probation_end => l_date_probation_end
3400: );
3401: hr_utility.set_location('l_date_probation_end :'||l_date_probation_end,10);
3402: apl_asg_rec.date_probation_end :=l_date_probation_end;
3403:
3404: end if;
3405: end if; --proj hire date
3539: -- End changes for bug 13059935
3540:
3541: -- Added for the bug 6497082 starts here
3542:
3543: hr_utility.set_location('### 3: hrhirapl.create_primary_assignment ',3979);
3544: hr_utility.set_location('### 3: hrhirapl.create_primary_assignment '||apl_asg_rec.assignment_status_type_id,3989);
3545: per_people3_pkg.get_default_person_type
3546: (p_required_type => 'ACTIVE_ASSIGN'
3547: ,p_business_group_id => p_business_group_id
3540:
3541: -- Added for the bug 6497082 starts here
3542:
3543: hr_utility.set_location('### 3: hrhirapl.create_primary_assignment ',3979);
3544: hr_utility.set_location('### 3: hrhirapl.create_primary_assignment '||apl_asg_rec.assignment_status_type_id,3989);
3545: per_people3_pkg.get_default_person_type
3546: (p_required_type => 'ACTIVE_ASSIGN'
3547: ,p_business_group_id => p_business_group_id
3548: ,p_legislation_code => p_legislation_code
3547: ,p_business_group_id => p_business_group_id
3548: ,p_legislation_code => p_legislation_code
3549: ,p_person_type => l_assignment_status_type_id
3550: );
3551: hr_utility.set_location('### 3: hrhirapl.create_primary_assignment '||l_assignment_status_type_id,3999);
3552:
3553: -- Fix For Bug # 7046591 Starts. Added If Clause ---
3554: -- if emp_asg_rec.vacancy_id is not null then -- fix for the bug#11778052
3555: ----------------------
3561: from PER_VAC_LINKED_ASSIGNMENTS
3562: where tgt_apl_asg_id = emp_asg_rec.assignment_id
3563: and sysdate between nvl(start_date,sysdate) and nvl(end_date,sysdate) ;
3564:
3565: hr_utility.set_location('emp_asg_rec.assignment_id :'||emp_asg_rec.assignment_id,10);
3566: hr_utility.set_location('l_irc_link_exists :'||l_irc_link_exists,10);
3567:
3568: if l_irc_link_exists <> -1 then
3569:
3562: where tgt_apl_asg_id = emp_asg_rec.assignment_id
3563: and sysdate between nvl(start_date,sysdate) and nvl(end_date,sysdate) ;
3564:
3565: hr_utility.set_location('emp_asg_rec.assignment_id :'||emp_asg_rec.assignment_id,10);
3566: hr_utility.set_location('l_irc_link_exists :'||l_irc_link_exists,10);
3567:
3568: if l_irc_link_exists <> -1 then
3569:
3570: select assignment_status_type_id into l_irc_spl_status
3571: from per_assignment_status_types
3572: where PER_SYSTEM_STATUS= 'ACTIVE_ASG_IN_OTH_BG'
3573: and ACTIVE_FLAG ='Y' and DEFAULT_FLAG='Y';
3574:
3575: hr_utility.set_location('l_irc_spl_status :'||l_irc_spl_status,10);
3576:
3577: IRC_ASG_STATUS_API.create_irc_asg_status
3578: (p_assignment_id => emp_asg_rec.assignment_id
3579: ,p_assignment_status_type_id => l_irc_spl_status
3632:
3633: -- Added for the bug 6497082 Ends here
3634:
3635:
3636: hr_utility.set_location('Updated EMP assignment',11);
3637: -- # 1769702
3638:
3639: -- add the sal admin call here
3640: -- Code for the bug 6512520 starts here
3695: Delete_future_assignments(p_assignment_id => emp_asg_rec.assignment_id); -- modified for bug 9644377
3696: --
3697: -- VT 06/14/00
3698: elsif p_update_primary_flag = 'V' then
3699: hr_utility.set_location('Overwrite EMP assignment',15);
3700: -- overwrite some columns from applicant assignment
3701: if apl_asg_rec.organization_id is not null then
3702: emp_asg_rec.organization_id := apl_asg_rec.organization_id;
3703: end if;
3870: if apl_asg_rec.EMPLOYEE_CATEGORY is not null then
3871: emp_asg_rec.EMPLOYEE_CATEGORY := apl_asg_rec.EMPLOYEE_CATEGORY;
3872: end if;
3873: if apl_asg_rec.COLLECTIVE_AGREEMENT_id is not null then
3874: hr_utility.set_location('Updated EMP assignment',90);
3875: emp_asg_rec.COLLECTIVE_AGREEMENT_id := apl_asg_rec.COLLECTIVE_AGREEMENT_id;
3876: end if;
3877: -- fix for the bug 5513751
3878: --
3881: open appl_rec_det1(apl_asg_rec.application_id);
3882: fetch appl_rec_det1 into l_proj_hire_date;
3883: close appl_rec_det1;
3884:
3885: hr_utility.set_location('l_asg_probation_det.assignment_id :'|| apl_asg_rec.assignment_id,10);
3886: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,10);
3887: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,10);
3888:
3889: if l_proj_hire_date is null then -- proj hire date
3882: fetch appl_rec_det1 into l_proj_hire_date;
3883: close appl_rec_det1;
3884:
3885: hr_utility.set_location('l_asg_probation_det.assignment_id :'|| apl_asg_rec.assignment_id,10);
3886: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,10);
3887: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,10);
3888:
3889: if l_proj_hire_date is null then -- proj hire date
3890:
3883: close appl_rec_det1;
3884:
3885: hr_utility.set_location('l_asg_probation_det.assignment_id :'|| apl_asg_rec.assignment_id,10);
3886: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,10);
3887: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,10);
3888:
3889: if l_proj_hire_date is null then -- proj hire date
3890:
3891: if ( apl_asg_rec.probation_period is not null)
3891: if ( apl_asg_rec.probation_period is not null)
3892: and
3893: (apl_asg_rec.probation_unit is not null ) then
3894:
3895: hr_utility.set_location('p_start_date :'||p_start_date,10);
3896: hr_utility.set_location('l_asg_probation_det.assignment_id :'||apl_asg_rec.assignment_id,10);
3897: hr_utility.set_location('l_asg_probation_det.probation_period :'||apl_asg_rec.probation_period,10);
3898: hr_utility.set_location('l_asg_probation_det.probation_unit :'||apl_asg_rec.probation_unit,10);
3899: l_date_probation_end :=NULL;
3892: and
3893: (apl_asg_rec.probation_unit is not null ) then
3894:
3895: hr_utility.set_location('p_start_date :'||p_start_date,10);
3896: hr_utility.set_location('l_asg_probation_det.assignment_id :'||apl_asg_rec.assignment_id,10);
3897: hr_utility.set_location('l_asg_probation_det.probation_period :'||apl_asg_rec.probation_period,10);
3898: hr_utility.set_location('l_asg_probation_det.probation_unit :'||apl_asg_rec.probation_unit,10);
3899: l_date_probation_end :=NULL;
3900: hr_assignment.gen_probation_end
3893: (apl_asg_rec.probation_unit is not null ) then
3894:
3895: hr_utility.set_location('p_start_date :'||p_start_date,10);
3896: hr_utility.set_location('l_asg_probation_det.assignment_id :'||apl_asg_rec.assignment_id,10);
3897: hr_utility.set_location('l_asg_probation_det.probation_period :'||apl_asg_rec.probation_period,10);
3898: hr_utility.set_location('l_asg_probation_det.probation_unit :'||apl_asg_rec.probation_unit,10);
3899: l_date_probation_end :=NULL;
3900: hr_assignment.gen_probation_end
3901: (p_assignment_id => apl_asg_rec.assignment_id
3894:
3895: hr_utility.set_location('p_start_date :'||p_start_date,10);
3896: hr_utility.set_location('l_asg_probation_det.assignment_id :'||apl_asg_rec.assignment_id,10);
3897: hr_utility.set_location('l_asg_probation_det.probation_period :'||apl_asg_rec.probation_period,10);
3898: hr_utility.set_location('l_asg_probation_det.probation_unit :'||apl_asg_rec.probation_unit,10);
3899: l_date_probation_end :=NULL;
3900: hr_assignment.gen_probation_end
3901: (p_assignment_id => apl_asg_rec.assignment_id
3902: ,p_probation_period => apl_asg_rec.probation_period
3903: ,p_probation_unit => apl_asg_rec.probation_unit
3904: ,p_start_date => p_start_date
3905: ,p_date_probation_end => l_date_probation_end
3906: );
3907: hr_utility.set_location('l_date_probation_end :'||l_date_probation_end,10);
3908: apl_asg_rec.date_probation_end :=l_date_probation_end;
3909: emp_asg_rec.date_probation_end := apl_asg_rec.date_probation_end;
3910: end if;
3911: end if; --proj hire date
3947:
3948:
3949: -- Start of BEN Call
3950: -- Bug 3506363
3951: hr_utility.set_location('Start OAB Call',487);
3952: -- Start changes for bug 13059935
3953: /* ben_dt_trgr_handle.assignment
3954: (p_rowid => p_rowid
3955: ,p_assignment_id => p_assignment_id
4006: ,p_ass_attribute29 => emp_asg_rec.ass_attribute29
4007: ,p_ass_attribute30 => emp_asg_rec.ass_attribute30
4008: );*/
4009: -- End changes for bug 13059935
4010: hr_utility.set_location('End of OAB Call',489);
4011: -- End of Bug 3506363
4012: -- End of BEN Call
4013:
4014: --
4011: -- End of Bug 3506363
4012: -- End of BEN Call
4013:
4014: --
4015: hr_utility.set_location('hrhirapl.create_primary_assignment',10);
4016:
4017: --
4018: -- Changed the value for set_of_books_if from p_set_of_books_id to
4019: -- emp_asg_rec.set_of_books_id bug #2398327
4090: where pa.rowid = p_rowid;
4091: --
4092: -- Added for the bug 6497082 starts here
4093:
4094: hr_utility.set_location('### 4: hrhirapl.create_primary_assignment',3981);
4095:
4096: -- Start changes for bug 13059935
4097: ben_dt_trgr_handle.assignment
4098: (p_rowid => p_rowid
4151: ,p_ass_attribute30 => ass_rec.ass_attribute30
4152: );
4153: -- End changes for bug 13059935
4154:
4155: hr_utility.set_location('### 4: hrhirapl.create_primary_assignment'||emp_asg_rec.assignment_status_type_id,3991);
4156: per_people3_pkg.get_default_person_type
4157: (p_required_type => 'ACTIVE_ASSIGN'
4158: ,p_business_group_id => p_business_group_id
4159: ,p_legislation_code => p_legislation_code
4236: -- Code for the bug 6512520 ends here
4237:
4238: -- All future dated assignments should get ovewritten.
4239: --
4240: hr_utility.set_location('IN Overwrite future dated assignments',14);
4241: open future_ass_cur;
4242: loop
4243: fetch future_ass_cur into l_future_asg_id,p_rowid
4244: ,l_fut_start_date, l_fut_end_date;
4345:
4346: if p_legislation_code = 'US'
4347: and l_prev_location_id <> apl_asg_rec.location_id then
4348:
4349: hr_utility.set_location('Updating tax records..',16);
4350:
4351: -- code added by sneelapa for bug 6409982 starts
4352: p_old_assignment_id := l_future_asg_id;
4353:
4370: ,p_location_id => emp_asg_rec.location_id
4371: ,p_return_code => l_return_code
4372: ,p_return_text => l_return_text
4373: );
4374: hr_utility.set_location('END Updating tax records..',17);
4375: end if;
4376: end if; -- leg=US
4377: -- end 2433154
4378: --
4378: --
4379: end loop; -- updating future dated assignments
4380: close future_ass_cur; -- fix for bug#3057451
4381: -- # 1769702
4382: hr_utility.set_location('OUT Overwrite future dated assignments',18);
4383: else
4384: null;
4385: end if;
4386: -- Start of bug fix 2933750
4464: -- end 2433154
4465: end loop;
4466: --
4467: if ass_cur%ROWCOUNT <1 then
4468: hr_utility.set_location('hrhirapl.create_primary_assignment',33);
4469: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
4470: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
4471: hr_utility.set_message_token('STEP','3');
4472: hr_utility.raise_error;
4465: end loop;
4466: --
4467: if ass_cur%ROWCOUNT <1 then
4468: hr_utility.set_location('hrhirapl.create_primary_assignment',33);
4469: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
4470: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
4471: hr_utility.set_message_token('STEP','3');
4472: hr_utility.raise_error;
4473: end if;
4466: --
4467: if ass_cur%ROWCOUNT <1 then
4468: hr_utility.set_location('hrhirapl.create_primary_assignment',33);
4469: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
4470: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
4471: hr_utility.set_message_token('STEP','3');
4472: hr_utility.raise_error;
4473: end if;
4474: close ass_cur;
4467: if ass_cur%ROWCOUNT <1 then
4468: hr_utility.set_location('hrhirapl.create_primary_assignment',33);
4469: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
4470: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
4471: hr_utility.set_message_token('STEP','3');
4472: hr_utility.raise_error;
4473: end if;
4474: close ass_cur;
4475: -- +---- End Date chosen APL primary assignment id ------+
4468: hr_utility.set_location('hrhirapl.create_primary_assignment',33);
4469: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
4470: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
4471: hr_utility.set_message_token('STEP','3');
4472: hr_utility.raise_error;
4473: end if;
4474: close ass_cur;
4475: -- +---- End Date chosen APL primary assignment id ------+
4476: begin
4481: and p_start_date between pa.effective_start_date
4482: and pa.effective_end_date
4483: for update of pa.effective_end_date;
4484: begin
4485: hr_utility.set_location('hrhirapl.create_primary_assignment',22);
4486: hr_utility.trace(' Update APL asg id => '||to_char(p_new_primary_id));
4487: open app_cur;
4488: loop
4489: fetch app_cur into p_rowid;
4482: and pa.effective_end_date
4483: for update of pa.effective_end_date;
4484: begin
4485: hr_utility.set_location('hrhirapl.create_primary_assignment',22);
4486: hr_utility.trace(' Update APL asg id => '||to_char(p_new_primary_id));
4487: open app_cur;
4488: loop
4489: fetch app_cur into p_rowid;
4490: exit when app_cur%notfound;
4487: open app_cur;
4488: loop
4489: fetch app_cur into p_rowid;
4490: exit when app_cur%notfound;
4491: hr_utility.set_location('hrhirapl.create_primary_assignment',23);
4492: update per_assignments_f
4493: set effective_end_date = p_start_date - 1
4494: where rowid = p_rowid;
4495: end loop;
4493: set effective_end_date = p_start_date - 1
4494: where rowid = p_rowid;
4495: end loop;
4496: if app_cur%ROWCOUNT <1 then
4497: hr_utility.set_location('hrhirapl.create_primary_assignment',44);
4498: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
4499: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
4500: hr_utility.set_message_token('STEP','4');
4501: hr_utility.raise_error;
4494: where rowid = p_rowid;
4495: end loop;
4496: if app_cur%ROWCOUNT <1 then
4497: hr_utility.set_location('hrhirapl.create_primary_assignment',44);
4498: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
4499: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
4500: hr_utility.set_message_token('STEP','4');
4501: hr_utility.raise_error;
4502: end if;
4495: end loop;
4496: if app_cur%ROWCOUNT <1 then
4497: hr_utility.set_location('hrhirapl.create_primary_assignment',44);
4498: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
4499: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
4500: hr_utility.set_message_token('STEP','4');
4501: hr_utility.raise_error;
4502: end if;
4503: close app_cur;
4496: if app_cur%ROWCOUNT <1 then
4497: hr_utility.set_location('hrhirapl.create_primary_assignment',44);
4498: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
4499: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
4500: hr_utility.set_message_token('STEP','4');
4501: hr_utility.raise_error;
4502: end if;
4503: close app_cur;
4504: end;
4497: hr_utility.set_location('hrhirapl.create_primary_assignment',44);
4498: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
4499: hr_utility.set_message_token('PROCEDURE','create_primary_assignment');
4500: hr_utility.set_message_token('STEP','4');
4501: hr_utility.raise_error;
4502: end if;
4503: close app_cur;
4504: end;
4505: end;
4528: --
4529: -- *** MAIN employ_applicant ***
4530: begin
4531: --
4532: -- hr_utility.trace_on;
4533: hr_utility.set_location('hr_person.employ_applicant',1);
4534: --
4535: v_tabrows := table_contents; -- #2264569
4536: hr_utility.trace(' ***** Table ==> '||v_tabrows);
4529: -- *** MAIN employ_applicant ***
4530: begin
4531: --
4532: -- hr_utility.trace_on;
4533: hr_utility.set_location('hr_person.employ_applicant',1);
4534: --
4535: v_tabrows := table_contents; -- #2264569
4536: hr_utility.trace(' ***** Table ==> '||v_tabrows);
4537: --
4532: -- hr_utility.trace_on;
4533: hr_utility.set_location('hr_person.employ_applicant',1);
4534: --
4535: v_tabrows := table_contents; -- #2264569
4536: hr_utility.trace(' ***** Table ==> '||v_tabrows);
4537: --
4538: -- Get new or existing period of service.
4539: --
4540: v_period_of_service_id := get_period_of_service(p_business_group_id
4545: --
4546: if p_emp_apl = 'Y' then
4547: if p_update_primary_flag in ('Y','C','V') then
4548: --
4549: hr_utility.set_location('hr_person.employ_applicant',2);
4550: --
4551: --
4552: -- Date effectively end the current primary assignment
4553: --
4574: ,p_login_id
4575: );
4576: end if;
4577: --
4578: hr_utility.set_location('hr_person.employ_applicant',3);
4579: --
4580: --
4581: -- Make other accepted rows secondary
4582: --
4593: ,p_employee_number
4594: ,p_set_of_books_id
4595: ,p_current_date);
4596: --
4597: hr_utility.set_location('hr_person.employ_applicant',4);
4598: --
4599: --
4600: -- Make a new primary assignment.
4601: --
4619: open get_primary_approved_proposal(p_new_primary_id);
4620: fetch get_primary_approved_proposal into l_proposal_id;
4621: if get_primary_approved_proposal%notfound then
4622: close get_primary_approved_proposal;
4623: hr_utility.set_message(800,'HR_289767_SALARY_BASIS_IS_NULL');
4624: hr_utility.raise_error;
4625: else
4626: close get_primary_approved_proposal;
4627: end if;
4620: fetch get_primary_approved_proposal into l_proposal_id;
4621: if get_primary_approved_proposal%notfound then
4622: close get_primary_approved_proposal;
4623: hr_utility.set_message(800,'HR_289767_SALARY_BASIS_IS_NULL');
4624: hr_utility.raise_error;
4625: else
4626: close get_primary_approved_proposal;
4627: end if;
4628: end if;
4629:
4630:
4631: else -- update_primary_flag = 'N'
4632: --
4633: hr_utility.set_location('hr_person.employ_applicant',5);
4634: --
4635: --
4636: -- Create the accepted assignments as secondary assignments
4637: --
4651: end if;
4652:
4653: else -- employing an applicant; update_primary_flag = 'N'
4654: --
4655: hr_utility.set_location('hr_person.employ_applicant',6);
4656: --
4657: --
4658: -- Create the accepted as secondary but make the chosen a primary.
4659: --
4671: ,p_set_of_books_id
4672: ,p_current_date);
4673: --
4674: --
4675: hr_utility.set_location('hr_person.employ_applicant',7);
4676: --
4677: create_primary_assignment(p_business_group_id
4678: ,p_person_id
4679: ,p_new_primary_id
4709: -- if per_otherbg_apl_api.isMultiRegVac(p_new_primary_id) then
4710: per_otherbg_apl_api.close_otherbg_applications(p_new_primary_id,p_start_date-1,'HIRE_CLOSE');
4711: end if;
4712: --
4713: -- hr_utility.trace_off;
4714: --
4715: --start WWBUG 2130950 hrwf synchronization --tpapired
4716: --
4717: declare
4771: open appl_rec_det(l_asg_probation_det.application_id) ;
4772: fetch appl_rec_det into l_proj_hire_date;
4773: close appl_rec_det;
4774:
4775: hr_utility.set_location('l_asg_probation_det.assignment_id :'||l_asg_probation_det.assignment_id,7);
4776: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,10);
4777: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,10);
4778:
4779: if l_proj_hire_date is null then
4772: fetch appl_rec_det into l_proj_hire_date;
4773: close appl_rec_det;
4774:
4775: hr_utility.set_location('l_asg_probation_det.assignment_id :'||l_asg_probation_det.assignment_id,7);
4776: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,10);
4777: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,10);
4778:
4779: if l_proj_hire_date is null then
4780:
4773: close appl_rec_det;
4774:
4775: hr_utility.set_location('l_asg_probation_det.assignment_id :'||l_asg_probation_det.assignment_id,7);
4776: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,10);
4777: hr_utility.set_location('l_proj_hire_date :'||l_proj_hire_date,10);
4778:
4779: if l_proj_hire_date is null then
4780:
4781: if ( l_asg_probation_det.probation_period is not null)
4782: and
4783: (l_asg_probation_det.probation_unit is not null ) then
4784:
4785:
4786: hr_utility.set_location('p_start_date :'||p_start_date,10);
4787: hr_utility.set_location('l_asg_probation_det.assignment_id :'||l_asg_probation_det.assignment_id,10);
4788: hr_utility.set_location('l_asg_probation_det.probation_period :'||l_asg_probation_det.probation_period,10);
4789: hr_utility.set_location('l_asg_probation_det.probation_unit :'||l_asg_probation_det.probation_unit,10);
4790: l_date_probation_end :=NULL;
4783: (l_asg_probation_det.probation_unit is not null ) then
4784:
4785:
4786: hr_utility.set_location('p_start_date :'||p_start_date,10);
4787: hr_utility.set_location('l_asg_probation_det.assignment_id :'||l_asg_probation_det.assignment_id,10);
4788: hr_utility.set_location('l_asg_probation_det.probation_period :'||l_asg_probation_det.probation_period,10);
4789: hr_utility.set_location('l_asg_probation_det.probation_unit :'||l_asg_probation_det.probation_unit,10);
4790: l_date_probation_end :=NULL;
4791: hr_assignment.gen_probation_end
4784:
4785:
4786: hr_utility.set_location('p_start_date :'||p_start_date,10);
4787: hr_utility.set_location('l_asg_probation_det.assignment_id :'||l_asg_probation_det.assignment_id,10);
4788: hr_utility.set_location('l_asg_probation_det.probation_period :'||l_asg_probation_det.probation_period,10);
4789: hr_utility.set_location('l_asg_probation_det.probation_unit :'||l_asg_probation_det.probation_unit,10);
4790: l_date_probation_end :=NULL;
4791: hr_assignment.gen_probation_end
4792: (p_assignment_id => l_asg_probation_det.assignment_id
4785:
4786: hr_utility.set_location('p_start_date :'||p_start_date,10);
4787: hr_utility.set_location('l_asg_probation_det.assignment_id :'||l_asg_probation_det.assignment_id,10);
4788: hr_utility.set_location('l_asg_probation_det.probation_period :'||l_asg_probation_det.probation_period,10);
4789: hr_utility.set_location('l_asg_probation_det.probation_unit :'||l_asg_probation_det.probation_unit,10);
4790: l_date_probation_end :=NULL;
4791: hr_assignment.gen_probation_end
4792: (p_assignment_id => l_asg_probation_det.assignment_id
4793: ,p_probation_period => l_asg_probation_det.probation_period
4794: ,p_probation_unit => l_asg_probation_det.probation_unit
4795: ,p_start_date => p_start_date
4796: ,p_date_probation_end => l_date_probation_end
4797: );
4798: hr_utility.set_location('l_date_probation_end :'||l_date_probation_end,10);
4799:
4800:
4801: update per_all_assignments_f
4802: set date_probation_end =l_date_probation_end
4823: -- end of date probation end
4824: -- fix 7120387
4825: -- Re-evaluate security access for the person.
4826: --
4827: hr_utility.set_location('hr_person.employ_applicant',8);
4828: --
4829: -- Bug 2534026
4830: -- Hard-code p_emp and p_apl as 'Y'. This will cause both employee and
4831: -- applicant assignments to beincluded when security access is re-evaluated
4894: from per_periods_of_service pps
4895: where pps.person_id =p_person_id;
4896:
4897: begin
4898: hr_utility.set_location('Entering : hr_person.ins_per_list',5);
4899: open check_past_pds;
4900: fetch check_past_pds into l_dummy;
4901: if check_past_pds%FOUND then
4902: close check_past_pds;
4899: open check_past_pds;
4900: fetch check_past_pds into l_dummy;
4901: if check_past_pds%FOUND then
4902: close check_past_pds;
4903: hr_utility.set_location('hr_person.ins_per_list',10);
4904: hr_security_internal.clear_from_person_list(p_person_id);
4905: else
4906: close check_past_pds;
4907: open check_pds;
4907: open check_pds;
4908: fetch check_pds into l_dummy;
4909: if check_pds%notfound then
4910: close check_pds;
4911: hr_utility.set_location('hr_person.ins_per_list',15);
4912: hr_security_internal.clear_from_person_list(p_person_id);
4913: else
4914: close check_pds;
4915: end if;
4914: close check_pds;
4915: end if;
4916: end if;
4917: --
4918: hr_utility.set_location('hr_person.ins_per_list',20);
4919: --
4920: for asg_rec in ass_cur loop
4921: hr_security_internal.add_to_person_list
4922: (p_assignment_id => asg_rec.assignment_id
4922: (p_assignment_id => asg_rec.assignment_id
4923: ,p_effective_date => asg_rec.effective_start_date);
4924: end loop;
4925: --
4926: hr_utility.set_location('Leaving : hr_person.ins_per_list',30);
4927: --
4928: end ins_per_list;
4929: -- +------------------END: ins_per_list ----------------------------------+
4930: --
4994: l_end_date := p_end_date -1;
4995: --
4996: -- #2264569
4997: --
4998: hr_utility.set_location('IN hrhirapl.end_unaccepted_app_assign',303);
4999: open unacc_cur;
5000: loop
5001: fetch unacc_cur into l_asgid;
5002: exit when unacc_cur%NOTFOUND;
5001: fetch unacc_cur into l_asgid;
5002: exit when unacc_cur%NOTFOUND;
5003: begin
5004: if hr_employee_applicant_api.end_date_exists(p_table,l_asgid) <> 2 then
5005: hr_utility.set_location('hrhirapl.end_unaccepted_app_assign',305);
5006: hr_utility.trace(' **** Asg ID : '||to_char(l_asgid));
5007:
5008: update per_assignments pa
5009: set pa.effective_end_date = l_end_date
5002: exit when unacc_cur%NOTFOUND;
5003: begin
5004: if hr_employee_applicant_api.end_date_exists(p_table,l_asgid) <> 2 then
5005: hr_utility.set_location('hrhirapl.end_unaccepted_app_assign',305);
5006: hr_utility.trace(' **** Asg ID : '||to_char(l_asgid));
5007:
5008: update per_assignments pa
5009: set pa.effective_end_date = l_end_date
5010: where current of unacc_cur;
5040: end if;
5041: exception
5042: when others then
5043: close unacc_cur;
5044: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
5045: hr_utility.set_message_token('PROCEDURE','end_unaccepted_app_assign');
5046: hr_utility.set_message_token('STEP','1');
5047: hr_utility.raise_error;
5048: end;
5041: exception
5042: when others then
5043: close unacc_cur;
5044: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
5045: hr_utility.set_message_token('PROCEDURE','end_unaccepted_app_assign');
5046: hr_utility.set_message_token('STEP','1');
5047: hr_utility.raise_error;
5048: end;
5049: end loop;
5042: when others then
5043: close unacc_cur;
5044: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
5045: hr_utility.set_message_token('PROCEDURE','end_unaccepted_app_assign');
5046: hr_utility.set_message_token('STEP','1');
5047: hr_utility.raise_error;
5048: end;
5049: end loop;
5050: close unacc_cur;
5043: close unacc_cur;
5044: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
5045: hr_utility.set_message_token('PROCEDURE','end_unaccepted_app_assign');
5046: hr_utility.set_message_token('STEP','1');
5047: hr_utility.raise_error;
5048: end;
5049: end loop;
5050: close unacc_cur;
5051: hr_utility.set_location('OUT hrhirapl.end_unaccepted_app_assign',310);
5047: hr_utility.raise_error;
5048: end;
5049: end loop;
5050: close unacc_cur;
5051: hr_utility.set_location('OUT hrhirapl.end_unaccepted_app_assign',310);
5052:
5053: end end_unaccepted_app_assign;
5054: --
5055: -- +----------------------END: end_unaccepted_app_assign -------------+
5127: where event_id = l_event_id;
5128: l_final_no := l_final_no - sql%rowcount;
5129: end loop;
5130: if l_final_no <> 0 then
5131: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
5132: hr_utility.set_message_token('PROCEDURE','end_bookings');
5133: hr_utility.set_message_token('STEP','10');
5134: hr_utility.raise_error;
5135: end if;
5128: l_final_no := l_final_no - sql%rowcount;
5129: end loop;
5130: if l_final_no <> 0 then
5131: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
5132: hr_utility.set_message_token('PROCEDURE','end_bookings');
5133: hr_utility.set_message_token('STEP','10');
5134: hr_utility.raise_error;
5135: end if;
5136: --
5129: end loop;
5130: if l_final_no <> 0 then
5131: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
5132: hr_utility.set_message_token('PROCEDURE','end_bookings');
5133: hr_utility.set_message_token('STEP','10');
5134: hr_utility.raise_error;
5135: end if;
5136: --
5137: end end_bookings;
5130: if l_final_no <> 0 then
5131: hr_utility.set_message(801,'HR_6153_ALL_PROCEDURE_FAIL');
5132: hr_utility.set_message_token('PROCEDURE','end_bookings');
5133: hr_utility.set_message_token('STEP','10');
5134: hr_utility.raise_error;
5135: end if;
5136: --
5137: end end_bookings;
5138: ----------------------------END: end_bookings --------------------