17: --
18: cursor getParameters(c_assignment_action_id in number) is
19: select pa.payroll_id
20: --, to_number(to_char(pa.effective_date,'J')) effective_date
21: ,replace(substr(FND_DATE.DATE_TO_CANONICAL(pa.effective_date),1,10),'/','-') jsqldate --YYYY-MM-DD
22: ,'' || pa.effective_date || '' effective_date
23: , aa.assignment_id
24: , pa.business_group_id
25: , aa.tax_unit_id
329: if l_action_type is not null then
330: if l_action_type in ( 'P','U' ) then
331: l_sql :=
332: 'select tp1.period_name || decode(tp2.period_name, tp1.period_name, null, '' - '' || tp2.period_name) COL01
333: ,fnd_date.date_to_displaydate(tp1.end_date,2) COL04 -- change as per bug 11830805
334: ,fnd_date.date_to_displaydate(pa2.effective_date,2) COL03 -- change as per bug 11830805
335: ,fnd_date.date_to_displaydate(aa1.start_date,2) COL05 -- change as per bug 11830805
336: ,fnd_date.date_to_displaydate(aa2.end_date,2) COL06 -- change as per bug 11830805
337: ,fnd_date.date_to_displaydate(tp1.start_date,2) COL02 -- change as per bug 11830805
330: if l_action_type in ( 'P','U' ) then
331: l_sql :=
332: 'select tp1.period_name || decode(tp2.period_name, tp1.period_name, null, '' - '' || tp2.period_name) COL01
333: ,fnd_date.date_to_displaydate(tp1.end_date,2) COL04 -- change as per bug 11830805
334: ,fnd_date.date_to_displaydate(pa2.effective_date,2) COL03 -- change as per bug 11830805
335: ,fnd_date.date_to_displaydate(aa1.start_date,2) COL05 -- change as per bug 11830805
336: ,fnd_date.date_to_displaydate(aa2.end_date,2) COL06 -- change as per bug 11830805
337: ,fnd_date.date_to_displaydate(tp1.start_date,2) COL02 -- change as per bug 11830805
338: ,tp1.period_type COL07
331: l_sql :=
332: 'select tp1.period_name || decode(tp2.period_name, tp1.period_name, null, '' - '' || tp2.period_name) COL01
333: ,fnd_date.date_to_displaydate(tp1.end_date,2) COL04 -- change as per bug 11830805
334: ,fnd_date.date_to_displaydate(pa2.effective_date,2) COL03 -- change as per bug 11830805
335: ,fnd_date.date_to_displaydate(aa1.start_date,2) COL05 -- change as per bug 11830805
336: ,fnd_date.date_to_displaydate(aa2.end_date,2) COL06 -- change as per bug 11830805
337: ,fnd_date.date_to_displaydate(tp1.start_date,2) COL02 -- change as per bug 11830805
338: ,tp1.period_type COL07
339: from pay_all_payrolls_f pp1
332: 'select tp1.period_name || decode(tp2.period_name, tp1.period_name, null, '' - '' || tp2.period_name) COL01
333: ,fnd_date.date_to_displaydate(tp1.end_date,2) COL04 -- change as per bug 11830805
334: ,fnd_date.date_to_displaydate(pa2.effective_date,2) COL03 -- change as per bug 11830805
335: ,fnd_date.date_to_displaydate(aa1.start_date,2) COL05 -- change as per bug 11830805
336: ,fnd_date.date_to_displaydate(aa2.end_date,2) COL06 -- change as per bug 11830805
337: ,fnd_date.date_to_displaydate(tp1.start_date,2) COL02 -- change as per bug 11830805
338: ,tp1.period_type COL07
339: from pay_all_payrolls_f pp1
340: ,pay_all_payrolls_f pp2
333: ,fnd_date.date_to_displaydate(tp1.end_date,2) COL04 -- change as per bug 11830805
334: ,fnd_date.date_to_displaydate(pa2.effective_date,2) COL03 -- change as per bug 11830805
335: ,fnd_date.date_to_displaydate(aa1.start_date,2) COL05 -- change as per bug 11830805
336: ,fnd_date.date_to_displaydate(aa2.end_date,2) COL06 -- change as per bug 11830805
337: ,fnd_date.date_to_displaydate(tp1.start_date,2) COL02 -- change as per bug 11830805
338: ,tp1.period_type COL07
339: from pay_all_payrolls_f pp1
340: ,pay_all_payrolls_f pp2
341: ,pay_payroll_actions pa1
372: and pp2.effective_end_date';
373: else
374: l_sql :=
375: 'select tp.period_name COL01
376: ,fnd_date.date_to_displaydate(tp.end_date,2) COL04 -- change as per bug 11830805
377: ,fnd_date.date_to_displaydate(pa.effective_date,2) COL03 -- change as per bug 11830805
378: ,fnd_date.date_to_displaydate(aa.start_date,2) COL05 -- change as per bug 11830805
379: ,fnd_date.date_to_displaydate(aa.end_date,2) COL06 -- change as per bug 11830805
380: ,fnd_date.date_to_displaydate(tp.start_date,2) COL02 -- change as per bug 11830805
373: else
374: l_sql :=
375: 'select tp.period_name COL01
376: ,fnd_date.date_to_displaydate(tp.end_date,2) COL04 -- change as per bug 11830805
377: ,fnd_date.date_to_displaydate(pa.effective_date,2) COL03 -- change as per bug 11830805
378: ,fnd_date.date_to_displaydate(aa.start_date,2) COL05 -- change as per bug 11830805
379: ,fnd_date.date_to_displaydate(aa.end_date,2) COL06 -- change as per bug 11830805
380: ,fnd_date.date_to_displaydate(tp.start_date,2) COL02 -- change as per bug 11830805
381: ,tp.period_type COL07
374: l_sql :=
375: 'select tp.period_name COL01
376: ,fnd_date.date_to_displaydate(tp.end_date,2) COL04 -- change as per bug 11830805
377: ,fnd_date.date_to_displaydate(pa.effective_date,2) COL03 -- change as per bug 11830805
378: ,fnd_date.date_to_displaydate(aa.start_date,2) COL05 -- change as per bug 11830805
379: ,fnd_date.date_to_displaydate(aa.end_date,2) COL06 -- change as per bug 11830805
380: ,fnd_date.date_to_displaydate(tp.start_date,2) COL02 -- change as per bug 11830805
381: ,tp.period_type COL07
382: from pay_payroll_actions pa
375: 'select tp.period_name COL01
376: ,fnd_date.date_to_displaydate(tp.end_date,2) COL04 -- change as per bug 11830805
377: ,fnd_date.date_to_displaydate(pa.effective_date,2) COL03 -- change as per bug 11830805
378: ,fnd_date.date_to_displaydate(aa.start_date,2) COL05 -- change as per bug 11830805
379: ,fnd_date.date_to_displaydate(aa.end_date,2) COL06 -- change as per bug 11830805
380: ,fnd_date.date_to_displaydate(tp.start_date,2) COL02 -- change as per bug 11830805
381: ,tp.period_type COL07
382: from pay_payroll_actions pa
383: ,per_time_periods tp
376: ,fnd_date.date_to_displaydate(tp.end_date,2) COL04 -- change as per bug 11830805
377: ,fnd_date.date_to_displaydate(pa.effective_date,2) COL03 -- change as per bug 11830805
378: ,fnd_date.date_to_displaydate(aa.start_date,2) COL05 -- change as per bug 11830805
379: ,fnd_date.date_to_displaydate(aa.end_date,2) COL06 -- change as per bug 11830805
380: ,fnd_date.date_to_displaydate(tp.start_date,2) COL02 -- change as per bug 11830805
381: ,tp.period_type COL07
382: from pay_payroll_actions pa
383: ,per_time_periods tp
384: ,pay_assignment_actions aa
391: end if;
392: else
393: l_sql :=
394: 'select tp.period_name COL01
395: ,fnd_date.date_to_displaydate(tp.end_date,2) COL04 -- change as per bug 11830805
396: ,fnd_date.date_to_displaydate(pa.effective_date,2) COL03 -- change as per bug 11830805
397: ,fnd_date.date_to_displaydate(aa.start_date,2) COL05 -- change as per bug 11830805
398: ,fnd_date.date_to_displaydate(aa.end_date,2) COL06 -- change as per bug 11830805
399: ,fnd_date.date_to_displaydate(tp.start_date,2) COL02 -- change as per bug 11830805
392: else
393: l_sql :=
394: 'select tp.period_name COL01
395: ,fnd_date.date_to_displaydate(tp.end_date,2) COL04 -- change as per bug 11830805
396: ,fnd_date.date_to_displaydate(pa.effective_date,2) COL03 -- change as per bug 11830805
397: ,fnd_date.date_to_displaydate(aa.start_date,2) COL05 -- change as per bug 11830805
398: ,fnd_date.date_to_displaydate(aa.end_date,2) COL06 -- change as per bug 11830805
399: ,fnd_date.date_to_displaydate(tp.start_date,2) COL02 -- change as per bug 11830805
400: ,tp.period_type COL07
393: l_sql :=
394: 'select tp.period_name COL01
395: ,fnd_date.date_to_displaydate(tp.end_date,2) COL04 -- change as per bug 11830805
396: ,fnd_date.date_to_displaydate(pa.effective_date,2) COL03 -- change as per bug 11830805
397: ,fnd_date.date_to_displaydate(aa.start_date,2) COL05 -- change as per bug 11830805
398: ,fnd_date.date_to_displaydate(aa.end_date,2) COL06 -- change as per bug 11830805
399: ,fnd_date.date_to_displaydate(tp.start_date,2) COL02 -- change as per bug 11830805
400: ,tp.period_type COL07
401: from pay_payroll_actions pa
394: 'select tp.period_name COL01
395: ,fnd_date.date_to_displaydate(tp.end_date,2) COL04 -- change as per bug 11830805
396: ,fnd_date.date_to_displaydate(pa.effective_date,2) COL03 -- change as per bug 11830805
397: ,fnd_date.date_to_displaydate(aa.start_date,2) COL05 -- change as per bug 11830805
398: ,fnd_date.date_to_displaydate(aa.end_date,2) COL06 -- change as per bug 11830805
399: ,fnd_date.date_to_displaydate(tp.start_date,2) COL02 -- change as per bug 11830805
400: ,tp.period_type COL07
401: from pay_payroll_actions pa
402: ,per_time_periods tp
395: ,fnd_date.date_to_displaydate(tp.end_date,2) COL04 -- change as per bug 11830805
396: ,fnd_date.date_to_displaydate(pa.effective_date,2) COL03 -- change as per bug 11830805
397: ,fnd_date.date_to_displaydate(aa.start_date,2) COL05 -- change as per bug 11830805
398: ,fnd_date.date_to_displaydate(aa.end_date,2) COL06 -- change as per bug 11830805
399: ,fnd_date.date_to_displaydate(tp.start_date,2) COL02 -- change as per bug 11830805
400: ,tp.period_type COL07
401: from pay_payroll_actions pa
402: ,per_time_periods tp
403: ,pay_assignment_actions aa