37: and business_group_id = p_target_business_group_id;
38: --
39: Begin
40:
41: hr_utility.set_location('Entering:'|| g_package||l_proc, 5);
42:
43: Open get_txn_category_id;
44: Fetch get_txn_category_id into p_transaction_category_id;
45: hr_utility.trace('Transaction Category Id :'|| p_transaction_category_id);
41: hr_utility.set_location('Entering:'|| g_package||l_proc, 5);
42:
43: Open get_txn_category_id;
44: Fetch get_txn_category_id into p_transaction_category_id;
45: hr_utility.trace('Transaction Category Id :'|| p_transaction_category_id);
46: hr_utility.set_location('Opening cursor get_copy_txn_id '||l_proc, 10);
47: --dbms_output.put_line('txn category id '||p_transaction_category_id);
48:
49: Open get_copy_txn_id;
42:
43: Open get_txn_category_id;
44: Fetch get_txn_category_id into p_transaction_category_id;
45: hr_utility.trace('Transaction Category Id :'|| p_transaction_category_id);
46: hr_utility.set_location('Opening cursor get_copy_txn_id '||l_proc, 10);
47: --dbms_output.put_line('txn category id '||p_transaction_category_id);
48:
49: Open get_copy_txn_id;
50: fetch get_copy_txn_id into p_copy_entity_txn_id;
50: fetch get_copy_txn_id into p_copy_entity_txn_id;
51: If get_copy_txn_id%notfound then
52: Raise Nothing_to_do;
53: End If;
54: hr_utility.trace('Copy entity Txn. Id :'|| p_copy_entity_txn_id);
55: --dbms_output.put_line('copy_entity_txn_id :'||p_copy_entity_txn_id );
56:
57:
58: -- Set the variables
88: End If;
89: If get_copy_txn_id%ISOPEN then
90: CLOSE get_copy_txn_id;
91: End If;
92: hr_utility.set_location('Leaving :'|| g_package||l_proc, 50);
93:
94: Exception
95: When Nothing_to_do Then
96: If get_txn_category_id%ISOPEN then
106: End If;
107: If get_copy_txn_id%ISOPEN then
108: CLOSE get_copy_txn_id;
109: End If;
110: hr_utility.set_location('Leaving :'|| g_package||l_proc, 70);
111: Raise;
112: End create_tspc_program_and_plans;
113:
114:
135: Nothing_To_Do Exception;
136:
137:
138: Begin
139: hr_utility.set_location('entering :'|| g_package||l_proc, 10);
140: hr_utility.trace('Business Group Id ' ||p_target_business_group_id);
141: --Check if TSP program is installed before implementing catchUP.
142: --If TSP open is not installed then TSP CatchUP should not run.
143: p_tsp_exists := 'N';
136:
137:
138: Begin
139: hr_utility.set_location('entering :'|| g_package||l_proc, 10);
140: hr_utility.trace('Business Group Id ' ||p_target_business_group_id);
141: --Check if TSP program is installed before implementing catchUP.
142: --If TSP open is not installed then TSP CatchUP should not run.
143: p_tsp_exists := 'N';
144: For check_pgm_tsp_exists in c_check_pgm_tsp_exists loop
163:
164: savepoint create_tspc_plan_design;
165: --dbms_output.put_line('now starting plan design ' ||p_target_business_group_id);
166: create_tspc_program_and_plans(p_target_business_group_id);
167: hr_utility.trace('After create_program_and_plans....');
168: commit;
169: If check_pgm_exists%ISOPEN then
170: CLOSE check_pgm_exists;
171: End If;
168: commit;
169: If check_pgm_exists%ISOPEN then
170: CLOSE check_pgm_exists;
171: End If;
172: hr_utility.set_location('Leaving :'|| g_package||l_proc, 50);
173: Exception
174: When Nothing_to_do Then
175: If check_pgm_exists%ISOPEN then
176: CLOSE check_pgm_exists;
185: When others then
186: If check_pgm_exists%ISOPEN then
187: CLOSE check_pgm_exists;
188: End If;
189: hr_utility.set_location('Leaving :'|| g_package||l_proc, 60);
190: hr_utility.trace('Error ' ||sqlerrm(sqlcode));
191: l_err_msg := substr(p_target_business_group_id||':'||nvl(fnd_message.get,sqlerrm),1,1999) ;
192: rollback to create_tspc_plan_design;
193: ghr_wgi_pkg.create_ghr_errorlog
186: If check_pgm_exists%ISOPEN then
187: CLOSE check_pgm_exists;
188: End If;
189: hr_utility.set_location('Leaving :'|| g_package||l_proc, 60);
190: hr_utility.trace('Error ' ||sqlerrm(sqlcode));
191: l_err_msg := substr(p_target_business_group_id||':'||nvl(fnd_message.get,sqlerrm),1,1999) ;
192: rollback to create_tspc_plan_design;
193: ghr_wgi_pkg.create_ghr_errorlog
194: (p_program_name => l_proc,
281:
282: Cursor c_get_details is
283: select * from per_time_periods where rowid = l_row_id;
284: Begin
285: hr_utility.set_location('entering :'|| g_package||l_proc, 10);
286:
287: l_date_start := nvl(fnd_date.canonical_to_date(p_date_start),hr_api.g_sot);
288: l_date_to := nvl(fnd_date.canonical_to_date(p_date_to),hr_api.g_eot);
289:
286:
287: l_date_start := nvl(fnd_date.canonical_to_date(p_date_start),hr_api.g_sot);
288: l_date_to := nvl(fnd_date.canonical_to_date(p_date_to),hr_api.g_eot);
289:
290: hr_utility.set_location( g_package||l_proc, 20);
291: for get_rowid in c_get_rowid loop
292: l_row_id := get_rowid.ROWID;
293:
294: hr_utility.set_location( g_package||l_proc, 30);
290: hr_utility.set_location( g_package||l_proc, 20);
291: for get_rowid in c_get_rowid loop
292: l_row_id := get_rowid.ROWID;
293:
294: hr_utility.set_location( g_package||l_proc, 30);
295: for get_details in c_get_details loop
296: l_tprec := get_details;
297: hr_utility.set_location( g_package||l_proc, 40);
298: per_time_periods_pkg.update_row
293:
294: hr_utility.set_location( g_package||l_proc, 30);
295: for get_details in c_get_details loop
296: l_tprec := get_details;
297: hr_utility.set_location( g_package||l_proc, 40);
298: per_time_periods_pkg.update_row
299: (X_Rowid => l_row_id,
300: X_Time_Period_Id => l_tprec.time_period_id,
301: X_Payroll_Id => l_tprec.payroll_id ,
372: X_Payslip_view_Date => l_tprec.payslip_view_date
373: );
374: End loop;
375: End Loop;
376: hr_utility.set_location('leaving :'|| g_package||l_proc, 50);
377: Exception
378: when others then
379: hr_utility.set_location('Error Leaving :'|| g_package||l_proc, 100);
380: hr_utility.trace('Error ' ||sqlerrm(sqlcode));
375: End Loop;
376: hr_utility.set_location('leaving :'|| g_package||l_proc, 50);
377: Exception
378: when others then
379: hr_utility.set_location('Error Leaving :'|| g_package||l_proc, 100);
380: hr_utility.trace('Error ' ||sqlerrm(sqlcode));
381: End update_alternate_check_date;
382: end ghr_tsp_catchup_plan_design;
376: hr_utility.set_location('leaving :'|| g_package||l_proc, 50);
377: Exception
378: when others then
379: hr_utility.set_location('Error Leaving :'|| g_package||l_proc, 100);
380: hr_utility.trace('Error ' ||sqlerrm(sqlcode));
381: End update_alternate_check_date;
382: end ghr_tsp_catchup_plan_design;