112: begin
113: --
114: l_proc := c_package || 'transfer_asg';
115: --
116: hr_utility.set_location('Entering : ' || l_proc, 10);
117: --
118: hr_utility.trace('********************');
119: hr_utility.trace('assignment_id : ' || to_char(p_assignment_id));
120: hr_utility.trace('assignment_number : ' || p_assignment_number);
114: l_proc := c_package || 'transfer_asg';
115: --
116: hr_utility.set_location('Entering : ' || l_proc, 10);
117: --
118: hr_utility.trace('********************');
119: hr_utility.trace('assignment_id : ' || to_char(p_assignment_id));
120: hr_utility.trace('assignment_number : ' || p_assignment_number);
121: hr_utility.trace('upload_date : ' || to_char(p_upload_date));
122: --
115: --
116: hr_utility.set_location('Entering : ' || l_proc, 10);
117: --
118: hr_utility.trace('********************');
119: hr_utility.trace('assignment_id : ' || to_char(p_assignment_id));
120: hr_utility.trace('assignment_number : ' || p_assignment_number);
121: hr_utility.trace('upload_date : ' || to_char(p_upload_date));
122: --
123: -- Derive commutation allowance information from PAY_ELEMENT_ENTRIES_F.
116: hr_utility.set_location('Entering : ' || l_proc, 10);
117: --
118: hr_utility.trace('********************');
119: hr_utility.trace('assignment_id : ' || to_char(p_assignment_id));
120: hr_utility.trace('assignment_number : ' || p_assignment_number);
121: hr_utility.trace('upload_date : ' || to_char(p_upload_date));
122: --
123: -- Derive commutation allowance information from PAY_ELEMENT_ENTRIES_F.
124: --
117: --
118: hr_utility.trace('********************');
119: hr_utility.trace('assignment_id : ' || to_char(p_assignment_id));
120: hr_utility.trace('assignment_number : ' || p_assignment_number);
121: hr_utility.trace('upload_date : ' || to_char(p_upload_date));
122: --
123: -- Derive commutation allowance information from PAY_ELEMENT_ENTRIES_F.
124: --
125: pay_jp_bee_utility_pkg.get_ee(
161: p_effective_date => p_upload_date), 'N');
162: end if;
163:
164: --
165: hr_utility.trace('non_res_flag : ' || l_non_res_flag);
166: --
167: -- Derive commutation allowance information from element entries.
168: --
169: per_jp_cma_utility_pkg.get_cma_info(
177: --
178: -- If there're multiple traffic tool record, skip processing for current assignment and output log.
179: --
180: if l_cma_rec.multiple_entry_warning then
181: hr_utility.trace('Multiple car. Skip processing');
182: raise multiple_traffic_tool_rec;
183: end if;
184: --
185: if (l_ee_rec.element_entry_id is not null) or (l_record_exist) then
225: --
226: -- Write to output file
227: --
228: if l_ee_rec.element_entry_id is null then
229: hr_utility.trace('EE not exist. Create EE.');
230: --
231: -- If element does not exist, "Insert" mode.
232: -- Also output all entry values to be transfered.
233: --
233: --
234: l_change_type := 'I';
235: l_write_all := true;
236: else
237: hr_utility.trace('EE exists. Compare Start.');
238: --
239: -- Since the element is nonrecurring type, "Correction" mode.
240: -- In this case, only the entry values to be changed are shown in output file.
241: --
254: --
255: /* bug.5438168. commented out.
256: l_index := l_new_value_tbl.first;
257: while l_index is not null loop
258: hr_utility.trace('Set zero' || to_char(l_index));
259: --
260: if l_new_value_tbl(l_index) is null then
261: l_new_value_tbl(l_index) := c_value_if_null_tbl(l_index);
262: end if;
279: commit;
280: end if;
281: end if;
282: --
283: hr_utility.set_location('Leaving : ' || l_proc, 20);
284: exception
285: when multiple_traffic_tool_rec then
286: pay_jp_bee_utility_pkg.log(
287: p_full_name => p_full_name,
291: p_token1 => 'EFFECTIVE_DATE',
292: p_value1 => fnd_date.date_to_chardate(p_effective_date));
293: create_asg_set_amd;
294: --
295: hr_utility.set_location('Leaving : ' || l_proc, 26);
296: --
297: when others then
298: --
299: pay_jp_bee_utility_pkg.log(
303: p_message_name => '',
304: p_token1 => 'ERROR',
305: p_value1 => to_char(sqlcode)||':'||substrb(sqlerrm,1,100));
306: --
307: hr_utility.trace('transfer_asg ass num : ' || p_assignment_number);
308: --
309: hr_utility.trace('transfer_asg erro code : ' || to_char(sqlcode));
310: hr_utility.trace('transfer_asg erro msg : ' || substrb(sqlerrm,1,100));
311: --
305: p_value1 => to_char(sqlcode)||':'||substrb(sqlerrm,1,100));
306: --
307: hr_utility.trace('transfer_asg ass num : ' || p_assignment_number);
308: --
309: hr_utility.trace('transfer_asg erro code : ' || to_char(sqlcode));
310: hr_utility.trace('transfer_asg erro msg : ' || substrb(sqlerrm,1,100));
311: --
312: hr_utility.set_location('Leaving : ' || l_proc, 30);
313: --
306: --
307: hr_utility.trace('transfer_asg ass num : ' || p_assignment_number);
308: --
309: hr_utility.trace('transfer_asg erro code : ' || to_char(sqlcode));
310: hr_utility.trace('transfer_asg erro msg : ' || substrb(sqlerrm,1,100));
311: --
312: hr_utility.set_location('Leaving : ' || l_proc, 30);
313: --
314: end transfer_asg;
308: --
309: hr_utility.trace('transfer_asg erro code : ' || to_char(sqlcode));
310: hr_utility.trace('transfer_asg erro msg : ' || substrb(sqlerrm,1,100));
311: --
312: hr_utility.set_location('Leaving : ' || l_proc, 30);
313: --
314: end transfer_asg;
315: -- ----------------------------------------------------------------------------
316: -- |---------------------< transfer_from_cma_info_to_bee >--------------------|
360: l_upload_date := fnd_date.canonical_to_date(p_upload_date);
361: --
362: l_date_effective_changes := p_date_effective_changes;
363: --
364: hr_utility.set_location('Entering : ' || l_proc, 10);
365: --
366: -- Validate p_time_period_id and p_upload_date
367: --
368: pay_jp_bee_utility_pkg.chk_upload_date(
413: p_batch_id => l_batch_id,
414: p_object_version_number => l_batch_ovn);
415: commit;
416: --
417: hr_utility.trace('batch_id : ' || to_char(l_batch_id));
418: --
419: -- Initialize Global Variables
420: --
421: g_element_type_id := hr_jp_id_pkg.element_type_id(c_cma_ele_name, p_business_group_id);
477: --
478: -- When no batch lines are created, delete batch header and set message as errbuf.
479: --
480: if pay_jp_bee_utility_pkg.g_num_of_outs = 0 then
481: hr_utility.trace('BEE Header deleted');
482: --
483: pay_batch_element_entry_api.delete_batch_header(
484: p_validate => false,
485: p_batch_id => l_batch_id,
500: end if;
501: --
502: delete_session;
503: --
504: hr_utility.trace('retcode : ' || p_retcode);
505: hr_utility.trace('errbuf : ' || p_errbuf);
506: hr_utility.set_location('Leaving : ' || l_proc, 20);
507: end transfer_from_cma_info_to_bee;
508: --
501: --
502: delete_session;
503: --
504: hr_utility.trace('retcode : ' || p_retcode);
505: hr_utility.trace('errbuf : ' || p_errbuf);
506: hr_utility.set_location('Leaving : ' || l_proc, 20);
507: end transfer_from_cma_info_to_bee;
508: --
509: end pay_jp_create_cma_pkg;
502: delete_session;
503: --
504: hr_utility.trace('retcode : ' || p_retcode);
505: hr_utility.trace('errbuf : ' || p_errbuf);
506: hr_utility.set_location('Leaving : ' || l_proc, 20);
507: end transfer_from_cma_info_to_bee;
508: --
509: end pay_jp_create_cma_pkg;