DBA Data[Home] [Help]

APPS.PAY_RETRO_STATUS_INTERNAL dependencies on HR_UTILITY

Line 163: hr_utility.set_location('Entering:'|| l_proc, 10);

159: --
160: l_ownertype_sum number;
161: --
162: begin
163: hr_utility.set_location('Entering:'|| l_proc, 10);
164: --
165: -- Check the owner type of all the retro entries.
166: --
167: open csr_retro_ent_type;

Line 174: hr_utility.set_location(l_proc, 20);

170: --
171: -- Determine the owner type.
172: --
173: if (l_ownertype_sum = 1) then
174: hr_utility.set_location(l_proc, 20);
175: l_owner_type := g_system;
176: elsif (l_ownertype_sum is null) or (l_ownertype_sum = 2) then
177: hr_utility.set_location(l_proc, 30);
178: l_owner_type := g_user;

Line 177: hr_utility.set_location(l_proc, 30);

173: if (l_ownertype_sum = 1) then
174: hr_utility.set_location(l_proc, 20);
175: l_owner_type := g_system;
176: elsif (l_ownertype_sum is null) or (l_ownertype_sum = 2) then
177: hr_utility.set_location(l_proc, 30);
178: l_owner_type := g_user;
179: else
180: --
181: -- Failed to judge it by the entry owner type.

Line 185: hr_utility.set_location(l_proc, 40);

181: -- Failed to judge it by the entry owner type.
182: -- Temporarily determine it by the created_by value.
183: --
184: if p_created_by = -1 then
185: hr_utility.set_location(l_proc, 40);
186: l_owner_type := g_system;
187: else
188: hr_utility.set_location(l_proc, 50);
189: l_owner_type := g_user;

Line 188: hr_utility.set_location(l_proc, 50);

184: if p_created_by = -1 then
185: hr_utility.set_location(l_proc, 40);
186: l_owner_type := g_system;
187: else
188: hr_utility.set_location(l_proc, 50);
189: l_owner_type := g_user;
190: end if;
191: end if;
192: --

Line 195: hr_utility.set_location(' Leaving:'||l_proc, 90);

191: end if;
192: --
193: return l_owner_type;
194:
195: hr_utility.set_location(' Leaving:'||l_proc, 90);
196: end get_retro_asg_creator_type;
197: --
198: -- ----------------------------------------------------------------------------
199: -- |----------------------< get_retro_ent_creator_type >----------------------|

Line 224: hr_utility.set_location('Entering:'|| l_proc, 10);

220: is
221: l_proc varchar2(72) := g_package||'get_retro_ent_creator_type';
222: l_owner_type varchar2(1);
223: begin
224: hr_utility.set_location('Entering:'|| l_proc, 10);
225:
226: if (nvl(p_old_owner_type, g_system) = g_system) then
227: l_owner_type := g_system;
228: elsif p_old_owner_type = g_user then

Line 238: hr_utility.set_location(' Leaving:'||l_proc, 90);

234: end if;
235:
236: return l_owner_type;
237:
238: hr_utility.set_location(' Leaving:'||l_proc, 90);
239: end get_retro_ent_creator_type;
240: --
241: -- ----------------------------------------------------------------------------
242: -- |--------------------------< chk_assignment_id >---------------------------|

Line 297: hr_utility.set_location('Entering:'|| l_proc, 10);

293: ;
294:
295: l_proc varchar2(72) := g_package||'chk_assignment_id';
296: begin
297: hr_utility.set_location('Entering:'|| l_proc, 10);
298: open csr_asg;
299: fetch csr_asg into l_business_group_id, l_payroll_id;
300: if csr_asg%notfound then
301: close csr_asg;

Line 317: hr_utility.set_location(' Leaving:'||l_proc, 40);

313: --
314: p_business_group_id := l_business_group_id;
315: p_payroll_id := l_payroll_id;
316:
317: hr_utility.set_location(' Leaving:'||l_proc, 40);
318: end chk_assignment_id;
319: --
320: -- ----------------------------------------------------------------------------
321: -- |-------------------------< chk_approval_status >--------------------------|

Line 377: hr_utility.set_location('Entering:'|| l_proc, 10);

373: l_rule_found boolean;
374: l_inv_app_status boolean:= false;
375: l_proc varchar2(72) := g_package||'chk_approval_status';
376: begin
377: hr_utility.set_location('Entering:'|| l_proc, 10);
378:
379: if p_owner_type = g_user then
380:
381: l_leg_code := hr_api.return_legislation_code(p_business_group_id);

Line 394: hr_utility.set_location(l_proc, 20);

390: if not l_rule_found then
391: l_rule_mode := 'N';
392: end if;
393:
394: hr_utility.set_location(l_proc, 20);
395:
396: if (l_rule_mode = 'Y' and p_approval_status in ('A','D'))
397: or (l_rule_mode = 'R' and p_approval_status in ('A','D'))
398: or (l_rule_mode = 'N' and p_approval_status = 'P') then

Line 404: hr_utility.trace('Legislation Code: '|| l_leg_code);

400: -- The approval status is valid.
401: --
402: null;
403: else
404: hr_utility.trace('Legislation Code: '|| l_leg_code);
405: hr_utility.trace('Leg Rule: RETRO_STATUS_USER_UPD = '|| l_rule_mode);
406: hr_utility.trace('Approval Status = '|| p_approval_status);
407: --
408: l_inv_app_status := true;

Line 405: hr_utility.trace('Leg Rule: RETRO_STATUS_USER_UPD = '|| l_rule_mode);

401: --
402: null;
403: else
404: hr_utility.trace('Legislation Code: '|| l_leg_code);
405: hr_utility.trace('Leg Rule: RETRO_STATUS_USER_UPD = '|| l_rule_mode);
406: hr_utility.trace('Approval Status = '|| p_approval_status);
407: --
408: l_inv_app_status := true;
409: end if;

Line 406: hr_utility.trace('Approval Status = '|| p_approval_status);

402: null;
403: else
404: hr_utility.trace('Legislation Code: '|| l_leg_code);
405: hr_utility.trace('Leg Rule: RETRO_STATUS_USER_UPD = '|| l_rule_mode);
406: hr_utility.trace('Approval Status = '|| p_approval_status);
407: --
408: l_inv_app_status := true;
409: end if;
410: elsif p_owner_type = g_system then

Line 411: hr_utility.set_location(l_proc, 30);

407: --
408: l_inv_app_status := true;
409: end if;
410: elsif p_owner_type = g_system then
411: hr_utility.set_location(l_proc, 30);
412:
413: if hr_api.not_exists_in_hr_lookups
414: (trunc(sysdate), 'ADVANCE_RETRO_STATUS', p_approval_status) then
415:

Line 424: hr_utility.set_location(' Leaving:'||l_proc, 40);

420: if l_inv_app_status then
421: fnd_message.set_name('PAY','PAY_34301_RTS_INV_APPRVL_STA');
422: fnd_message.raise_error;
423: end if;
424: hr_utility.set_location(' Leaving:'||l_proc, 40);
425:
426: end chk_approval_status;
427: --
428: -- ----------------------------------------------------------------------------

Line 462: hr_utility.set_location('Entering:'|| l_proc, 10);

458: l_proc varchar2(72) := g_package||'chk_asg_rep_date_updatable';
459: l_owner_type varchar2(10);
460: --
461: begin
462: hr_utility.set_location('Entering:'|| l_proc, 10);
463: --
464: if p_owner_type = g_user then
465:
466: l_owner_type := get_retro_asg_creator_type

Line 482: hr_utility.set_location(' Leaving:'||l_proc, 40);

478: --
479: end if;
480: end if;
481:
482: hr_utility.set_location(' Leaving:'||l_proc, 40);
483:
484: end chk_asg_rep_date_updatable;
485: --
486: -- ----------------------------------------------------------------------------

Line 527: hr_utility.set_location('Entering:'|| l_proc, 10);

523: retro_assignment_id = p_retro_assignment_id
524: and reprocess_date < p_reprocess_date;
525:
526: begin
527: hr_utility.set_location('Entering:'|| l_proc, 10);
528: open csr_chk_rep_date;
529: fetch csr_chk_rep_date into l_dummy;
530: if csr_chk_rep_date%found then
531: close csr_chk_rep_date;

Line 539: hr_utility.set_location(' Leaving:'||l_proc, 40);

535: --
536: end if;
537: close csr_chk_rep_date;
538:
539: hr_utility.set_location(' Leaving:'||l_proc, 40);
540:
541: end chk_retro_asg_reprocess_date;
542: --
543: -- ----------------------------------------------------------------------------

Line 598: hr_utility.set_location('Entering:'|| l_proc, 10);

594: where retro_assignment_id = p_retro_assignment_id
595: and nvl(owner_type, g_system) <> g_user;
596: --
597: begin
598: hr_utility.set_location('Entering:'|| l_proc, 10);
599:
600: if p_owner_type = g_user then
601:
602: hr_utility.set_location(l_proc, 20);

Line 602: hr_utility.set_location(l_proc, 20);

598: hr_utility.set_location('Entering:'|| l_proc, 10);
599:
600: if p_owner_type = g_user then
601:
602: hr_utility.set_location(l_proc, 20);
603:
604: if (p_retro_assignment_action_id is not null) or
605: (p_superseding_retro_asg_id is not null) or
606: (p_old_approval_status not in ('A','D','P')) then

Line 642: hr_utility.set_location(' Leaving:'||l_proc, 40);

638: close csr_sys_ent_exists;
639: end if;
640: end if;
641:
642: hr_utility.set_location(' Leaving:'||l_proc, 40);
643:
644: end chk_retro_asg_updatable;
645: --
646: -- ----------------------------------------------------------------------------

Line 694: hr_utility.set_location('Entering:'|| l_proc, 10);

690: l_proc varchar2(72) := g_package||'chk_ent_reprocess_date';
691: l_element_name pay_element_types_f_tl.element_name%type;
692: l_owner_type varchar2(10);
693: begin
694: hr_utility.set_location('Entering:'|| l_proc, 10);
695:
696: if p_owner_type = g_user then
697:
698: if p_reprocess_date <> p_old_reprocess_date then

Line 699: hr_utility.set_location(l_proc, 20);

695:
696: if p_owner_type = g_user then
697:
698: if p_reprocess_date <> p_old_reprocess_date then
699: hr_utility.set_location(l_proc, 20);
700: --
701: -- Check the existing owner type.
702: --
703: l_owner_type := get_retro_ent_creator_type

Line 729: hr_utility.set_location(l_proc, 30);

725: fnd_message.raise_error;
726: --
727: end if;
728: end if;
729: hr_utility.set_location(l_proc, 30);
730: --
731: if (p_reprocess_date <> p_old_reprocess_date) or
732: (p_old_reprocess_date is null) then
733: --

Line 734: hr_utility.set_location(l_proc, 40);

730: --
731: if (p_reprocess_date <> p_old_reprocess_date) or
732: (p_old_reprocess_date is null) then
733: --
734: hr_utility.set_location(l_proc, 40);
735: if p_reprocess_date < p_asg_reprocess_date then
736: --
737: -- The reprocess date cannot be earlier than the asg reprocess date.
738: --

Line 747: hr_utility.set_location(' Leaving:'||l_proc, 40);

743: --
744: end if;
745: end if;
746: end if;
747: hr_utility.set_location(' Leaving:'||l_proc, 40);
748: end chk_ent_reprocess_date;
749: --
750: -- ----------------------------------------------------------------------------
751: -- |-----------------------< chk_retro_entry_deletable >----------------------|

Line 784: hr_utility.set_location('Entering:'|| l_proc, 10);

780: l_proc varchar2(72) := g_package||'chk_retro_entry_deletable';
781: l_owner_type varchar2(10);
782: l_element_name pay_element_types_f_tl.element_name%type;
783: begin
784: hr_utility.set_location('Entering:'|| l_proc, 10);
785:
786: if p_owner_type = g_user then
787:
788: if nvl(p_old_owner_type, g_system) <> g_user then

Line 800: hr_utility.set_location(' Leaving:'||l_proc, 40);

796: fnd_message.raise_error;
797: end if;
798: end if;
799:
800: hr_utility.set_location(' Leaving:'||l_proc, 40);
801: end chk_retro_entry_deletable;
802: --
803: -- ----------------------------------------------------------------------------
804: -- |-------------------------< chk_element_entry_id >-------------------------|

Line 858: hr_utility.set_location('Entering:'|| l_proc, 10);

854: ;
855: --
856: l_rec csr_entry%rowtype;
857: begin
858: hr_utility.set_location('Entering:'|| l_proc, 10);
859: open csr_entry;
860: fetch csr_entry into l_rec;
861: if csr_entry%notfound then
862: close csr_entry;

Line 876: hr_utility.set_location(' Leaving:'||l_proc, 40);

872: -- Set out variables.
873: --
874: p_element_type_id := l_rec.element_type_id;
875:
876: hr_utility.set_location(' Leaving:'||l_proc, 40);
877:
878: end chk_element_entry_id;
879: --
880: -- -------------------------------------------------------------------------

Line 926: hr_utility.set_location('Entering:'|| l_proc, 10);

922: l_retro_component_id number;
923: l_element_name pay_element_types_f_tl.element_name%type;
924: --
925: begin
926: hr_utility.set_location('Entering:'|| l_proc, 10);
927: --
928: -- Call another package to obtain the default component.
929: -- Note that p_ef_date is not currently used in the other package,
930: -- hence passing it just as a dummy date.

Line 960: hr_utility.set_location(' Leaving:'|| l_proc, 50);

956: -- Set out variable.
957: --
958: return l_retro_component_id;
959:
960: hr_utility.set_location(' Leaving:'|| l_proc, 50);
961: end get_default_retro_component_id;
962: --
963: -- -------------------------------------------------------------------------
964: -- |----------------------< chk_retro_component_id >-----------------------|

Line 1011: hr_utility.set_location('Entering:'|| l_proc, 10);

1007: and nvl(legislation_code, l_legislation_code) = l_legislation_code
1008: ;
1009: --
1010: begin
1011: hr_utility.set_location('Entering:'|| l_proc, 10);
1012: --
1013: -- Check mandatory parameters have been set
1014: --
1015: hr_api.mandatory_arg_error

Line 1028: hr_utility.set_location(l_proc, 20);

1024: := hr_api.return_legislation_code(p_business_group_id);
1025: --
1026: -- Check if the retro component exists.
1027: --
1028: hr_utility.set_location(l_proc, 20);
1029: open csr_retro_component;
1030: fetch csr_retro_component into l_exists;
1031: if csr_retro_component%notfound then
1032: close csr_retro_component;

Line 1040: hr_utility.set_location(' Leaving:'|| l_proc, 50);

1036:
1037: end if;
1038: close csr_retro_component;
1039:
1040: hr_utility.set_location(' Leaving:'|| l_proc, 50);
1041: end chk_retro_component_id;
1042: --
1043: -- ----------------------------------------------------------------------------
1044: -- |-------------------------< chk_retro_comp_usage >-------------------------|

Line 1100: hr_utility.set_location('Entering:'|| l_proc, 10);

1096: ;
1097:
1098: l_proc varchar2(72) := g_package||'chk_retro_comp_usage';
1099: begin
1100: hr_utility.set_location('Entering:'|| l_proc, 10);
1101: open csr_rcu;
1102: fetch csr_rcu into l_dummy;
1103: if csr_rcu%notfound then
1104: --

Line 1118: hr_utility.set_location(' Leaving:'||l_proc, 40);

1114: fnd_message.set_token('COMPONENT_NAME', l_component_name);
1115: fnd_message.raise_error;
1116: --
1117: end if;
1118: hr_utility.set_location(' Leaving:'||l_proc, 40);
1119:
1120: end chk_retro_comp_usage;
1121: --
1122: -- ----------------------------------------------------------------------------

Line 1140: hr_utility.set_location('Entering:'|| l_proc, 10);

1136: from pay_retro_assignments
1137: where retro_assignment_id = p_retro_assignment_id
1138: for update nowait;
1139: begin
1140: hr_utility.set_location('Entering:'|| l_proc, 10);
1141: --
1142: open csr_lock_retro_asg;
1143: fetch csr_lock_retro_asg into l_old_rec;
1144: if csr_lock_retro_asg%notfound then

Line 1151: hr_utility.set_location(l_proc, 20);

1147: fnd_message.raise_error;
1148: end if;
1149: close csr_lock_retro_asg;
1150: --
1151: hr_utility.set_location(l_proc, 20);
1152:
1153: p_old_rec := l_old_rec;
1154:
1155: hr_utility.set_location(' Leaving:'||l_proc, 40);

Line 1155: hr_utility.set_location(' Leaving:'||l_proc, 40);

1151: hr_utility.set_location(l_proc, 20);
1152:
1153: p_old_rec := l_old_rec;
1154:
1155: hr_utility.set_location(' Leaving:'||l_proc, 40);
1156: Exception
1157: When HR_Api.Object_Locked then
1158: --
1159: fnd_message.set_name('PAY', 'HR_7165_OBJECT_LOCKED');

Line 1261: hr_utility.set_location('Entering:'|| l_proc, 10);

1257: where retro_assignment_id = p_retro_asg_id;
1258:
1259: l_proc varchar2(72) := g_package||'create_super_retro_asg';
1260: begin
1261: hr_utility.set_location('Entering:'|| l_proc, 10);
1262: --
1263: -- Issue a savepoint
1264: --
1265: savepoint rts_create_super_retro_asg;

Line 1279: hr_utility.set_location(l_proc, 15);

1275: --
1276: pay_core_utils.assert_condition
1277: (l_proc||':owner_type', p_owner_type in (g_user, g_system));
1278:
1279: hr_utility.set_location(l_proc, 15);
1280: --
1281: -- Check to see if the previous version of retro assignment exists.
1282: --
1283: l_old_retro_asg_id := get_unprocessed_retro_asg(p_assignment_id);

Line 1334: hr_utility.set_location(l_proc, 20);

1330:
1331: --
1332: -- Insert validation.
1333: --
1334: hr_utility.set_location(l_proc, 20);
1335: chk_assignment_id
1336: (p_assignment_id => p_assignment_id
1337: ,p_reprocess_date => l_reprocess_date
1338: ,p_business_group_id => l_business_group_id

Line 1352: hr_utility.set_location(l_proc, 30);

1348: );
1349:
1350: end if;
1351:
1352: hr_utility.set_location(l_proc, 30);
1353: --
1354: -- Create superseding retro assignment.
1355: --
1356: pay_retro_utils_pkg.create_super_retro_asg

Line 1363: hr_utility.set_location(l_proc, 40);

1359: ,p_reprocess_date => l_reprocess_date
1360: ,p_retro_asg_id => l_retro_assignment_id
1361: );
1362:
1363: hr_utility.set_location(l_proc, 40);
1364: --
1365: -- If this is the user type, we might need to change automatically
1366: -- adjusted values.
1367: --

Line 1377: hr_utility.set_location(l_proc, 45);

1373: (p_retro_assignment_id => l_retro_assignment_id
1374: ,p_old_rec => l_new_ra_rec
1375: );
1376:
1377: hr_utility.set_location(l_proc, 45);
1378: --
1379: -- Check the reprocess date.
1380: --
1381: if (p_reprocess_date <> l_new_ra_rec.reprocess_date) then

Line 1382: hr_utility.set_location(l_proc, 50);

1378: --
1379: -- Check the reprocess date.
1380: --
1381: if (p_reprocess_date <> l_new_ra_rec.reprocess_date) then
1382: hr_utility.set_location(l_proc, 50);
1383: --
1384: -- Check to see if this reprocess date is valid.
1385: --
1386: chk_retro_asg_reprocess_date

Line 1401: hr_utility.set_location(l_proc, 55);

1397: -- Check the start date.
1398: --
1399: if (p_start_date is null)
1400: or (p_start_date <> l_new_ra_rec.start_date) then
1401: hr_utility.set_location(l_proc, 55);
1402: --
1403: -- Set the new start date.
1404: --
1405: l_new_start_date := decode_default(p_start_date

Line 1410: hr_utility.set_location(l_proc, 60);

1406: ,null
1407: ,p_reprocess_date);
1408: end if;
1409:
1410: hr_utility.set_location(l_proc, 60);
1411: --
1412: -- As the above procedure doesn't accept approval status at the moment,
1413: -- we might need override the default one if necessary.
1414: --

Line 1415: hr_utility.set_location(l_proc, 70);

1411: --
1412: -- As the above procedure doesn't accept approval status at the moment,
1413: -- we might need override the default one if necessary.
1414: --
1415: hr_utility.set_location(l_proc, 70);
1416: --
1417: l_old_approval_status := l_old_ra_rec.approval_status;
1418: l_approval_status := l_new_ra_rec.approval_status;
1419:

Line 1420: hr_utility.trace('Old status: '||l_old_approval_status);

1416: --
1417: l_old_approval_status := l_old_ra_rec.approval_status;
1418: l_approval_status := l_new_ra_rec.approval_status;
1419:
1420: hr_utility.trace('Old status: '||l_old_approval_status);
1421: hr_utility.trace('Default status: '||l_approval_status);
1422: hr_utility.trace('Specified status: '||p_approval_status);
1423: --
1424: -- Identify the expected new approval status.

Line 1421: hr_utility.trace('Default status: '||l_approval_status);

1417: l_old_approval_status := l_old_ra_rec.approval_status;
1418: l_approval_status := l_new_ra_rec.approval_status;
1419:
1420: hr_utility.trace('Old status: '||l_old_approval_status);
1421: hr_utility.trace('Default status: '||l_approval_status);
1422: hr_utility.trace('Specified status: '||p_approval_status);
1423: --
1424: -- Identify the expected new approval status.
1425: --

Line 1422: hr_utility.trace('Specified status: '||p_approval_status);

1418: l_approval_status := l_new_ra_rec.approval_status;
1419:
1420: hr_utility.trace('Old status: '||l_old_approval_status);
1421: hr_utility.trace('Default status: '||l_approval_status);
1422: hr_utility.trace('Specified status: '||p_approval_status);
1423: --
1424: -- Identify the expected new approval status.
1425: --
1426: if (p_approval_status <> l_approval_status) then

Line 1444: hr_utility.set_location(l_proc, 80);

1440: --
1441: if (l_new_reprocess_date is not null)
1442: or (l_new_start_date is not null)
1443: or (l_new_approval_status is not null) then
1444: hr_utility.set_location(l_proc, 80);
1445: --
1446: update pay_retro_assignments
1447: set
1448: reprocess_date = nvl(l_new_reprocess_date, reprocess_date)

Line 1456: hr_utility.set_location(l_proc, 90);

1452: --
1453: end if;
1454: end if;
1455:
1456: hr_utility.set_location(l_proc, 90);
1457: --
1458: -- Set out variable.
1459: --
1460: p_retro_assignment_id := l_retro_assignment_id;

Line 1462: hr_utility.set_location(' Leaving:'||l_proc, 100);

1458: -- Set out variable.
1459: --
1460: p_retro_assignment_id := l_retro_assignment_id;
1461:
1462: hr_utility.set_location(' Leaving:'||l_proc, 100);
1463: exception
1464: when others then
1465: --
1466: -- A validation or unexpected error has occured

Line 1469: hr_utility.set_location(' Leaving:'||l_proc, 120);

1465: --
1466: -- A validation or unexpected error has occured
1467: --
1468: rollback to rts_create_super_retro_asg;
1469: hr_utility.set_location(' Leaving:'||l_proc, 120);
1470: raise;
1471: end create_super_retro_asg;
1472: --
1473: -- ----------------------------------------------------------------------------

Line 1490: hr_utility.set_location('Entering:'|| l_proc, 10);

1486: l_new_rec t_retro_asg_rec;
1487: l_business_group_id number;
1488: l_payroll_id number;
1489: begin
1490: hr_utility.set_location('Entering:'|| l_proc, 10);
1491: --
1492: -- Issue a savepoint
1493: --
1494: savepoint rts_update_retro_asg;

Line 1508: hr_utility.set_location(l_proc, 20);

1504: --
1505: pay_core_utils.assert_condition
1506: (l_proc||':owner_type', p_owner_type in (g_user, g_system));
1507:
1508: hr_utility.set_location(l_proc, 20);
1509: --
1510: -- Lock the existing retro assignment.
1511: --
1512: lock_retro_asg

Line 1517: hr_utility.set_location(l_proc, 30);

1513: (p_retro_assignment_id => p_retro_assignment_id
1514: ,p_old_rec => l_old_rec
1515: );
1516:
1517: hr_utility.set_location(l_proc, 30);
1518: --
1519: -- Copy the changed values.
1520: --
1521: l_new_rec := l_old_rec;

Line 1532: hr_utility.set_location(l_proc, 40);

1528: ,l_old_rec.start_date);
1529: l_new_rec.approval_status := decode_default(p_approval_status
1530: ,hr_api.g_varchar2
1531: ,l_old_rec.approval_status);
1532: hr_utility.set_location(l_proc, 40);
1533: --
1534: -- Update validation.
1535: --
1536: chk_retro_asg_updatable

Line 1560: hr_utility.set_location(l_proc, 45);

1556: ,p_payroll_id => l_payroll_id
1557: );
1558:
1559: if l_old_rec.approval_status <> l_new_rec.approval_status then
1560: hr_utility.set_location(l_proc, 45);
1561: chk_approval_status
1562: (p_business_group_id => l_business_group_id
1563: ,p_approval_status => l_new_rec.approval_status
1564: ,p_owner_type => p_owner_type

Line 1569: hr_utility.set_location(l_proc, 50);

1565: );
1566: end if;
1567:
1568: if l_old_rec.reprocess_date <> l_new_rec.reprocess_date then
1569: hr_utility.set_location(l_proc, 50);
1570: chk_asg_rep_date_updatable
1571: (p_retro_assignment_id => p_retro_assignment_id
1572: ,p_created_by => l_old_rec.created_by
1573: ,p_owner_type => p_owner_type

Line 1589: hr_utility.set_location(l_proc, 60);

1585: ,hr_api.g_date
1586: ,l_new_rec.reprocess_date);
1587: end if;
1588:
1589: hr_utility.set_location(l_proc, 60);
1590: --
1591: -- Now update the retro assignment.
1592: --
1593: update pay_retro_assignments

Line 1599: hr_utility.set_location(' Leaving:'||l_proc, 80);

1595: ,start_date = l_new_rec.start_date
1596: ,approval_status = l_new_rec.approval_status
1597: where retro_assignment_id = p_retro_assignment_id;
1598:
1599: hr_utility.set_location(' Leaving:'||l_proc, 80);
1600: exception
1601: when others then
1602: --
1603: -- A validation or unexpected error has occured

Line 1606: hr_utility.set_location(' Leaving:'||l_proc, 90);

1602: --
1603: -- A validation or unexpected error has occured
1604: --
1605: rollback to rts_update_retro_asg;
1606: hr_utility.set_location(' Leaving:'||l_proc, 90);
1607: raise;
1608: end update_retro_asg;
1609: --
1610: -- ----------------------------------------------------------------------------

Line 1647: hr_utility.set_location('Entering:'|| l_proc, 10);

1643: l_reprocess_date date;
1644: l_start_date date;
1645: l_old_rec t_retro_asg_rec;
1646: begin
1647: hr_utility.set_location('Entering:'|| l_proc, 10);
1648:
1649: select
1650: min(reprocess_date)
1651: ,min(effective_date)

Line 1660: hr_utility.set_location(l_proc, 20);

1656: where
1657: retro_assignment_id = p_retro_assignment_id
1658: ;
1659:
1660: hr_utility.set_location(l_proc, 20);
1661: --
1662: -- Continue only when retro entry exists.
1663: --
1664: if l_reprocess_date is not null then

Line 1665: hr_utility.set_location(l_proc, 30);

1661: --
1662: -- Continue only when retro entry exists.
1663: --
1664: if l_reprocess_date is not null then
1665: hr_utility.set_location(l_proc, 30);
1666: --
1667: -- Lock the retro assignment.
1668: --
1669: lock_retro_asg

Line 1677: hr_utility.set_location(l_proc, 40);

1673:
1674: if (l_reprocess_date < l_old_rec.reprocess_date)
1675: or (l_start_date < l_old_rec.start_date) then
1676: --
1677: hr_utility.set_location(l_proc, 40);
1678: --
1679: update pay_retro_assignments
1680: set reprocess_date = least(l_reprocess_date, l_old_rec.reprocess_date)
1681: ,start_date = least(l_start_date, l_old_rec.start_date)

Line 1686: hr_utility.set_location(' Leaving:'||l_proc, 80);

1682: where retro_assignment_id = p_retro_assignment_id;
1683: end if;
1684: end if;
1685:
1686: hr_utility.set_location(' Leaving:'||l_proc, 80);
1687: end adjust_retro_asg_date;
1688: --
1689: -- ----------------------------------------------------------------------------
1690: -- |---------------------------< delete_retro_asg >---------------------------|

Line 1712: hr_utility.set_location('Entering:'|| l_proc, 10);

1708: where superseding_retro_asg_id = p_retro_asg_id
1709: ;
1710: --
1711: begin
1712: hr_utility.set_location('Entering:'|| l_proc, 10);
1713: --
1714: -- Issue a savepoint
1715: --
1716: savepoint rts_delete_retro_asg;

Line 1730: hr_utility.set_location(l_proc, 20);

1726: --
1727: pay_core_utils.assert_condition
1728: (l_proc||':owner_type', p_owner_type in (g_user, g_system));
1729:
1730: hr_utility.set_location(l_proc, 20);
1731: --
1732: -- Lock the existing retro assignment.
1733: --
1734: lock_retro_asg

Line 1739: hr_utility.set_location(l_proc, 30);

1735: (p_retro_assignment_id => p_retro_assignment_id
1736: ,p_old_rec => l_old_rec
1737: );
1738:
1739: hr_utility.set_location(l_proc, 30);
1740: --
1741: -- Delete validation.
1742: --
1743: chk_retro_asg_updatable

Line 1753: hr_utility.set_location(l_proc, 50);

1749: ,p_owner_type => p_owner_type
1750: ,p_dml_mode => g_delete
1751: );
1752:
1753: hr_utility.set_location(l_proc, 50);
1754: --
1755: -- Delete child retro entries.
1756: --
1757: delete from pay_retro_entries pre

Line 1774: hr_utility.set_location(l_proc, 60);

1770: where retro_assignment_id = l_replaced_retro_asg_id;
1771:
1772: end loop;
1773:
1774: hr_utility.set_location(l_proc, 60);
1775: --
1776: -- Delete this retro assignment.
1777: --
1778: delete from pay_retro_assignments

Line 1786: hr_utility.set_location(' Leaving:'||l_proc, 80);

1782: -- Set out variable.
1783: --
1784: p_replaced_retro_asg_id := l_replaced_retro_asg_id;
1785:
1786: hr_utility.set_location(' Leaving:'||l_proc, 80);
1787: exception
1788: when others then
1789: --
1790: -- A validation or unexpected error has occured

Line 1793: hr_utility.set_location(' Leaving:'||l_proc, 90);

1789: --
1790: -- A validation or unexpected error has occured
1791: --
1792: rollback to rts_delete_retro_asg;
1793: hr_utility.set_location(' Leaving:'||l_proc, 90);
1794: raise;
1795: end delete_retro_asg;
1796: --
1797: -- ----------------------------------------------------------------------------

Line 1810: hr_utility.set_location('Entering:'|| l_proc, 10);

1806: l_replaced_retro_asg_id number;
1807: l_retro_assignment_id number;
1808: --
1809: begin
1810: hr_utility.set_location('Entering:'|| l_proc, 10);
1811: --
1812: -- Issue a savepoint
1813: --
1814: savepoint rts_delete_retro_asg_cascade;

Line 1834: hr_utility.set_location(' Leaving:'||l_proc, 80);

1830: );
1831: l_retro_assignment_id := l_replaced_retro_asg_id;
1832: end loop;
1833:
1834: hr_utility.set_location(' Leaving:'||l_proc, 80);
1835: exception
1836: when others then
1837: --
1838: -- A validation or unexpected error has occured

Line 1841: hr_utility.set_location(' Leaving:'||l_proc, 90);

1837: --
1838: -- A validation or unexpected error has occured
1839: --
1840: rollback to rts_delete_retro_asg_cascade;
1841: hr_utility.set_location(' Leaving:'||l_proc, 90);
1842: raise;
1843: end delete_retro_asg_cascade;
1844: --
1845: -- ----------------------------------------------------------------------------

Line 1865: hr_utility.set_location('Entering:'|| l_proc, 10);

1861: where retro_assignment_id = p_retro_assignment_id
1862: and element_entry_id = p_element_entry_id
1863: for update nowait;
1864: begin
1865: hr_utility.set_location('Entering:'|| l_proc, 10);
1866: --
1867: -- NOTE: do not check no data found.
1868: --
1869: open csr_lock_retro_ent;

Line 1873: hr_utility.set_location(l_proc, 20);

1869: open csr_lock_retro_ent;
1870: fetch csr_lock_retro_ent into l_old_rec;
1871: close csr_lock_retro_ent;
1872: --
1873: hr_utility.set_location(l_proc, 20);
1874:
1875: p_old_rec := l_old_rec;
1876:
1877: hr_utility.set_location(' Leaving:'||l_proc, 40);

Line 1877: hr_utility.set_location(' Leaving:'||l_proc, 40);

1873: hr_utility.set_location(l_proc, 20);
1874:
1875: p_old_rec := l_old_rec;
1876:
1877: hr_utility.set_location(' Leaving:'||l_proc, 40);
1878: Exception
1879: When HR_Api.Object_Locked then
1880: --
1881: fnd_message.set_name('PAY', 'HR_7165_OBJECT_LOCKED');

Line 1917: hr_utility.set_location('Entering:'|| l_proc, 10);

1913: l_reprocess_date date;
1914: l_system_reprocess_date date;
1915: --
1916: begin
1917: hr_utility.set_location('Entering:'|| l_proc, 10);
1918: --
1919: -- Issue a savepoint
1920: --
1921: savepoint rts_maintain_retro_entry;

Line 1941: hr_utility.set_location(l_proc, 20);

1937: --
1938: pay_core_utils.assert_condition
1939: (l_proc||':owner_type', p_owner_type in (g_user, g_system));
1940:
1941: hr_utility.set_location(l_proc, 20);
1942: --
1943: -- Lock the retro assignment.
1944: --
1945: lock_retro_asg

Line 1962: hr_utility.set_location(l_proc, 50);

1958: ,p_element_entry_id => p_element_entry_id
1959: ,p_old_rec => l_old_rec
1960: );
1961:
1962: hr_utility.set_location(l_proc, 50);
1963: --
1964: -- Insert and update validations
1965: --
1966: if l_old_rec.retro_assignment_id is null then

Line 1988: hr_utility.set_location(l_proc, 80);

1984: ,p_business_group_id => l_business_group_id
1985: ,p_payroll_id => l_payroll_id
1986: );
1987: --
1988: hr_utility.set_location(l_proc, 80);
1989: if p_owner_type = g_user then
1990: l_asg_owner_type := get_retro_asg_creator_type
1991: (p_retro_assignment_id => p_retro_assignment_id
1992: ,p_created_by => l_retro_asg_rec.created_by

Line 2008: hr_utility.set_location(l_proc, 100);

2004: ,p_old_owner_type => l_old_rec.owner_type
2005: ,p_owner_type => p_owner_type
2006: );
2007: end if;
2008: hr_utility.set_location(l_proc, 100);
2009: l_reprocess_date := nvl(p_reprocess_date, l_old_rec.reprocess_date);
2010:
2011: l_retro_component_id := p_retro_component_id;
2012: l_legislation_code := hr_api.return_legislation_code(l_business_group_id);

Line 2015: hr_utility.set_location(l_proc, 110);

2011: l_retro_component_id := p_retro_component_id;
2012: l_legislation_code := hr_api.return_legislation_code(l_business_group_id);
2013: --
2014: if p_retro_component_id is null then
2015: hr_utility.set_location(l_proc, 110);
2016: --
2017: -- We need derive the default value for retro component.
2018: --
2019: if (l_old_rec.retro_assignment_id is null) then

Line 2021: hr_utility.set_location(l_proc, 120);

2017: -- We need derive the default value for retro component.
2018: --
2019: if (l_old_rec.retro_assignment_id is null) then
2020: --
2021: hr_utility.set_location(l_proc, 120);
2022: l_retro_component_id :=
2023: get_default_retro_component_id
2024: (p_element_entry_id => p_element_entry_id
2025: ,p_reprocess_date => l_reprocess_date

Line 2030: hr_utility.set_location(l_proc, 130);

2026: ,p_element_type_id => l_element_type_id
2027: ,p_assignment_id => l_assignment_id
2028: );
2029: else
2030: hr_utility.set_location(l_proc, 130);
2031: --
2032: -- Inherit the previous value.
2033: --
2034: l_retro_component_id := l_old_rec.retro_component_id;

Line 2039: hr_utility.set_location(l_proc, 140);

2035:
2036: end if;
2037: end if;
2038: --
2039: hr_utility.set_location(l_proc, 140);
2040: --
2041: if (l_old_rec.retro_assignment_id is null)
2042: or (l_old_rec.retro_component_id <> l_retro_component_id) then
2043: --

Line 2044: hr_utility.set_location(l_proc, 150);

2040: --
2041: if (l_old_rec.retro_assignment_id is null)
2042: or (l_old_rec.retro_component_id <> l_retro_component_id) then
2043: --
2044: hr_utility.set_location(l_proc, 150);
2045: chk_retro_component_id
2046: (p_retro_component_id => l_retro_component_id
2047: ,p_business_group_id => l_business_group_id
2048: );

Line 2056: hr_utility.set_location(l_proc, 160);

2052: ,p_retro_component_id => l_retro_component_id
2053: );
2054: end if;
2055:
2056: hr_utility.set_location(l_proc, 160);
2057: --
2058: -- If system reprocess date is set to null, override the value with
2059: -- the previous value, for null is available for user type entries.
2060: -- Note that if the value is EOT, it will be handled in

Line 2083: hr_utility.set_location(l_proc, 180);

2079: --
2080: if p_owner_type = g_user then
2081: --
2082: if l_old_rec.reprocess_date <> p_reprocess_date then
2083: hr_utility.set_location(l_proc, 180);
2084: lock_retro_entry
2085: (p_retro_assignment_id => p_retro_assignment_id
2086: ,p_element_entry_id => p_element_entry_id
2087: ,p_old_rec => l_new_rec

Line 2092: hr_utility.set_location(l_proc, 190);

2088: );
2089: --
2090: if p_reprocess_date <> l_new_rec.reprocess_date then
2091: --
2092: hr_utility.set_location(l_proc, 190);
2093: --
2094: update pay_retro_entries
2095: set reprocess_date = p_reprocess_date
2096: ,effective_date = p_reprocess_date

Line 2104: hr_utility.set_location(l_proc, 200);

2100: --
2101: end if;
2102: end if;
2103: else
2104: hr_utility.set_location(l_proc, 200);
2105: adjust_retro_asg_date
2106: (p_retro_assignment_id => p_retro_assignment_id
2107: );
2108: end if;

Line 2110: hr_utility.set_location(' Leaving:'||l_proc, 250);

2106: (p_retro_assignment_id => p_retro_assignment_id
2107: );
2108: end if;
2109: --
2110: hr_utility.set_location(' Leaving:'||l_proc, 250);
2111: exception
2112: when others then
2113: --
2114: -- A validation or unexpected error has occured

Line 2117: hr_utility.set_location(' Leaving:'||l_proc, 260);

2113: --
2114: -- A validation or unexpected error has occured
2115: --
2116: rollback to rts_maintain_retro_entry;
2117: hr_utility.set_location(' Leaving:'||l_proc, 260);
2118: raise;
2119: end maintain_retro_entry;
2120: --
2121: -- ----------------------------------------------------------------------------

Line 2134: hr_utility.set_location('Entering:'|| l_proc, 10);

2130: l_proc varchar2(72) := g_package||'delete_retro_entry';
2131: l_old_rec t_retro_ent_rec;
2132: l_new_rec t_retro_ent_rec;
2133: begin
2134: hr_utility.set_location('Entering:'|| l_proc, 10);
2135: --
2136: -- Issue a savepoint
2137: --
2138: savepoint rts_delete_retro_entry;

Line 2158: hr_utility.set_location(l_proc, 20);

2154: --
2155: pay_core_utils.assert_condition
2156: (l_proc||':owner_type', p_owner_type in (g_user, g_system));
2157:
2158: hr_utility.set_location(l_proc, 20);
2159: --
2160: -- Lock the existing retro entry.
2161: --
2162: lock_retro_entry

Line 2169: hr_utility.set_location(l_proc, 30);

2165: ,p_old_rec => l_old_rec
2166: );
2167:
2168: if l_old_rec.retro_assignment_id is null then
2169: hr_utility.set_location(l_proc, 30);
2170: --
2171: fnd_message.set_name('PAY', 'HR_7220_INVALID_PRIMARY_KEY');
2172: fnd_message.raise_error;
2173: end if;

Line 2175: hr_utility.set_location(l_proc, 50);

2171: fnd_message.set_name('PAY', 'HR_7220_INVALID_PRIMARY_KEY');
2172: fnd_message.raise_error;
2173: end if;
2174:
2175: hr_utility.set_location(l_proc, 50);
2176: --
2177: -- Delete validation.
2178: --
2179: chk_retro_entry_deletable

Line 2185: hr_utility.set_location(l_proc, 60);

2181: ,p_old_owner_type => l_old_rec.owner_type
2182: ,p_owner_type => p_owner_type
2183: );
2184:
2185: hr_utility.set_location(l_proc, 60);
2186:
2187: delete from pay_retro_entries
2188: where retro_assignment_id = p_retro_assignment_id
2189: and element_entry_id = p_element_entry_id

Line 2192: hr_utility.set_location(' Leaving:'||l_proc, 80);

2188: where retro_assignment_id = p_retro_assignment_id
2189: and element_entry_id = p_element_entry_id
2190: ;
2191:
2192: hr_utility.set_location(' Leaving:'||l_proc, 80);
2193: exception
2194: when others then
2195: --
2196: -- A validation or unexpected error has occured

Line 2199: hr_utility.set_location(' Leaving:'||l_proc, 90);

2195: --
2196: -- A validation or unexpected error has occured
2197: --
2198: rollback to rts_delete_retro_entry;
2199: hr_utility.set_location(' Leaving:'||l_proc, 90);
2200: raise;
2201: end delete_retro_entry;
2202: --
2203: -- ----------------------------------------------------------------------------

Line 2226: hr_utility.set_location('Entering:'|| l_proc, 10);

2222:
2223: l_proc varchar2(72) := g_package||'update_reprocess_date';
2224: begin
2225:
2226: hr_utility.set_location('Entering:'|| l_proc, 10);
2227: --
2228: -- Issue a savepoint
2229: --
2230: savepoint rts_update_reprocess_date;

Line 2244: hr_utility.set_location('Getting the retro assignment '||l_proc, 15);

2240: --
2241: pay_core_utils.assert_condition
2242: (l_proc||':owner_type', p_owner_type in (g_user, g_system));
2243:
2244: hr_utility.set_location('Getting the retro assignment '||l_proc, 15);
2245: --
2246: -- Check to see if the previous version of retro assignment exists.
2247: --
2248: l_old_retro_asg_id := get_unprocessed_retro_asg(p_assignment_id);

Line 2255: hr_utility.set_location('No retro assignment found for this assignment : '||l_proc, 15);

2251: --
2252: --
2253: -- No unprocessed retro assignment is found.
2254: --
2255: hr_utility.set_location('No retro assignment found for this assignment : '||l_proc, 15);
2256: fnd_message.set_name('PAY','PAY_34312_RTS_NO_RTA_FOUND');
2257: fnd_message.raise_error;
2258: --
2259: else

Line 2261: hr_utility.set_location('Got retro assignment id and now locking : '||l_proc, 15);

2257: fnd_message.raise_error;
2258: --
2259: else
2260: --
2261: hr_utility.set_location('Got retro assignment id and now locking : '||l_proc, 15);
2262: --
2263: -- Lock and obtain the old record info.
2264: --
2265: lock_retro_asg

Line 2271: hr_utility.set_location('Calling chk_retro_asg_updatable : '||l_proc,20);

2267: ,p_old_rec => l_old_ra_rec
2268: );
2269: --
2270: -- Check to see if this retro assignment is updatable.
2271: hr_utility.set_location('Calling chk_retro_asg_updatable : '||l_proc,20);
2272: chk_retro_asg_updatable
2273: (p_retro_assignment_id => l_old_retro_asg_id
2274: ,p_retro_assignment_action_id => l_old_ra_rec.retro_assignment_action_id
2275: ,p_superseding_retro_asg_id => l_old_ra_rec.superseding_retro_asg_id

Line 2290: hr_utility.set_location('Validates that the employee assignment exists on the reprocess date : '||l_proc, 25);

2286: ,p_reprocess_date => p_reprocess_date);
2287: --
2288: -- Insert validation.
2289: --
2290: hr_utility.set_location('Validates that the employee assignment exists on the reprocess date : '||l_proc, 25);
2291: chk_assignment_id
2292: (p_assignment_id => p_assignment_id
2293: ,p_reprocess_date => p_reprocess_date
2294: ,p_business_group_id => l_business_group_id

Line 2299: hr_utility.set_location('Creating superseding retro assignment : '||l_proc, 30);

2295: ,p_payroll_id => l_payroll_id
2296: );
2297:
2298:
2299: hr_utility.set_location('Creating superseding retro assignment : '||l_proc, 30);
2300: --
2301: -- Create superseding retro assignment.
2302: --
2303: pay_retro_utils_pkg.create_super_retro_asg

Line 2310: hr_utility.set_location('Leaving .... '||l_proc, 40);

2306: ,p_reprocess_date => p_reprocess_date
2307: ,p_retro_asg_id => l_retro_assignment_id
2308: );
2309: p_retro_asg_id := l_retro_assignment_id;
2310: hr_utility.set_location('Leaving .... '||l_proc, 40);
2311: --
2312: end if;
2313:
2314: exception

Line 2320: hr_utility.set_location(' Leaving:'||l_proc, 90);

2316: --
2317: -- A validation or unexpected error has occured
2318: --
2319: rollback to rts_update_reprocess_date;
2320: hr_utility.set_location(' Leaving:'||l_proc, 90);
2321: raise;
2322:
2323: end;
2324: end pay_retro_status_internal;