2: /* $Header: pyeleapi.pkb 120.5.12010000.2 2008/10/01 06:13:22 ankagarw ship $ */
3: --
4: -- Package Variables
5: --
6: g_debug boolean := hr_utility.debug_enabled;
7: g_package varchar2(33) := 'pay_element_entry_api.';
8: --
9: -- ----------------------------------------------------------------------------
10: -- |-------------------------< create_element_entry >-------------------------|
234: AND l_effective_date BETWEEN et.effective_start_date
235: AND et.effective_end_date;
236: --
237: BEGIN
238: g_debug := hr_utility.debug_enabled;
239: if g_debug then
240: hr_utility.set_location('Entering:'|| l_proc, 50);
241: end if;
242: -- bug 659393, added variables for storing all dates pased in and truncate them
236: --
237: BEGIN
238: g_debug := hr_utility.debug_enabled;
239: if g_debug then
240: hr_utility.set_location('Entering:'|| l_proc, 50);
241: end if;
242: -- bug 659393, added variables for storing all dates pased in and truncate them
243: l_effective_date := trunc(p_effective_date);
244: l_effective_start_date := l_effective_date;
247: -- Issue a savepoint.
248: --
249: SAVEPOINT create_element_entry;
250: if g_debug then
251: hr_utility.set_location(l_proc, 60);
252: end if;
253: --
254: -- Call Before Process User Hook
255: --
375: -- Call existing element entry code
376: --
377: IF p_entry_type = 'E' THEN
378: if g_debug then
379: hr_utility.set_location(l_proc, 70);
380: end if;
381: OPEN c_entry_exists;
382: FETCH c_entry_exists
383: INTO l_dummy;
382: FETCH c_entry_exists
383: INTO l_dummy;
384: IF c_entry_exists%FOUND THEN
385: CLOSE c_entry_exists;
386: hr_utility.set_message(801,'HR_7455_PLK_ELE_ENTRY_EXISTS');
387: hr_utility.raise_error;
388: END IF;
389: CLOSE c_entry_exists;
390: END IF;
383: INTO l_dummy;
384: IF c_entry_exists%FOUND THEN
385: CLOSE c_entry_exists;
386: hr_utility.set_message(801,'HR_7455_PLK_ELE_ENTRY_EXISTS');
387: hr_utility.raise_error;
388: END IF;
389: CLOSE c_entry_exists;
390: END IF;
391: --
407: --
408: l_indirect_only_flag;
409: IF c_element_info%NOTFOUND THEN
410: CLOSE c_element_info;
411: hr_utility.set_message(801,'HR_6132_ELE_ENTRY_LINK_MISSING');
412: hr_utility.raise_error;
413: END IF;
414: CLOSE c_element_info;
415: --
408: l_indirect_only_flag;
409: IF c_element_info%NOTFOUND THEN
410: CLOSE c_element_info;
411: hr_utility.set_message(801,'HR_6132_ELE_ENTRY_LINK_MISSING');
412: hr_utility.raise_error;
413: END IF;
414: CLOSE c_element_info;
415: --
416: if g_debug then
413: END IF;
414: CLOSE c_element_info;
415: --
416: if g_debug then
417: hr_utility.set_location(l_proc, 100);
418: end if;
419: OPEN c_assignment_details;
420: FETCH c_assignment_details
421: INTO l_period_status;
424: --
425: /*
426: IF c_assignment_details%NOTFOUND THEN
427: CLOSE c_assignment_details;
428: hr_utility.set_message(801,'HR_6047_ELE_ENTRY_NO_PAYROLL');
429: hr_utility.raise_error;
430: END IF;
431: */
432: CLOSE c_assignment_details;
425: /*
426: IF c_assignment_details%NOTFOUND THEN
427: CLOSE c_assignment_details;
428: hr_utility.set_message(801,'HR_6047_ELE_ENTRY_NO_PAYROLL');
429: hr_utility.raise_error;
430: END IF;
431: */
432: CLOSE c_assignment_details;
433:
440: ( p_entry_type in ('A','R') and p_target_entry_id is null )
441: )
442: ) THEN
443:
444: hr_utility.set_message(801,'HR_34810_ELE_ENTRY_ADJ_ONLY');
445: hr_utility.raise_error;
446:
447: END IF;
448:
441: )
442: ) THEN
443:
444: hr_utility.set_message(801,'HR_34810_ELE_ENTRY_ADJ_ONLY');
445: hr_utility.raise_error;
446:
447: END IF;
448:
449: IF l_closed_for_entry_flag = 'Y' THEN
447: END IF;
448:
449: IF l_closed_for_entry_flag = 'Y' THEN
450:
451: hr_utility.set_message(801,'HR_6064_ELE_ENTRY_CLOSED_ELE');
452: hr_utility.raise_error;
453:
454: -- Error will not be raised for VERTEX, Workers Compensation element with
455: -- Legislation code as US. Bug No 506819
448:
449: IF l_closed_for_entry_flag = 'Y' THEN
450:
451: hr_utility.set_message(801,'HR_6064_ELE_ENTRY_CLOSED_ELE');
452: hr_utility.raise_error;
453:
454: -- Error will not be raised for VERTEX, Workers Compensation element with
455: -- Legislation code as US. Bug No 506819
456:
457: ELSIF (l_period_status = 'C' AND l_process_in_run_flag = 'Y'
458: AND l_element_name not in ('US_TAX_VERTEX','VERTEX','Workers Compensation')
459: AND l_legislation_code <> 'US') THEN
460:
461: hr_utility.set_message(801,'HR_6074_ELE_ENTRY_CLOSE_PERIOD');
462: hr_utility.raise_error;
463:
464: --
465: -- Bugfix 2646060
458: AND l_element_name not in ('US_TAX_VERTEX','VERTEX','Workers Compensation')
459: AND l_legislation_code <> 'US') THEN
460:
461: hr_utility.set_message(801,'HR_6074_ELE_ENTRY_CLOSE_PERIOD');
462: hr_utility.raise_error;
463:
464: --
465: -- Bugfix 2646060
466: -- Ensure that element_link is costable if cost_allocation_keyflex_id
467: -- is not null
468: --
469: ELSIF l_costable_type = 'N' and p_cost_allocation_keyflex_id IS NOT NULL THEN
470: --
471: hr_utility.set_message(801,'HR_7453_PLK_NON_COSTABLE_ELE');
472: hr_utility.set_warning;
473: --
474: --
475: -- Bugfix 3079267
468: --
469: ELSIF l_costable_type = 'N' and p_cost_allocation_keyflex_id IS NOT NULL THEN
470: --
471: hr_utility.set_message(801,'HR_7453_PLK_NON_COSTABLE_ELE');
472: hr_utility.set_warning;
473: --
474: --
475: -- Bugfix 3079267
476: -- Ensure we are not creating an entry for an element marked as
479: --
480: -- Cannot directly create an entry for this element type
481: -- Create a warning
482: --
483: hr_utility.set_message(801,'HR_33297_EE_API_IND_ONLY_ELE');
484: hr_utility.set_warning;
485: --
486: END IF;
487:
480: -- Cannot directly create an entry for this element type
481: -- Create a warning
482: --
483: hr_utility.set_message(801,'HR_33297_EE_API_IND_ONLY_ELE');
484: hr_utility.set_warning;
485: --
486: END IF;
487:
488: hr_entry.return_qualifying_conditions (p_assignment_id,
491: l_date_on_which_time_served_ok,
492: l_date_on_which_old_enough );
493:
494: IF l_effective_date < l_date_on_which_time_served_ok THEN
495: hr_utility.set_message(801, 'HR_ELE_ENTRY_QUAL_LOS');
496: hr_utility.set_warning;
497: ELSIF l_effective_date < l_date_on_which_old_enough THEN
498: hr_utility.set_message(801, 'HR_ELE_ENTRY_QUAL_AGE');
499: hr_utility.set_warning;
492: l_date_on_which_old_enough );
493:
494: IF l_effective_date < l_date_on_which_time_served_ok THEN
495: hr_utility.set_message(801, 'HR_ELE_ENTRY_QUAL_LOS');
496: hr_utility.set_warning;
497: ELSIF l_effective_date < l_date_on_which_old_enough THEN
498: hr_utility.set_message(801, 'HR_ELE_ENTRY_QUAL_AGE');
499: hr_utility.set_warning;
500: END IF;
494: IF l_effective_date < l_date_on_which_time_served_ok THEN
495: hr_utility.set_message(801, 'HR_ELE_ENTRY_QUAL_LOS');
496: hr_utility.set_warning;
497: ELSIF l_effective_date < l_date_on_which_old_enough THEN
498: hr_utility.set_message(801, 'HR_ELE_ENTRY_QUAL_AGE');
499: hr_utility.set_warning;
500: END IF;
501:
502: IF p_input_value_id1 IS NOT NULL AND
495: hr_utility.set_message(801, 'HR_ELE_ENTRY_QUAL_LOS');
496: hr_utility.set_warning;
497: ELSIF l_effective_date < l_date_on_which_old_enough THEN
498: hr_utility.set_message(801, 'HR_ELE_ENTRY_QUAL_AGE');
499: hr_utility.set_warning;
500: END IF;
501:
502: IF p_input_value_id1 IS NOT NULL AND
503: p_entry_value1 IS NOT NULL THEN
501:
502: IF p_input_value_id1 IS NOT NULL AND
503: p_entry_value1 IS NOT NULL THEN
504: if g_debug then
505: hr_utility.set_location(l_proc, 200);
506: end if;
507: l_entry_value1 := pay_ele_shd.convert_lookups(p_input_value_id1, p_entry_value1, p_effective_date);
508: END IF;
509: IF p_input_value_id2 IS NOT NULL AND
508: END IF;
509: IF p_input_value_id2 IS NOT NULL AND
510: p_entry_value2 IS NOT NULL THEN
511: if g_debug then
512: hr_utility.set_location(l_proc, 210);
513: end if;
514: l_entry_value2 := pay_ele_shd.convert_lookups(p_input_value_id2, p_entry_value2, p_effective_date);
515: END IF;
516: IF p_input_value_id3 IS NOT NULL AND
515: END IF;
516: IF p_input_value_id3 IS NOT NULL AND
517: p_entry_value3 IS NOT NULL THEN
518: if g_debug then
519: hr_utility.set_location(l_proc, 220);
520: end if;
521: l_entry_value3 := pay_ele_shd.convert_lookups(p_input_value_id3, p_entry_value3, p_effective_date);
522: END IF;
523: IF p_input_value_id4 IS NOT NULL AND
522: END IF;
523: IF p_input_value_id4 IS NOT NULL AND
524: p_entry_value4 IS NOT NULL THEN
525: if g_debug then
526: hr_utility.set_location(l_proc, 230);
527: end if;
528: l_entry_value4 := pay_ele_shd.convert_lookups(p_input_value_id4, p_entry_value4, p_effective_date);
529: END IF;
530: IF p_input_value_id5 IS NOT NULL AND
529: END IF;
530: IF p_input_value_id5 IS NOT NULL AND
531: p_entry_value5 IS NOT NULL THEN
532: if g_debug then
533: hr_utility.set_location(l_proc, 240);
534: end if;
535: l_entry_value5 := pay_ele_shd.convert_lookups(p_input_value_id5, p_entry_value5, p_effective_date);
536: END IF;
537: IF p_input_value_id6 IS NOT NULL AND
536: END IF;
537: IF p_input_value_id6 IS NOT NULL AND
538: p_entry_value6 IS NOT NULL THEN
539: if g_debug then
540: hr_utility.set_location(l_proc, 250);
541: end if;
542: l_entry_value6 := pay_ele_shd.convert_lookups(p_input_value_id6, p_entry_value6, p_effective_date);
543: END IF;
544: IF p_input_value_id7 IS NOT NULL AND
543: END IF;
544: IF p_input_value_id7 IS NOT NULL AND
545: p_entry_value7 IS NOT NULL THEN
546: if g_debug then
547: hr_utility.set_location(l_proc, 260);
548: end if;
549: l_entry_value7 := pay_ele_shd.convert_lookups(p_input_value_id7, p_entry_value7, p_effective_date);
550: END IF;
551: IF p_input_value_id8 IS NOT NULL AND
550: END IF;
551: IF p_input_value_id8 IS NOT NULL AND
552: p_entry_value8 IS NOT NULL THEN
553: if g_debug then
554: hr_utility.set_location(l_proc, 270);
555: end if;
556: l_entry_value8 := pay_ele_shd.convert_lookups(p_input_value_id8, p_entry_value8, p_effective_date);
557: END IF;
558: IF p_input_value_id9 IS NOT NULL AND
557: END IF;
558: IF p_input_value_id9 IS NOT NULL AND
559: p_entry_value9 IS NOT NULL THEN
560: if g_debug then
561: hr_utility.set_location(l_proc, 280);
562: end if;
563: l_entry_value9 := pay_ele_shd.convert_lookups(p_input_value_id9, p_entry_value9, p_effective_date);
564: END IF;
565: IF p_input_value_id10 IS NOT NULL AND
564: END IF;
565: IF p_input_value_id10 IS NOT NULL AND
566: p_entry_value10 IS NOT NULL THEN
567: if g_debug then
568: hr_utility.set_location(l_proc, 290);
569: end if;
570: l_entry_value10 := pay_ele_shd.convert_lookups(p_input_value_id10, p_entry_value10, p_effective_date);
571: END IF;
572: IF p_input_value_id11 IS NOT NULL AND
571: END IF;
572: IF p_input_value_id11 IS NOT NULL AND
573: p_entry_value11 IS NOT NULL THEN
574: if g_debug then
575: hr_utility.set_location(l_proc, 300);
576: end if;
577: l_entry_value11 := pay_ele_shd.convert_lookups(p_input_value_id11, p_entry_value11, p_effective_date);
578: END IF;
579: IF p_input_value_id12 IS NOT NULL AND
578: END IF;
579: IF p_input_value_id12 IS NOT NULL AND
580: p_entry_value12 IS NOT NULL THEN
581: if g_debug then
582: hr_utility.set_location(l_proc, 310);
583: end if;
584: l_entry_value12 := pay_ele_shd.convert_lookups(p_input_value_id12, p_entry_value12, p_effective_date);
585: END IF;
586: IF p_input_value_id13 IS NOT NULL AND
585: END IF;
586: IF p_input_value_id13 IS NOT NULL AND
587: p_entry_value13 IS NOT NULL THEN
588: if g_debug then
589: hr_utility.set_location(l_proc, 320);
590: end if;
591: l_entry_value13 := pay_ele_shd.convert_lookups(p_input_value_id13, p_entry_value13, p_effective_date);
592: END IF;
593: IF p_input_value_id14 IS NOT NULL AND
592: END IF;
593: IF p_input_value_id14 IS NOT NULL AND
594: p_entry_value14 IS NOT NULL THEN
595: if g_debug then
596: hr_utility.set_location(l_proc, 330);
597: end if;
598: l_entry_value14 := pay_ele_shd.convert_lookups(p_input_value_id14, p_entry_value14, p_effective_date);
599: END IF;
600: IF p_input_value_id15 IS NOT NULL AND
599: END IF;
600: IF p_input_value_id15 IS NOT NULL AND
601: p_entry_value15 IS NOT NULL THEN
602: if g_debug then
603: hr_utility.set_location(l_proc, 340);
604: end if;
605: l_entry_value15 := pay_ele_shd.convert_lookups(p_input_value_id15, p_entry_value15, p_effective_date);
606: END IF;
607: --
710: p_override_user_ent_chk => p_override_user_ent_chk
711: );
712: --
713: if g_debug then
714: hr_utility.set_location(l_proc, 800);
715: end if;
716: --
717: -- When in validation only mode raise the Validate_Enabled exception
718: --
715: end if;
716: --
717: -- When in validation only mode raise the Validate_Enabled exception
718: --
719: IF hr_utility.check_warning THEN
720: l_create_warning := TRUE;
721: hr_utility.clear_warning;
722: END IF;
723: --
717: -- When in validation only mode raise the Validate_Enabled exception
718: --
719: IF hr_utility.check_warning THEN
720: l_create_warning := TRUE;
721: hr_utility.clear_warning;
722: END IF;
723: --
724: -- Get all output arguments
725: --
857: p_effective_end_date := l_effective_end_date;
858: p_create_warning := l_create_warning;
859: --
860: if g_debug then
861: hr_utility.set_location(' Leaving:'||l_proc, 11);
862: end if;
863: --
864: EXCEPTION
865: WHEN hr_api.validate_enabled THEN
895: --
896: -- End of fix.
897: --
898: if g_debug then
899: hr_utility.set_location(' Leaving:'||l_proc, 900);
900: end if;
901: END create_element_entry;
902: --
903: -- ----------------------------------------------------------------------------
936: -- bug 675794, added date condition to select correct row
937: and l_effective_date between effective_start_date
938: and effective_end_date;
939: BEGIN
940: g_debug := hr_utility.debug_enabled;
941: if g_debug then
942: hr_utility.set_location('Entering:'|| l_proc, 5);
943: end if;
944: -- bug 659393, added variables for storing dates passed in and truncate them
938: and effective_end_date;
939: BEGIN
940: g_debug := hr_utility.debug_enabled;
941: if g_debug then
942: hr_utility.set_location('Entering:'|| l_proc, 5);
943: end if;
944: -- bug 659393, added variables for storing dates passed in and truncate them
945: l_effective_date := trunc(p_effective_date);
946: --
953: IF p_validate THEN
954: SAVEPOINT delete_element_entry;
955: END IF;
956: if g_debug then
957: hr_utility.set_location(l_proc, 6);
958: end if;
959: --
960: -- Call Before Process User Hook
961: --
979: --
980: dt_api.validate_dt_del_mode(p_datetrack_mode => p_datetrack_delete_mode);
981: --
982: if g_debug then
983: hr_utility.set_location(l_proc, 7);
984: end if;
985: --
986: -- Process Logic
987: -- 1. Lock the required row
1001: p_element_entry_id
1002: );
1003: --
1004: if g_debug then
1005: hr_utility.set_location(l_proc, 8);
1006: end if;
1007: --
1008: -- Get all output arguments
1009: --
1047: p_effective_end_date := l_effective_end_date;
1048: -- p_delete_warning :=
1049: --
1050: if g_debug then
1051: hr_utility.set_location(' Leaving:'||l_proc, 11);
1052: end if;
1053: EXCEPTION
1054: WHEN hr_api.validate_enabled THEN
1055: --
1066: p_effective_start_date := null;
1067: p_effective_end_date := null;
1068: -- p_delete_warning :=
1069: if g_debug then
1070: hr_utility.set_location(' Leaving:'||l_proc, 12);
1071: end if;
1072: END delete_element_entry;
1073:
1074:
1175: l_proc_name varchar2(300);
1176: l_count number;
1177: begin
1178: l_proc_name := 'conv_entry_into_table';
1179: hr_utility.set_location('Entering '||l_proc_name, 10);
1180:
1181: if p_input_value_id is not null then
1182:
1183: if l_input_value_id_tbl.last is not null then
1184: l_count := l_input_value_id_tbl.last;
1185: else
1186: l_count := 1;
1187: end if;
1188: hr_utility.set_location('l_count '||l_count, 15);
1189: l_input_value_id_tbl(l_count) := p_input_value_id;
1190: l_entry_value_tbl(l_count) := p_entry_value;
1191: end if; --
1192: hr_utility.set_location('Leaving '||l_proc_name, 20);
1188: hr_utility.set_location('l_count '||l_count, 15);
1189: l_input_value_id_tbl(l_count) := p_input_value_id;
1190: l_entry_value_tbl(l_count) := p_entry_value;
1191: end if; --
1192: hr_utility.set_location('Leaving '||l_proc_name, 20);
1193: exception
1194: when others then
1195: hr_utility.set_location('Error '||l_proc_name, 30);
1196: hr_utility.set_location(sqlerrm, 30);
1191: end if; --
1192: hr_utility.set_location('Leaving '||l_proc_name, 20);
1193: exception
1194: when others then
1195: hr_utility.set_location('Error '||l_proc_name, 30);
1196: hr_utility.set_location(sqlerrm, 30);
1197: end conv_entry_into_table;
1198:
1199: begin
1192: hr_utility.set_location('Leaving '||l_proc_name, 20);
1193: exception
1194: when others then
1195: hr_utility.set_location('Error '||l_proc_name, 30);
1196: hr_utility.set_location(sqlerrm, 30);
1197: end conv_entry_into_table;
1198:
1199: begin
1200:
1198:
1199: begin
1200:
1201: l_proc := 'update_validate';
1202: hr_utility.set_location('Entering '||l_proc, 5);
1203:
1204: hr_utility.set_location('obtain creator type ', 10);
1205:
1206: open csr_creator_type (p_element_entry_id, p_effective_date);
1200:
1201: l_proc := 'update_validate';
1202: hr_utility.set_location('Entering '||l_proc, 5);
1203:
1204: hr_utility.set_location('obtain creator type ', 10);
1205:
1206: open csr_creator_type (p_element_entry_id, p_effective_date);
1207: fetch csr_creator_type into l_creator_type, l_total_elt_entry_records;
1208: close csr_creator_type;
1209:
1210: /* Overlapping of records will be validated later
1211: -- Check for overlapping of element entry record
1212: if l_total_elt_entry_records > 1 then
1213: hr_utility.set_message('PAY', 'OVERLAPPING OF RECORDS IS NOT ALLOWED');
1214: hr_utility.raise_error;
1215: end if;
1216: */
1217:
1210: /* Overlapping of records will be validated later
1211: -- Check for overlapping of element entry record
1212: if l_total_elt_entry_records > 1 then
1213: hr_utility.set_message('PAY', 'OVERLAPPING OF RECORDS IS NOT ALLOWED');
1214: hr_utility.raise_error;
1215: end if;
1216: */
1217:
1218: hr_utility.set_location('After element entry unique key check '||l_proc, 15);
1214: hr_utility.raise_error;
1215: end if;
1216: */
1217:
1218: hr_utility.set_location('After element entry unique key check '||l_proc, 15);
1219:
1220: if l_creator_type in ('EE', 'NR', 'R', 'RR', 'PR', 'D', 'DF', 'AD', 'AE', 'P', 'B') then
1221:
1222: -- Check for creator type, creator id and personal_payment_method_id
1222: -- Check for creator type, creator id and personal_payment_method_id
1223: open csr_creator_type_validate (p_element_entry_id, p_effective_date, p_creator_type, p_creator_id, p_personal_payment_method_id);
1224: fetch csr_creator_type_validate into l_total_elt_entry_records;
1225: if l_total_elt_entry_records > 0 then
1226: hr_utility.set_message(801, 'PAY_33292_CHANGE_PROTECTED');
1227: hr_utility.set_message_token('CREATOR_TYPE', hr_general.decode_lookup('CREATOR_TYPE', l_creator_type));
1228: hr_utility.raise_error;
1229: end if;
1230: close csr_creator_type_validate;
1223: open csr_creator_type_validate (p_element_entry_id, p_effective_date, p_creator_type, p_creator_id, p_personal_payment_method_id);
1224: fetch csr_creator_type_validate into l_total_elt_entry_records;
1225: if l_total_elt_entry_records > 0 then
1226: hr_utility.set_message(801, 'PAY_33292_CHANGE_PROTECTED');
1227: hr_utility.set_message_token('CREATOR_TYPE', hr_general.decode_lookup('CREATOR_TYPE', l_creator_type));
1228: hr_utility.raise_error;
1229: end if;
1230: close csr_creator_type_validate;
1231:
1224: fetch csr_creator_type_validate into l_total_elt_entry_records;
1225: if l_total_elt_entry_records > 0 then
1226: hr_utility.set_message(801, 'PAY_33292_CHANGE_PROTECTED');
1227: hr_utility.set_message_token('CREATOR_TYPE', hr_general.decode_lookup('CREATOR_TYPE', l_creator_type));
1228: hr_utility.raise_error;
1229: end if;
1230: close csr_creator_type_validate;
1231:
1232: hr_utility.set_location('After creator type, creator id and personal_payment_method_id check '||l_proc, 20);
1228: hr_utility.raise_error;
1229: end if;
1230: close csr_creator_type_validate;
1231:
1232: hr_utility.set_location('After creator type, creator id and personal_payment_method_id check '||l_proc, 20);
1233:
1234: hr_utility.set_location('Adding input value and entry values in to pl/sql tables ' || l_proc, 30);
1235:
1236: conv_entry_into_table (p_input_value_id1, p_entry_value1);
1230: close csr_creator_type_validate;
1231:
1232: hr_utility.set_location('After creator type, creator id and personal_payment_method_id check '||l_proc, 20);
1233:
1234: hr_utility.set_location('Adding input value and entry values in to pl/sql tables ' || l_proc, 30);
1235:
1236: conv_entry_into_table (p_input_value_id1, p_entry_value1);
1237: conv_entry_into_table (p_input_value_id2, p_entry_value2);
1238: conv_entry_into_table (p_input_value_id3, p_entry_value3);
1248: conv_entry_into_table (p_input_value_id13, p_entry_value13);
1249: conv_entry_into_table (p_input_value_id14, p_entry_value14);
1250: conv_entry_into_table (p_input_value_id15, p_entry_value15);
1251:
1252: hr_utility.set_location('Element Entry check '||l_proc, 35);
1253:
1254: open csr_entry_values_check (p_element_entry_id , p_effective_date );
1255: loop
1256: fetch csr_entry_values_check into l_input_id, l_screen_entry_value;
1261: while l_count <= l_input_value_id_tbl.last
1262: loop
1263: if l_input_value_id_tbl(l_count) = l_input_id then
1264: if l_entry_value_tbl(l_count) <> l_screen_entry_value then
1265: hr_utility.set_location('Raise Error '||l_proc, 40);
1266:
1267: hr_utility.set_message(801, 'PAY_33292_CHANGE_PROTECTED');
1268: hr_utility.set_message_token('CREATOR_TYPE', hr_general.decode_lookup('CREATOR_TYPE', l_creator_type));
1269: hr_utility.raise_error;
1263: if l_input_value_id_tbl(l_count) = l_input_id then
1264: if l_entry_value_tbl(l_count) <> l_screen_entry_value then
1265: hr_utility.set_location('Raise Error '||l_proc, 40);
1266:
1267: hr_utility.set_message(801, 'PAY_33292_CHANGE_PROTECTED');
1268: hr_utility.set_message_token('CREATOR_TYPE', hr_general.decode_lookup('CREATOR_TYPE', l_creator_type));
1269: hr_utility.raise_error;
1270:
1271: end if; -- screen entry value is not equal
1264: if l_entry_value_tbl(l_count) <> l_screen_entry_value then
1265: hr_utility.set_location('Raise Error '||l_proc, 40);
1266:
1267: hr_utility.set_message(801, 'PAY_33292_CHANGE_PROTECTED');
1268: hr_utility.set_message_token('CREATOR_TYPE', hr_general.decode_lookup('CREATOR_TYPE', l_creator_type));
1269: hr_utility.raise_error;
1270:
1271: end if; -- screen entry value is not equal
1272: end if; -- input value is equal
1265: hr_utility.set_location('Raise Error '||l_proc, 40);
1266:
1267: hr_utility.set_message(801, 'PAY_33292_CHANGE_PROTECTED');
1268: hr_utility.set_message_token('CREATOR_TYPE', hr_general.decode_lookup('CREATOR_TYPE', l_creator_type));
1269: hr_utility.raise_error;
1270:
1271: end if; -- screen entry value is not equal
1272: end if; -- input value is equal
1273: l_count := l_count + 1;
1274: end loop; -- input value loop
1275: end loop; --element entry value cursor
1276:
1277: end if; --Creator type check
1278: hr_utility.set_location('Leaving '||l_proc, 45);
1279:
1280: exception
1281: when others then
1282: hr_utility.set_location('Error '||l_proc, 50);
1278: hr_utility.set_location('Leaving '||l_proc, 45);
1279:
1280: exception
1281: when others then
1282: hr_utility.set_location('Error '||l_proc, 50);
1283: hr_utility.set_location(sqlerrm, 50);
1284: raise;
1285: end update_validate;
1286:
1279:
1280: exception
1281: when others then
1282: hr_utility.set_location('Error '||l_proc, 50);
1283: hr_utility.set_location(sqlerrm, 50);
1284: raise;
1285: end update_validate;
1286:
1287:
1469: AND p_effective_date BETWEEN el.effective_start_date
1470: AND el.effective_end_date;
1471: --
1472: BEGIN
1473: g_debug := hr_utility.debug_enabled;
1474: if g_debug then
1475: hr_utility.set_location('Entering:'|| l_proc, 5);
1476: end if;
1477: --
1471: --
1472: BEGIN
1473: g_debug := hr_utility.debug_enabled;
1474: if g_debug then
1475: hr_utility.set_location('Entering:'|| l_proc, 5);
1476: end if;
1477: --
1478: -- Store initial values for IN OUT parameters
1479: --
1486: -- Issue a savepoint.
1487: --
1488: SAVEPOINT update_element_entry;
1489: if g_debug then
1490: hr_utility.set_location(l_proc, 6);
1491: end if;
1492: --
1493: -- Call Before Process User Hook
1494: --
1618: IF l_costable_type = 'N'
1619: AND p_cost_allocation_keyflex_id IS NOT NULL
1620: AND p_cost_allocation_keyflex_id <> hr_api.g_number THEN
1621: --
1622: hr_utility.set_message(801,'HR_7453_PLK_NON_COSTABLE_ELE');
1623: hr_utility.set_warning;
1624: --
1625: END IF;
1626: --
1619: AND p_cost_allocation_keyflex_id IS NOT NULL
1620: AND p_cost_allocation_keyflex_id <> hr_api.g_number THEN
1621: --
1622: hr_utility.set_message(801,'HR_7453_PLK_NON_COSTABLE_ELE');
1623: hr_utility.set_warning;
1624: --
1625: END IF;
1626: --
1627: if g_debug then
1624: --
1625: END IF;
1626: --
1627: if g_debug then
1628: hr_utility.set_location(l_proc, 7);
1629: end if;
1630: --
1631: -- Process Logic
1632: -- 1. If updating entries created by MIX - creator_type = 'H' - the creator
1856: p_override_user_ent_chk => p_override_user_ent_chk
1857: );
1858: --
1859: if g_debug then
1860: hr_utility.set_location(l_proc, 8);
1861: end if;
1862: --
1863: -- Get all output arguments
1864: --
1862: --
1863: -- Get all output arguments
1864: --
1865: if g_debug then
1866: hr_utility.set_location(l_proc, 9);
1867: end if;
1868: --
1869: OPEN C_Output_Variables;
1870: FETCH C_Output_Variables
2002: p_effective_end_date := l_effective_end_date;
2003: -- p_update_warning :=
2004: --
2005: if g_debug then
2006: hr_utility.set_location(' Leaving:'||l_proc, 11);
2007: end if;
2008: EXCEPTION
2009: WHEN hr_api.validate_enabled THEN
2010: --
2038: --
2039: -- End of fix.
2040: --
2041: if g_debug then
2042: hr_utility.set_location(' Leaving:'||l_proc, 12);
2043: end if;
2044: END update_element_entry;
2045: --
2046: END pay_element_entry_api;