181: INSERT INTO fnd_sessions(SESSION_ID,EFFECTIVE_DATE)
182: VALUES(userenv('SESSIONID'),fnd_date.canonical_to_date(p_effective_date)) ;
183:
184:
185: hr_utility.set_location('p_file_name '||p_file_name,1);
186: hr_utility.set_location('p_effective_date '||p_effective_date,1);
187: hr_utility.set_location('p_business_group_id '||p_business_group_id,1 );
188: hr_utility.set_location('p_batch_name '||p_batch_name,1);
189:
182: VALUES(userenv('SESSIONID'),fnd_date.canonical_to_date(p_effective_date)) ;
183:
184:
185: hr_utility.set_location('p_file_name '||p_file_name,1);
186: hr_utility.set_location('p_effective_date '||p_effective_date,1);
187: hr_utility.set_location('p_business_group_id '||p_business_group_id,1 );
188: hr_utility.set_location('p_batch_name '||p_batch_name,1);
189:
190: hr_utility.set_location ( 'Entering:' || l_proc, 10);
183:
184:
185: hr_utility.set_location('p_file_name '||p_file_name,1);
186: hr_utility.set_location('p_effective_date '||p_effective_date,1);
187: hr_utility.set_location('p_business_group_id '||p_business_group_id,1 );
188: hr_utility.set_location('p_batch_name '||p_batch_name,1);
189:
190: hr_utility.set_location ( 'Entering:' || l_proc, 10);
191:
184:
185: hr_utility.set_location('p_file_name '||p_file_name,1);
186: hr_utility.set_location('p_effective_date '||p_effective_date,1);
187: hr_utility.set_location('p_business_group_id '||p_business_group_id,1 );
188: hr_utility.set_location('p_batch_name '||p_batch_name,1);
189:
190: hr_utility.set_location ( 'Entering:' || l_proc, 10);
191:
192: OPEN csr_leg (p_business_group_id);
186: hr_utility.set_location('p_effective_date '||p_effective_date,1);
187: hr_utility.set_location('p_business_group_id '||p_business_group_id,1 );
188: hr_utility.set_location('p_batch_name '||p_batch_name,1);
189:
190: hr_utility.set_location ( 'Entering:' || l_proc, 10);
191:
192: OPEN csr_leg (p_business_group_id);
193: FETCH csr_leg INTO l_legislation_code, l_bg_name;
194: CLOSE csr_leg;
191:
192: OPEN csr_leg (p_business_group_id);
193: FETCH csr_leg INTO l_legislation_code, l_bg_name;
194: CLOSE csr_leg;
195: hr_utility.set_location ( 'Legislation = ' || l_legislation_code, 20);
196:
197: l_filename := p_file_name;
198: fnd_profile.get (c_data_exchange_dir, l_location);
199: hr_utility.set_location ( 'Directory = ' || l_location, 30);
195: hr_utility.set_location ( 'Legislation = ' || l_legislation_code, 20);
196:
197: l_filename := p_file_name;
198: fnd_profile.get (c_data_exchange_dir, l_location);
199: hr_utility.set_location ( 'Directory = ' || l_location, 30);
200:
201: IF l_location IS NULL
202: THEN
203: -- error : I/O directory not defined
213: (p_batch_name => p_batch_name,
214: p_business_group_name => l_bg_name,
215: p_reference => substr(p_reference||'('||fnd_date.date_to_displaydt(SYSDATE)||')',1,30));
216:
217: hr_utility.set_location ( ' Batch ID = ' || l_batch_id, 40);
218:
219: -- Loop over the file, reading in each line. GET_LINE will
220: -- raise NO_DATA_FOUND when it is done, so we use that as the
221: -- exit condition for the loop
233: THEN
234: UTL_FILE.fclose (l_file_type);
235: END IF;
236:
237: hr_utility.set_location (l_proc, 300);
238: retcode := c_error;
239: -- The error will mean batch_seq doesn't get upped so add 1 when
240: -- reporting line
241: errbuf := 'Input line (line nr = '
249: THEN
250: EXIT;
251: END;
252:
253: hr_utility.set_location ( ' line read: '
254: || SUBSTR (l_line_read, 1, 44),50);
255:
256: BEGIN
257:
279: ,p_entry_value15 => l_entry_value15
280: ,p_return_value1 => l_ni
281: ,p_return_value2 => l_employer_org_no);
282:
283: hr_utility.set_location ( ' NI Number = ' || l_ni, 60);
284: hr_utility.set_location ( ' Employer Organization Number = ' || l_employer_org_no, 60);
285:
286: /* 115.8 Changes
287:
280: ,p_return_value1 => l_ni
281: ,p_return_value2 => l_employer_org_no);
282:
283: hr_utility.set_location ( ' NI Number = ' || l_ni, 60);
284: hr_utility.set_location ( ' Employer Organization Number = ' || l_employer_org_no, 60);
285:
286: /* 115.8 Changes
287:
288: -- for Bug Fix 4202359
293: ,p_ni => l_ni
294: ) ;
295: FETCH csr_get_prim_assg INTO l_assignment_id;
296: IF csr_get_prim_assg%FOUND THEN
297: hr_utility.set_location ( ' The Employee has a active primary Assignment where tax table type is P' , 60);
298: RAISE e_active_assg_error;
299: ELSE
300: NULL;
301: END IF;
313: ,p_ni => l_ni
314: ) ;
315: FETCH csr_get_prim_assg INTO l_assignment_id;
316: IF csr_get_prim_assg%NOTFOUND THEN
317: hr_utility.set_location ( ' The Employee Does not have a primary Assignment ' , 60);
318: RAISE e_prim_assg_error;
319: END IF;
320: CLOSE csr_get_prim_assg;
321:
364: CLOSE csr_get_element_details;
365:
366: l_element_link_id := get_element_link_id(l_assignment_id ,p_business_group_id,p_effective_date,'Tax Card');
367:
368: hr_utility.set_location ( ' The Element Staus = '||l_element_link_found , 70);
369: hr_utility.set_location ( ' Element Entry ID = ' || l_element_entry_id, 70);
370: hr_utility.set_location ( ' Element Name = ' || l_element_name, 70);
371: hr_utility.set_location ( ' Element Entry Start Date = '||l_effective_start_date, 70);
372: hr_utility.set_location ( ' Element Entry End Date = '||l_effective_end_date, 70);
365:
366: l_element_link_id := get_element_link_id(l_assignment_id ,p_business_group_id,p_effective_date,'Tax Card');
367:
368: hr_utility.set_location ( ' The Element Staus = '||l_element_link_found , 70);
369: hr_utility.set_location ( ' Element Entry ID = ' || l_element_entry_id, 70);
370: hr_utility.set_location ( ' Element Name = ' || l_element_name, 70);
371: hr_utility.set_location ( ' Element Entry Start Date = '||l_effective_start_date, 70);
372: hr_utility.set_location ( ' Element Entry End Date = '||l_effective_end_date, 70);
373: hr_utility.set_location ( ' Element Link ID = ' || l_element_link_id, 70);
366: l_element_link_id := get_element_link_id(l_assignment_id ,p_business_group_id,p_effective_date,'Tax Card');
367:
368: hr_utility.set_location ( ' The Element Staus = '||l_element_link_found , 70);
369: hr_utility.set_location ( ' Element Entry ID = ' || l_element_entry_id, 70);
370: hr_utility.set_location ( ' Element Name = ' || l_element_name, 70);
371: hr_utility.set_location ( ' Element Entry Start Date = '||l_effective_start_date, 70);
372: hr_utility.set_location ( ' Element Entry End Date = '||l_effective_end_date, 70);
373: hr_utility.set_location ( ' Element Link ID = ' || l_element_link_id, 70);
374:
367:
368: hr_utility.set_location ( ' The Element Staus = '||l_element_link_found , 70);
369: hr_utility.set_location ( ' Element Entry ID = ' || l_element_entry_id, 70);
370: hr_utility.set_location ( ' Element Name = ' || l_element_name, 70);
371: hr_utility.set_location ( ' Element Entry Start Date = '||l_effective_start_date, 70);
372: hr_utility.set_location ( ' Element Entry End Date = '||l_effective_end_date, 70);
373: hr_utility.set_location ( ' Element Link ID = ' || l_element_link_id, 70);
374:
375:
368: hr_utility.set_location ( ' The Element Staus = '||l_element_link_found , 70);
369: hr_utility.set_location ( ' Element Entry ID = ' || l_element_entry_id, 70);
370: hr_utility.set_location ( ' Element Name = ' || l_element_name, 70);
371: hr_utility.set_location ( ' Element Entry Start Date = '||l_effective_start_date, 70);
372: hr_utility.set_location ( ' Element Entry End Date = '||l_effective_end_date, 70);
373: hr_utility.set_location ( ' Element Link ID = ' || l_element_link_id, 70);
374:
375:
376: -- Add User Keys for Data Pump
369: hr_utility.set_location ( ' Element Entry ID = ' || l_element_entry_id, 70);
370: hr_utility.set_location ( ' Element Name = ' || l_element_name, 70);
371: hr_utility.set_location ( ' Element Entry Start Date = '||l_effective_start_date, 70);
372: hr_utility.set_location ( ' Element Entry End Date = '||l_effective_end_date, 70);
373: hr_utility.set_location ( ' Element Link ID = ' || l_element_link_id, 70);
374:
375:
376: -- Add User Keys for Data Pump
377: l_ee_user_key:=NULL;
389: -- Add user key only if it does not exist previously
390:
391: IF csr_get_user_key%NOTFOUND THEN
392: hr_pump_utils.add_user_key(l_ee_user_key,l_element_entry_id);
393: hr_utility.set_location ( ' User Key added ' , 190);
394: ELSE
395: hr_pump_utils.modify_user_key(l_ee_user_key,l_ee_user_key,l_element_entry_id);
396: hr_utility.set_location ( ' User Key modified ' , 190.1);
397: END IF;
392: hr_pump_utils.add_user_key(l_ee_user_key,l_element_entry_id);
393: hr_utility.set_location ( ' User Key added ' , 190);
394: ELSE
395: hr_pump_utils.modify_user_key(l_ee_user_key,l_ee_user_key,l_element_entry_id);
396: hr_utility.set_location ( ' User Key modified ' , 190.1);
397: END IF;
398: CLOSE csr_get_user_key;
399:
400: hr_utility.set_location ( ' User Key added ' , 80);
396: hr_utility.set_location ( ' User Key modified ' , 190.1);
397: END IF;
398: CLOSE csr_get_user_key;
399:
400: hr_utility.set_location ( ' User Key added ' , 80);
401:
402: hr_utility.set_location ( ' l_effective_start_date:' || to_char(l_effective_start_date), 90);
403: hr_utility.set_location ( ' l_effective_end_date:' || to_char(l_effective_end_date), 90);
404: hr_utility.set_location ( ' p_effective_date:' || to_char(fnd_date.canonical_to_date(p_effective_date)), 90);
398: CLOSE csr_get_user_key;
399:
400: hr_utility.set_location ( ' User Key added ' , 80);
401:
402: hr_utility.set_location ( ' l_effective_start_date:' || to_char(l_effective_start_date), 90);
403: hr_utility.set_location ( ' l_effective_end_date:' || to_char(l_effective_end_date), 90);
404: hr_utility.set_location ( ' p_effective_date:' || to_char(fnd_date.canonical_to_date(p_effective_date)), 90);
405: hr_utility.set_location ( ' c_end_of_time:' || to_char(c_end_of_time), 90);
406:
399:
400: hr_utility.set_location ( ' User Key added ' , 80);
401:
402: hr_utility.set_location ( ' l_effective_start_date:' || to_char(l_effective_start_date), 90);
403: hr_utility.set_location ( ' l_effective_end_date:' || to_char(l_effective_end_date), 90);
404: hr_utility.set_location ( ' p_effective_date:' || to_char(fnd_date.canonical_to_date(p_effective_date)), 90);
405: hr_utility.set_location ( ' c_end_of_time:' || to_char(c_end_of_time), 90);
406:
407: -- Define Datetrack Updation Mode
400: hr_utility.set_location ( ' User Key added ' , 80);
401:
402: hr_utility.set_location ( ' l_effective_start_date:' || to_char(l_effective_start_date), 90);
403: hr_utility.set_location ( ' l_effective_end_date:' || to_char(l_effective_end_date), 90);
404: hr_utility.set_location ( ' p_effective_date:' || to_char(fnd_date.canonical_to_date(p_effective_date)), 90);
405: hr_utility.set_location ( ' c_end_of_time:' || to_char(c_end_of_time), 90);
406:
407: -- Define Datetrack Updation Mode
408: IF(l_effective_start_date = fnd_date.canonical_to_date(p_effective_date))
401:
402: hr_utility.set_location ( ' l_effective_start_date:' || to_char(l_effective_start_date), 90);
403: hr_utility.set_location ( ' l_effective_end_date:' || to_char(l_effective_end_date), 90);
404: hr_utility.set_location ( ' p_effective_date:' || to_char(fnd_date.canonical_to_date(p_effective_date)), 90);
405: hr_utility.set_location ( ' c_end_of_time:' || to_char(c_end_of_time), 90);
406:
407: -- Define Datetrack Updation Mode
408: IF(l_effective_start_date = fnd_date.canonical_to_date(p_effective_date))
409: THEN
414: ELSE
415: l_datetrack_update_mode := 'UPDATE';
416: END IF;
417:
418: hr_utility.set_location ( ' Datetrack Update Mode:' || l_datetrack_update_mode, 90);
419:
420:
421: -- Data Pump procedure called to create batch lines to update element entries
422: hrdpp_update_element_entry.insert_batch_lines
457: ,P_INPUT_VALUE_NAME13 =>l_input_value_name13
458: ,P_INPUT_VALUE_NAME14 =>l_input_value_name14
459: ,P_INPUT_VALUE_NAME15 =>l_input_value_name15);
460:
461: hr_utility.set_location ( ' Batch Lines created for Element Updation: ' , 100);
462: ELSE
463:
464:
465:
538: ,P_INPUT_VALUE_NAME14 =>l_input_value_name14
539: ,P_INPUT_VALUE_NAME15 =>l_input_value_name15);
540:
541:
542: hr_utility.set_location ( ' Batch Lines created for Element Creation: ' , 100);
543:
544: END IF;
545:
546: hr_utility.set_location ( ' Batch Lines created ' , 100);
542: hr_utility.set_location ( ' Batch Lines created for Element Creation: ' , 100);
543:
544: END IF;
545:
546: hr_utility.set_location ( ' Batch Lines created ' , 100);
547:
548: -- commit the records uppon reaching the commit point
549:
550: IF MOD (l_batch_seq, c_commit_point) = 0
565: -- Set retcode to 1, indicating a WARNING to the ConcMgr
566: retcode := c_warning;
567:
568: -- Set the application error
569: hr_utility.set_message (801, 'PAY_376824_NO_ASSG_NOT_FOUND');
570: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
571: hr_utility.set_message_token (801, 'LINE', l_line_read);
572: hr_utility.set_location (l_proc, 120);
573:
566: retcode := c_warning;
567:
568: -- Set the application error
569: hr_utility.set_message (801, 'PAY_376824_NO_ASSG_NOT_FOUND');
570: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
571: hr_utility.set_message_token (801, 'LINE', l_line_read);
572: hr_utility.set_location (l_proc, 120);
573:
574: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
567:
568: -- Set the application error
569: hr_utility.set_message (801, 'PAY_376824_NO_ASSG_NOT_FOUND');
570: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
571: hr_utility.set_message_token (801, 'LINE', l_line_read);
572: hr_utility.set_location (l_proc, 120);
573:
574: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
575:
568: -- Set the application error
569: hr_utility.set_message (801, 'PAY_376824_NO_ASSG_NOT_FOUND');
570: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
571: hr_utility.set_message_token (801, 'LINE', l_line_read);
572: hr_utility.set_location (l_proc, 120);
573:
574: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
575:
576: -- for Bug Fix 4202359
570: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
571: hr_utility.set_message_token (801, 'LINE', l_line_read);
572: hr_utility.set_location (l_proc, 120);
573:
574: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
575:
576: -- for Bug Fix 4202359
577: WHEN e_active_assg_error
578: -- Active assignment found where table type is 'P' for given NI Number and Organization Number
584: -- Set retcode to 1, indicating a WARNING to the ConcMgr
585: retcode := c_warning;
586:
587: -- Set the application error
588: hr_utility.set_message (801, 'PAY_376834_NO_ACTIVE_ASG_ERR');
589: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
590: hr_utility.set_message_token (801, 'LINE', l_line_read);
591: hr_utility.set_location (l_proc, 120);
592:
585: retcode := c_warning;
586:
587: -- Set the application error
588: hr_utility.set_message (801, 'PAY_376834_NO_ACTIVE_ASG_ERR');
589: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
590: hr_utility.set_message_token (801, 'LINE', l_line_read);
591: hr_utility.set_location (l_proc, 120);
592:
593: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
586:
587: -- Set the application error
588: hr_utility.set_message (801, 'PAY_376834_NO_ACTIVE_ASG_ERR');
589: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
590: hr_utility.set_message_token (801, 'LINE', l_line_read);
591: hr_utility.set_location (l_proc, 120);
592:
593: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
594: -- end of Bug Fix 4202359
587: -- Set the application error
588: hr_utility.set_message (801, 'PAY_376834_NO_ACTIVE_ASG_ERR');
589: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
590: hr_utility.set_message_token (801, 'LINE', l_line_read);
591: hr_utility.set_location (l_proc, 120);
592:
593: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
594: -- end of Bug Fix 4202359
595:
589: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
590: hr_utility.set_message_token (801, 'LINE', l_line_read);
591: hr_utility.set_location (l_proc, 120);
592:
593: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
594: -- end of Bug Fix 4202359
595:
596: -- for Bug Fix 4202271
597: WHEN e_tax_table_type_err
600: -- Set retcode to 1, indicating a WARNING to the ConcMgr
601: retcode := c_warning;
602:
603: -- Set the application error
604: hr_utility.set_message (801, 'PAY_376835_NO_TAX_TAB_TYPE_ERR');
605: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
606: hr_utility.set_message_token (801, 'LINE', l_line_read);
607: hr_utility.set_location (l_proc, 120);
608:
601: retcode := c_warning;
602:
603: -- Set the application error
604: hr_utility.set_message (801, 'PAY_376835_NO_TAX_TAB_TYPE_ERR');
605: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
606: hr_utility.set_message_token (801, 'LINE', l_line_read);
607: hr_utility.set_location (l_proc, 120);
608:
609: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
602:
603: -- Set the application error
604: hr_utility.set_message (801, 'PAY_376835_NO_TAX_TAB_TYPE_ERR');
605: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
606: hr_utility.set_message_token (801, 'LINE', l_line_read);
607: hr_utility.set_location (l_proc, 120);
608:
609: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
610: -- end of Bug Fix 4202271
603: -- Set the application error
604: hr_utility.set_message (801, 'PAY_376835_NO_TAX_TAB_TYPE_ERR');
605: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
606: hr_utility.set_message_token (801, 'LINE', l_line_read);
607: hr_utility.set_location (l_proc, 120);
608:
609: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
610: -- end of Bug Fix 4202271
611:
605: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
606: hr_utility.set_message_token (801, 'LINE', l_line_read);
607: hr_utility.set_location (l_proc, 120);
608:
609: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
610: -- end of Bug Fix 4202271
611:
612:
613:
620: -- Set retcode to 1, indicating a WARNING to the ConcMgr
621: retcode := c_warning;
622:
623: -- Set the application error
624: hr_utility.set_message (801, 'PAY_376827_NO_UNLOGIC_NI_NUM');
625: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
626: hr_utility.set_message_token (801, 'LINE', l_line_read);
627: hr_utility.set_location (l_proc, 120);
628:
621: retcode := c_warning;
622:
623: -- Set the application error
624: hr_utility.set_message (801, 'PAY_376827_NO_UNLOGIC_NI_NUM');
625: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
626: hr_utility.set_message_token (801, 'LINE', l_line_read);
627: hr_utility.set_location (l_proc, 120);
628:
629: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
622:
623: -- Set the application error
624: hr_utility.set_message (801, 'PAY_376827_NO_UNLOGIC_NI_NUM');
625: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
626: hr_utility.set_message_token (801, 'LINE', l_line_read);
627: hr_utility.set_location (l_proc, 120);
628:
629: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
630:
623: -- Set the application error
624: hr_utility.set_message (801, 'PAY_376827_NO_UNLOGIC_NI_NUM');
625: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
626: hr_utility.set_message_token (801, 'LINE', l_line_read);
627: hr_utility.set_location (l_proc, 120);
628:
629: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
630:
631: WHEN e_invalid_signal
625: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
626: hr_utility.set_message_token (801, 'LINE', l_line_read);
627: hr_utility.set_location (l_proc, 120);
628:
629: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
630:
631: WHEN e_invalid_signal
632: -- Invalid SIGNAL Reply from Tax Authority
633: THEN
635: -- Set retcode to 1, indicating a WARNING to the ConcMgr
636: retcode := c_warning;
637:
638: -- Set the application error
639: hr_utility.set_message (801, 'PAY_376832_NO_INVALID_SIGNAL');
640: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
641: hr_utility.set_message_token (801, 'LINE', l_line_read);
642: hr_utility.set_location (l_proc, 120);
643:
636: retcode := c_warning;
637:
638: -- Set the application error
639: hr_utility.set_message (801, 'PAY_376832_NO_INVALID_SIGNAL');
640: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
641: hr_utility.set_message_token (801, 'LINE', l_line_read);
642: hr_utility.set_location (l_proc, 120);
643:
644: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
637:
638: -- Set the application error
639: hr_utility.set_message (801, 'PAY_376832_NO_INVALID_SIGNAL');
640: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
641: hr_utility.set_message_token (801, 'LINE', l_line_read);
642: hr_utility.set_location (l_proc, 120);
643:
644: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
645:
638: -- Set the application error
639: hr_utility.set_message (801, 'PAY_376832_NO_INVALID_SIGNAL');
640: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
641: hr_utility.set_message_token (801, 'LINE', l_line_read);
642: hr_utility.set_location (l_proc, 120);
643:
644: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
645:
646: WHEN e_invalid_percentage
640: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
641: hr_utility.set_message_token (801, 'LINE', l_line_read);
642: hr_utility.set_location (l_proc, 120);
643:
644: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
645:
646: WHEN e_invalid_percentage
647: -- Invalid Tax percentage Reply from Tax Authority
648: THEN
650: -- Set retcode to 1, indicating a WARNING to the ConcMgr
651: retcode := c_warning;
652:
653: -- Set the application error
654: hr_utility.set_message (801, 'PAY_376833_NO_INVALID_PERCENT');
655: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
656: hr_utility.set_message_token (801, 'LINE', l_line_read);
657: hr_utility.set_location (l_proc, 120);
658:
651: retcode := c_warning;
652:
653: -- Set the application error
654: hr_utility.set_message (801, 'PAY_376833_NO_INVALID_PERCENT');
655: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
656: hr_utility.set_message_token (801, 'LINE', l_line_read);
657: hr_utility.set_location (l_proc, 120);
658:
659: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
652:
653: -- Set the application error
654: hr_utility.set_message (801, 'PAY_376833_NO_INVALID_PERCENT');
655: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
656: hr_utility.set_message_token (801, 'LINE', l_line_read);
657: hr_utility.set_location (l_proc, 120);
658:
659: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
660:
653: -- Set the application error
654: hr_utility.set_message (801, 'PAY_376833_NO_INVALID_PERCENT');
655: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
656: hr_utility.set_message_token (801, 'LINE', l_line_read);
657: hr_utility.set_location (l_proc, 120);
658:
659: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
660:
661:
655: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
656: hr_utility.set_message_token (801, 'LINE', l_line_read);
657: hr_utility.set_location (l_proc, 120);
658:
659: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
660:
661:
662:
663:
667: -- Set retcode to 1, indicating a WARNING to the ConcMgr
668: retcode := c_warning;
669:
670: -- Set the application error
671: hr_utility.set_message (801, 'PAY_376825_NO_RECORD_TOO_LONG');
672: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
673: --hr_utility.set_message_token (801, 'LINE', l_line_read);
674: hr_utility.set_location (l_proc, 150);
675:
668: retcode := c_warning;
669:
670: -- Set the application error
671: hr_utility.set_message (801, 'PAY_376825_NO_RECORD_TOO_LONG');
672: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
673: --hr_utility.set_message_token (801, 'LINE', l_line_read);
674: hr_utility.set_location (l_proc, 150);
675:
676: -- Write the message to log file, do not raise an application error but continue
669:
670: -- Set the application error
671: hr_utility.set_message (801, 'PAY_376825_NO_RECORD_TOO_LONG');
672: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
673: --hr_utility.set_message_token (801, 'LINE', l_line_read);
674: hr_utility.set_location (l_proc, 150);
675:
676: -- Write the message to log file, do not raise an application error but continue
677: -- (with next line)
670: -- Set the application error
671: hr_utility.set_message (801, 'PAY_376825_NO_RECORD_TOO_LONG');
672: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
673: --hr_utility.set_message_token (801, 'LINE', l_line_read);
674: hr_utility.set_location (l_proc, 150);
675:
676: -- Write the message to log file, do not raise an application error but continue
677: -- (with next line)
678:
675:
676: -- Write the message to log file, do not raise an application error but continue
677: -- (with next line)
678:
679: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
680:
681: WHEN e_no_tax_link
682: -- Wrong CSR routine
683: THEN
684: -- Set retcode to 1, indicating a WARNING to the ConcMgr
685: retcode := c_warning;
686:
687: -- Set the application error
688: hr_utility.set_message (801, 'PAY_376831_NO_TAX_CARD_LINK');
689: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
690: hr_utility.set_message_token (801, 'LINE', l_line_read);
691: hr_utility.set_location (l_proc, 320);
692:
685: retcode := c_warning;
686:
687: -- Set the application error
688: hr_utility.set_message (801, 'PAY_376831_NO_TAX_CARD_LINK');
689: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
690: hr_utility.set_message_token (801, 'LINE', l_line_read);
691: hr_utility.set_location (l_proc, 320);
692:
693: -- Write the message to log file, do not raise an application error but continue
686:
687: -- Set the application error
688: hr_utility.set_message (801, 'PAY_376831_NO_TAX_CARD_LINK');
689: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
690: hr_utility.set_message_token (801, 'LINE', l_line_read);
691: hr_utility.set_location (l_proc, 320);
692:
693: -- Write the message to log file, do not raise an application error but continue
694: -- (with next line)
687: -- Set the application error
688: hr_utility.set_message (801, 'PAY_376831_NO_TAX_CARD_LINK');
689: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
690: hr_utility.set_message_token (801, 'LINE', l_line_read);
691: hr_utility.set_location (l_proc, 320);
692:
693: -- Write the message to log file, do not raise an application error but continue
694: -- (with next line)
695:
692:
693: -- Write the message to log file, do not raise an application error but continue
694: -- (with next line)
695:
696: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
697:
698:
699: END;
700: END LOOP read_lines_in_file;
702: -- Commit the outstanding records
703: COMMIT;
704:
705: UTL_FILE.fclose (l_file_type);
706: hr_utility.set_location ( 'Leaving:'|| l_proc, 200);
707:
708: -- Most of these exceptions are not translated as they should not happen normally
709: -- If they do happen, something is seriously wrong and SysAdmin interference will be necessary.
710:
717: THEN
718: UTL_FILE.fclose (l_file_type);
719: END IF;
720:
721: hr_utility.set_location (l_proc, 210);
722:
723: -- Set retcode to 2, indicating an ERROR to the ConcMgr
724: retcode := c_error;
725:
723: -- Set retcode to 2, indicating an ERROR to the ConcMgr
724: retcode := c_error;
725:
726: -- Set the application error
727: hr_utility.set_message (801, 'PAY_376826_DATA_EXC_DIR_MIS');
728:
729: -- Return the message to the ConcMgr (This msg will appear in the log file)
730: errbuf := hr_utility.get_message;
731:
726: -- Set the application error
727: hr_utility.set_message (801, 'PAY_376826_DATA_EXC_DIR_MIS');
728:
729: -- Return the message to the ConcMgr (This msg will appear in the log file)
730: errbuf := hr_utility.get_message;
731:
732: WHEN UTL_FILE.invalid_operation
733: -- File could not be opened as requested, perhaps because of operating system permissions
734: -- Also raised when attempting a write operation on a file opened for read, or a read operation
739: THEN
740: UTL_FILE.fclose (l_file_type);
741: END IF;
742:
743: hr_utility.set_location (l_proc, 220);
744: retcode := c_error;
745: errbuf := 'Reading File ('||l_location ||' -> '
746: || l_filename
747: || ') - Invalid Operation.';
752: THEN
753: UTL_FILE.fclose (l_file_type);
754: END IF;
755:
756: hr_utility.set_location (l_proc, 230);
757: retcode := c_error;
758: errbuf := 'Reading File ('
759: || l_location
760: || ' -> '
768: THEN
769: UTL_FILE.fclose (l_file_type);
770: END IF;
771:
772: hr_utility.set_location (l_proc, 240);
773: retcode := c_error;
774: errbuf := 'Reading File ('
775: || l_location
776: || ' -> '
790: || l_location
791: || ' -> '
792: || l_filename
793: || ') - Invalid Path or Filename.';
794: hr_utility.set_location (l_proc, 250);
795:
796: WHEN UTL_FILE.invalid_filehandle
797: -- File type does not specify an open file
798: THEN
800: THEN
801: UTL_FILE.fclose (l_file_type);
802: END IF;
803:
804: hr_utility.set_location (l_proc, 260);
805: retcode := c_error;
806: errbuf := 'Reading File ('
807: || l_location
808: || ' -> '
816: THEN
817: UTL_FILE.fclose (l_file_type);
818: END IF;
819:
820: hr_utility.set_location (l_proc, 270);
821: retcode := c_error;
822: errbuf := 'Reading File ('
823: || l_location
824: || ' -> '
867: l_proc CONSTANT VARCHAR2 (72) := g_package|| '.read_record';
868:
869: BEGIN
870:
871: hr_utility.set_location ( 'Entering:'|| l_proc, 10);
872:
873:
874:
875: /* p_entry_value1 Method Of Receipt ( Not from file)
883: */
884:
885: --Set record length
886: l_record_length := 44;
887: hr_utility.set_location ( ' Record length:'|| l_record_length, 20);
888:
889:
890: p_entry_value1 := 'ET';
891:
958: end if;
959:
960: -- Error in record if it is too long according to given format
961: IF (length(p_line)> l_record_length) THEN
962: hr_utility.set_location ( ' Record too long', 50);
963: RAISE e_record_too_long;
964: END IF;
965:
966: /*
963: RAISE e_record_too_long;
964: END IF;
965:
966: /*
967: hr_utility.set_location ( ' Tax Municipality:'|| p_entry_value2, 65);
968: hr_utility.set_location ( ' Tax Table Number:'|| p_entry_value3, 66);
969: hr_utility.set_location ( ' Tax Table Type:'|| p_entry_value4, 67);
970: hr_utility.set_location ( ' Tax Percentage:'|| p_entry_value5, 68);
971: hr_utility.set_location ( ' Tax Card Type:'|| p_entry_value6, 69);
964: END IF;
965:
966: /*
967: hr_utility.set_location ( ' Tax Municipality:'|| p_entry_value2, 65);
968: hr_utility.set_location ( ' Tax Table Number:'|| p_entry_value3, 66);
969: hr_utility.set_location ( ' Tax Table Type:'|| p_entry_value4, 67);
970: hr_utility.set_location ( ' Tax Percentage:'|| p_entry_value5, 68);
971: hr_utility.set_location ( ' Tax Card Type:'|| p_entry_value6, 69);
972:
965:
966: /*
967: hr_utility.set_location ( ' Tax Municipality:'|| p_entry_value2, 65);
968: hr_utility.set_location ( ' Tax Table Number:'|| p_entry_value3, 66);
969: hr_utility.set_location ( ' Tax Table Type:'|| p_entry_value4, 67);
970: hr_utility.set_location ( ' Tax Percentage:'|| p_entry_value5, 68);
971: hr_utility.set_location ( ' Tax Card Type:'|| p_entry_value6, 69);
972:
973: */
966: /*
967: hr_utility.set_location ( ' Tax Municipality:'|| p_entry_value2, 65);
968: hr_utility.set_location ( ' Tax Table Number:'|| p_entry_value3, 66);
969: hr_utility.set_location ( ' Tax Table Type:'|| p_entry_value4, 67);
970: hr_utility.set_location ( ' Tax Percentage:'|| p_entry_value5, 68);
971: hr_utility.set_location ( ' Tax Card Type:'|| p_entry_value6, 69);
972:
973: */
974:
967: hr_utility.set_location ( ' Tax Municipality:'|| p_entry_value2, 65);
968: hr_utility.set_location ( ' Tax Table Number:'|| p_entry_value3, 66);
969: hr_utility.set_location ( ' Tax Table Type:'|| p_entry_value4, 67);
970: hr_utility.set_location ( ' Tax Percentage:'|| p_entry_value5, 68);
971: hr_utility.set_location ( ' Tax Card Type:'|| p_entry_value6, 69);
972:
973: */
974:
975:
972:
973: */
974:
975:
976: hr_utility.set_location ( 'Leaving:'|| l_proc, 100);
977:
978: END read_record;
979:
980: