184: -- Note that we implicitly assume that the assignment is on a
185: -- payroll, in the joins to element link, hence no reference
186: -- to link_to_all_payrolls_flag.
187: begin
188: hr_utility.set_location(c_indent,10);
189: -- Bugfix 2827092 following lines temporarily removed from below
190: -- piv.value_set_id,
191: -- value_set_id,
192: select pee.element_entry_id,
280: -- previous day. This ensures the date effective
281: -- stuff below will work correctly.
282: val_date := (p_effective_date - 1);
283: else
284: hr_utility.set_location(c_indent,18);
285: -- Check if update really required
286: -- ie changing entry value
287: select eev.screen_entry_value
288: into old_value
304: -- Not correction - validation date is effective date.
305: val_date := p_effective_date;
306: end if;
307: --
308: hr_utility.set_location(c_indent,20);
309:
310: /* bug 6655722
311: select max(pee.effective_end_date)
312: into max_effend
319: -- are not fired.
320: pay_continuous_calc.g_override_cc := TRUE;
321: --
322:
323: hr_utility.set_location(c_indent,30);
324:
325: --bug 6655722
326: -- Ok, we have the information - now we need to perform
327: -- the date track update (UPDATE_CHANGE_INSERT).
378: entry_val_list(r_entry_value.input_value_id) :=
379: r_entry_value.screen_entry_value;
380: end if;
381: --
382: hr_utility.trace('IV='||r_entry_value.input_value_id);
383: hr_utility.trace('VAL='||r_entry_value.screen_entry_value);
384: hr_utility.trace('TAB='||entry_val_list(r_entry_value.input_value_id));
385: hr_utility.trace('DATE='||val_date);
386: --
379: r_entry_value.screen_entry_value;
380: end if;
381: --
382: hr_utility.trace('IV='||r_entry_value.input_value_id);
383: hr_utility.trace('VAL='||r_entry_value.screen_entry_value);
384: hr_utility.trace('TAB='||entry_val_list(r_entry_value.input_value_id));
385: hr_utility.trace('DATE='||val_date);
386: --
387: if entry_val_list(r_entry_value.input_value_id) is not null then
380: end if;
381: --
382: hr_utility.trace('IV='||r_entry_value.input_value_id);
383: hr_utility.trace('VAL='||r_entry_value.screen_entry_value);
384: hr_utility.trace('TAB='||entry_val_list(r_entry_value.input_value_id));
385: hr_utility.trace('DATE='||val_date);
386: --
387: if entry_val_list(r_entry_value.input_value_id) is not null then
388: --
381: --
382: hr_utility.trace('IV='||r_entry_value.input_value_id);
383: hr_utility.trace('VAL='||r_entry_value.screen_entry_value);
384: hr_utility.trace('TAB='||entry_val_list(r_entry_value.input_value_id));
385: hr_utility.trace('DATE='||val_date);
386: --
387: if entry_val_list(r_entry_value.input_value_id) is not null then
388: --
389: -- A non-null entry value has been encountered, therefore set the
408: IF entry_record_exists%NOTFOUND THEN
409: --
410: -- Now, update the effective_end_date of existing entry.
411: -- Note : using val_date.
412: hr_utility.set_location(c_indent,40);
413: update pay_element_entries_f pee
414: set pee.effective_end_date = (p_effective_date - 1)
415: where pee.element_entry_id = update_ee_id
416: and val_date between
417: pee.effective_start_date and pee.effective_end_date;
418: --
419: -- Finally (for entry), we wish to insert the new
420: -- entry record.
421: hr_utility.set_location(c_indent,50);
422: --
423: -- Bugfix 3110853
424: -- Derive the OVN before inserting
425: --
600: /*
601: for entry_value in get_entry_values(update_ee_id, p_effective_date) loop
602: entry_val_list(entry_value.input_value_id) :=
603: entry_value.screen_entry_value;
604: hr_utility.trace('IV='||entry_value.input_value_id);
605: hr_utility.trace('VAL='||entry_value.screen_entry_value);
606: hr_utility.trace('TAB='||entry_val_list(entry_value.input_value_id));
607: hr_utility.trace('DATE='||val_date);
608: end loop;
601: for entry_value in get_entry_values(update_ee_id, p_effective_date) loop
602: entry_val_list(entry_value.input_value_id) :=
603: entry_value.screen_entry_value;
604: hr_utility.trace('IV='||entry_value.input_value_id);
605: hr_utility.trace('VAL='||entry_value.screen_entry_value);
606: hr_utility.trace('TAB='||entry_val_list(entry_value.input_value_id));
607: hr_utility.trace('DATE='||val_date);
608: end loop;
609: */
602: entry_val_list(entry_value.input_value_id) :=
603: entry_value.screen_entry_value;
604: hr_utility.trace('IV='||entry_value.input_value_id);
605: hr_utility.trace('VAL='||entry_value.screen_entry_value);
606: hr_utility.trace('TAB='||entry_val_list(entry_value.input_value_id));
607: hr_utility.trace('DATE='||val_date);
608: end loop;
609: */
610:
603: entry_value.screen_entry_value;
604: hr_utility.trace('IV='||entry_value.input_value_id);
605: hr_utility.trace('VAL='||entry_value.screen_entry_value);
606: hr_utility.trace('TAB='||entry_val_list(entry_value.input_value_id));
607: hr_utility.trace('DATE='||val_date);
608: end loop;
609: */
610:
611:
622: --
623: -- We now wish to perform the update on the entry values.
624: -- This is a similar process to the entry stuff.
625:
626: hr_utility.set_location(c_indent,60);
627:
628: /* bug 6655772
629: delete from pay_element_entry_values_f eev
630: where eev.element_entry_id = update_ee_id
632: */
633: --
634: -- Fix the end date of the entry values.
635: -- Note : using val_date.
636: hr_utility.set_location(c_indent,70);
637: update pay_element_entry_values_f eev
638: set eev.effective_end_date = (p_effective_date - 1)
639: where eev.element_entry_id = update_ee_id
640: and val_date between
642: --
643: -- Now we insert the new entry values row.
644: -- We set the new entry value as required.
645: -- Note : using val_date.
646: hr_utility.set_location(c_indent,80);
647: for update_values in upd_entry_values(update_ee_id, p_effective_date) loop
648: -- Enhancement 3478848
649: -- Removed this, this check is now performed when the entry
650: -- values are initially fetched, above.
715: raise;
716: end;
717: --
718: -- Return element_entry_id that we updated.
719: hr_utility.set_location(c_indent,90);
720: p_element_entry_id := update_ee_id;
721: end update_recurring_ee;
722: --
723: ----------------------------- stop_recurring_ee --------------------------
752: -- Note that we implicitly assume that the assignment is on a
753: -- payroll, in the joins to element link, hence no reference
754: -- to link_to_all_payrolls_flag.
755: begin
756: hr_utility.set_location(c_indent,10);
757: select pee.element_entry_id,
758: pel.element_link_id,
759: pee.effective_start_date
760: into stop_ee_id, link_id, stop_ee_start_date
806: when no_data_found then null;
807: end;
808: --
809: if v_error_flag = 'Y' then
810: hr_utility.set_message(801, 'HR_6304_ELE_ENTRY_DT_DEL_ADJ');
811: hr_utility.raise_error;
812: end if;
813: --
814: -- Check the start date of the date effective element entry, if the date
807: end;
808: --
809: if v_error_flag = 'Y' then
810: hr_utility.set_message(801, 'HR_6304_ELE_ENTRY_DT_DEL_ADJ');
811: hr_utility.raise_error;
812: end if;
813: --
814: -- Check the start date of the date effective element entry, if the date
815: -- is greater than the date_earned then error, since the entry is stopped
815: -- is greater than the date_earned then error, since the entry is stopped
816: -- as of date earned.
817: --
818: if stop_ee_start_date > p_date_earned then
819: hr_utility.set_message(801, 'HR_51338_HRPROC_STOP_EE_DATE');
820: hr_utility.raise_error;
821: end if;
822: --
823: -- Ok, perform date track delete (DELETE).
816: -- as of date earned.
817: --
818: if stop_ee_start_date > p_date_earned then
819: hr_utility.set_message(801, 'HR_51338_HRPROC_STOP_EE_DATE');
820: hr_utility.raise_error;
821: end if;
822: --
823: -- Ok, perform date track delete (DELETE).
824: -- This means we delete any future entries and values
887: payid number; -- payroll_id.
888: dummy number; -- dummy cos selects need something to select into.
889: begin
890: -- start by selecting the information about payroll and formula.
891: hr_utility.set_location('hr_dynsql.setinfo',5);
892: select has.payroll_id,
893: nvl(has.formula_id,0)
894: into payid,
895: formula
898: --
899: payroll := (payid is not null);
900: --
901: -- Now check for specific inclusions being specified.
902: hr_utility.set_location('hr_dynsql.setinfo',10);
903: include := TRUE;
904: begin
905: select null
906: into dummy
915: end;
916: --
917: -- Now check for specific exclusions.
918: exclude := TRUE;
919: hr_utility.set_location('hr_dynsql.setinfo',15);
920: begin
921: select null
922: into dummy
923: from sys.dual
1826: and prfm.effective_end_date;
1827: --
1828: /* Range code should always be set */
1829: if (range_proc is null) then
1830: hr_utility.set_message(801, 'PAY_34958_ARCRGE_MUST_EXIST');
1831: hr_utility.raise_error;
1832: end if;
1833: --
1834: statem := 'BEGIN '||range_proc||'(:pactid, :sqlstr); END;';
1827: --
1828: /* Range code should always be set */
1829: if (range_proc is null) then
1830: hr_utility.set_message(801, 'PAY_34958_ARCRGE_MUST_EXIST');
1831: hr_utility.raise_error;
1832: end if;
1833: --
1834: statem := 'BEGIN '||range_proc||'(:pactid, :sqlstr); END;';
1835: --
2204: --
2205: pay_proc_logging.PY_ENTRY('hr_dynsql.pyrsql');
2206: --
2207: --
2208: hr_utility.trace('sqlid = '||sqlid);
2209: hr_utility.trace('timedepflg = '||timedepflg);
2210: hr_utility.trace('interlock = '||interlock);
2211: hr_utility.trace('action = '||action);
2212: hr_utility.trace('pactid = '||pactid);
2205: pay_proc_logging.PY_ENTRY('hr_dynsql.pyrsql');
2206: --
2207: --
2208: hr_utility.trace('sqlid = '||sqlid);
2209: hr_utility.trace('timedepflg = '||timedepflg);
2210: hr_utility.trace('interlock = '||interlock);
2211: hr_utility.trace('action = '||action);
2212: hr_utility.trace('pactid = '||pactid);
2213: hr_utility.trace('chkno = '||chkno);
2206: --
2207: --
2208: hr_utility.trace('sqlid = '||sqlid);
2209: hr_utility.trace('timedepflg = '||timedepflg);
2210: hr_utility.trace('interlock = '||interlock);
2211: hr_utility.trace('action = '||action);
2212: hr_utility.trace('pactid = '||pactid);
2213: hr_utility.trace('chkno = '||chkno);
2214:
2207: --
2208: hr_utility.trace('sqlid = '||sqlid);
2209: hr_utility.trace('timedepflg = '||timedepflg);
2210: hr_utility.trace('interlock = '||interlock);
2211: hr_utility.trace('action = '||action);
2212: hr_utility.trace('pactid = '||pactid);
2213: hr_utility.trace('chkno = '||chkno);
2214:
2215: if (chkno is null) then
2208: hr_utility.trace('sqlid = '||sqlid);
2209: hr_utility.trace('timedepflg = '||timedepflg);
2210: hr_utility.trace('interlock = '||interlock);
2211: hr_utility.trace('action = '||action);
2212: hr_utility.trace('pactid = '||pactid);
2213: hr_utility.trace('chkno = '||chkno);
2214:
2215: if (chkno is null) then
2216: range := nopoprange;
2209: hr_utility.trace('timedepflg = '||timedepflg);
2210: hr_utility.trace('interlock = '||interlock);
2211: hr_utility.trace('action = '||action);
2212: hr_utility.trace('pactid = '||pactid);
2213: hr_utility.trace('chkno = '||chkno);
2214:
2215: if (chkno is null) then
2216: range := nopoprange;
2217: else
2306: sqlstr := rrsel || alladeasg || orderby;
2307: else
2308: sqlstr := null; -- should not reach this!!
2309: end if;
2310: hr_utility.trace('sqlstr: ' ||sqlstr);
2311: elsif (action = PYG_AT_RCS) then
2312: if (sqlid = PY_ALLASG) then
2313: sqlstr := asactsel || allrcsasg || range;
2314: if (interlock = 'N') then