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: /*15878076 - When SIGNAL is Zero, ignore line*/
281: ,p_entry_value15 => l_entry_value15
282: ,p_return_value1 => l_ni
283: ,p_return_value2 => l_employer_org_no);
284:
285: hr_utility.set_location ( ' NI Number = ' || l_ni, 60);
286: hr_utility.set_location ( ' Employer Organization Number = ' || l_employer_org_no, 60);
287:
288: /* 115.8 Changes
289:
282: ,p_return_value1 => l_ni
283: ,p_return_value2 => l_employer_org_no);
284:
285: hr_utility.set_location ( ' NI Number = ' || l_ni, 60);
286: hr_utility.set_location ( ' Employer Organization Number = ' || l_employer_org_no, 60);
287:
288: /* 115.8 Changes
289:
290: -- for Bug Fix 4202359
295: ,p_ni => l_ni
296: ) ;
297: FETCH csr_get_prim_assg INTO l_assignment_id;
298: IF csr_get_prim_assg%FOUND THEN
299: hr_utility.set_location ( ' The Employee has a active primary Assignment where tax table type is P' , 60);
300: RAISE e_active_assg_error;
301: ELSE
302: NULL;
303: END IF;
315: ,p_ni => l_ni
316: ) ;
317: FETCH csr_get_prim_assg INTO l_assignment_id;
318: IF csr_get_prim_assg%NOTFOUND THEN
319: hr_utility.set_location ( ' The Employee Does not have a primary Assignment ' , 60);
320: RAISE e_prim_assg_error;
321: END IF;
322: CLOSE csr_get_prim_assg;
323:
366: CLOSE csr_get_element_details;
367:
368: l_element_link_id := get_element_link_id(l_assignment_id ,p_business_group_id,p_effective_date,'Tax Card');
369:
370: hr_utility.set_location ( ' The Element Staus = '||l_element_link_found , 70);
371: hr_utility.set_location ( ' Element Entry ID = ' || l_element_entry_id, 70);
372: hr_utility.set_location ( ' Element Name = ' || l_element_name, 70);
373: hr_utility.set_location ( ' Element Entry Start Date = '||l_effective_start_date, 70);
374: hr_utility.set_location ( ' Element Entry End Date = '||l_effective_end_date, 70);
367:
368: l_element_link_id := get_element_link_id(l_assignment_id ,p_business_group_id,p_effective_date,'Tax Card');
369:
370: hr_utility.set_location ( ' The Element Staus = '||l_element_link_found , 70);
371: hr_utility.set_location ( ' Element Entry ID = ' || l_element_entry_id, 70);
372: hr_utility.set_location ( ' Element Name = ' || l_element_name, 70);
373: hr_utility.set_location ( ' Element Entry Start Date = '||l_effective_start_date, 70);
374: hr_utility.set_location ( ' Element Entry End Date = '||l_effective_end_date, 70);
375: hr_utility.set_location ( ' Element Link ID = ' || l_element_link_id, 70);
368: l_element_link_id := get_element_link_id(l_assignment_id ,p_business_group_id,p_effective_date,'Tax Card');
369:
370: hr_utility.set_location ( ' The Element Staus = '||l_element_link_found , 70);
371: hr_utility.set_location ( ' Element Entry ID = ' || l_element_entry_id, 70);
372: hr_utility.set_location ( ' Element Name = ' || l_element_name, 70);
373: hr_utility.set_location ( ' Element Entry Start Date = '||l_effective_start_date, 70);
374: hr_utility.set_location ( ' Element Entry End Date = '||l_effective_end_date, 70);
375: hr_utility.set_location ( ' Element Link ID = ' || l_element_link_id, 70);
376:
369:
370: hr_utility.set_location ( ' The Element Staus = '||l_element_link_found , 70);
371: hr_utility.set_location ( ' Element Entry ID = ' || l_element_entry_id, 70);
372: hr_utility.set_location ( ' Element Name = ' || l_element_name, 70);
373: hr_utility.set_location ( ' Element Entry Start Date = '||l_effective_start_date, 70);
374: hr_utility.set_location ( ' Element Entry End Date = '||l_effective_end_date, 70);
375: hr_utility.set_location ( ' Element Link ID = ' || l_element_link_id, 70);
376:
377:
370: hr_utility.set_location ( ' The Element Staus = '||l_element_link_found , 70);
371: hr_utility.set_location ( ' Element Entry ID = ' || l_element_entry_id, 70);
372: hr_utility.set_location ( ' Element Name = ' || l_element_name, 70);
373: hr_utility.set_location ( ' Element Entry Start Date = '||l_effective_start_date, 70);
374: hr_utility.set_location ( ' Element Entry End Date = '||l_effective_end_date, 70);
375: hr_utility.set_location ( ' Element Link ID = ' || l_element_link_id, 70);
376:
377:
378: -- Add User Keys for Data Pump
371: hr_utility.set_location ( ' Element Entry ID = ' || l_element_entry_id, 70);
372: hr_utility.set_location ( ' Element Name = ' || l_element_name, 70);
373: hr_utility.set_location ( ' Element Entry Start Date = '||l_effective_start_date, 70);
374: hr_utility.set_location ( ' Element Entry End Date = '||l_effective_end_date, 70);
375: hr_utility.set_location ( ' Element Link ID = ' || l_element_link_id, 70);
376:
377:
378: -- Add User Keys for Data Pump
379: l_ee_user_key:=NULL;
391: -- Add user key only if it does not exist previously
392:
393: IF csr_get_user_key%NOTFOUND THEN
394: hr_pump_utils.add_user_key(l_ee_user_key,l_element_entry_id);
395: hr_utility.set_location ( ' User Key added ' , 190);
396: ELSE
397: hr_pump_utils.modify_user_key(l_ee_user_key,l_ee_user_key,l_element_entry_id);
398: hr_utility.set_location ( ' User Key modified ' , 190.1);
399: END IF;
394: hr_pump_utils.add_user_key(l_ee_user_key,l_element_entry_id);
395: hr_utility.set_location ( ' User Key added ' , 190);
396: ELSE
397: hr_pump_utils.modify_user_key(l_ee_user_key,l_ee_user_key,l_element_entry_id);
398: hr_utility.set_location ( ' User Key modified ' , 190.1);
399: END IF;
400: CLOSE csr_get_user_key;
401:
402: hr_utility.set_location ( ' User Key added ' , 80);
398: hr_utility.set_location ( ' User Key modified ' , 190.1);
399: END IF;
400: CLOSE csr_get_user_key;
401:
402: hr_utility.set_location ( ' User Key added ' , 80);
403:
404: hr_utility.set_location ( ' l_effective_start_date:' || to_char(l_effective_start_date), 90);
405: hr_utility.set_location ( ' l_effective_end_date:' || to_char(l_effective_end_date), 90);
406: hr_utility.set_location ( ' p_effective_date:' || to_char(fnd_date.canonical_to_date(p_effective_date)), 90);
400: CLOSE csr_get_user_key;
401:
402: hr_utility.set_location ( ' User Key added ' , 80);
403:
404: hr_utility.set_location ( ' l_effective_start_date:' || to_char(l_effective_start_date), 90);
405: hr_utility.set_location ( ' l_effective_end_date:' || to_char(l_effective_end_date), 90);
406: hr_utility.set_location ( ' p_effective_date:' || to_char(fnd_date.canonical_to_date(p_effective_date)), 90);
407: hr_utility.set_location ( ' c_end_of_time:' || to_char(c_end_of_time), 90);
408:
401:
402: hr_utility.set_location ( ' User Key added ' , 80);
403:
404: hr_utility.set_location ( ' l_effective_start_date:' || to_char(l_effective_start_date), 90);
405: hr_utility.set_location ( ' l_effective_end_date:' || to_char(l_effective_end_date), 90);
406: hr_utility.set_location ( ' p_effective_date:' || to_char(fnd_date.canonical_to_date(p_effective_date)), 90);
407: hr_utility.set_location ( ' c_end_of_time:' || to_char(c_end_of_time), 90);
408:
409: -- Define Datetrack Updation Mode
402: hr_utility.set_location ( ' User Key added ' , 80);
403:
404: hr_utility.set_location ( ' l_effective_start_date:' || to_char(l_effective_start_date), 90);
405: hr_utility.set_location ( ' l_effective_end_date:' || to_char(l_effective_end_date), 90);
406: hr_utility.set_location ( ' p_effective_date:' || to_char(fnd_date.canonical_to_date(p_effective_date)), 90);
407: hr_utility.set_location ( ' c_end_of_time:' || to_char(c_end_of_time), 90);
408:
409: -- Define Datetrack Updation Mode
410: IF(l_effective_start_date = fnd_date.canonical_to_date(p_effective_date))
403:
404: hr_utility.set_location ( ' l_effective_start_date:' || to_char(l_effective_start_date), 90);
405: hr_utility.set_location ( ' l_effective_end_date:' || to_char(l_effective_end_date), 90);
406: hr_utility.set_location ( ' p_effective_date:' || to_char(fnd_date.canonical_to_date(p_effective_date)), 90);
407: hr_utility.set_location ( ' c_end_of_time:' || to_char(c_end_of_time), 90);
408:
409: -- Define Datetrack Updation Mode
410: IF(l_effective_start_date = fnd_date.canonical_to_date(p_effective_date))
411: THEN
416: ELSE
417: l_datetrack_update_mode := 'UPDATE';
418: END IF;
419:
420: hr_utility.set_location ( ' Datetrack Update Mode:' || l_datetrack_update_mode, 90);
421:
422:
423: -- Data Pump procedure called to create batch lines to update element entries
424: hrdpp_update_element_entry.insert_batch_lines
459: ,P_INPUT_VALUE_NAME13 =>l_input_value_name13
460: ,P_INPUT_VALUE_NAME14 =>l_input_value_name14
461: ,P_INPUT_VALUE_NAME15 =>l_input_value_name15);
462:
463: hr_utility.set_location ( ' Batch Lines created for Element Updation: ' , 100);
464: ELSE
465:
466:
467:
540: ,P_INPUT_VALUE_NAME14 =>l_input_value_name14
541: ,P_INPUT_VALUE_NAME15 =>l_input_value_name15);
542:
543:
544: hr_utility.set_location ( ' Batch Lines created for Element Creation: ' , 100);
545:
546: END IF;
547:
548: hr_utility.set_location ( ' Batch Lines created ' , 100);
544: hr_utility.set_location ( ' Batch Lines created for Element Creation: ' , 100);
545:
546: END IF;
547:
548: hr_utility.set_location ( ' Batch Lines created ' , 100);
549:
550: -- commit the records uppon reaching the commit point
551:
552: IF MOD (l_batch_seq, c_commit_point) = 0
568: -- Set retcode to 1, indicating a WARNING to the ConcMgr
569: retcode := c_warning;
570:
571: -- Set the application error
572: hr_utility.set_message (801, 'PAY_376824_NO_ASSG_NOT_FOUND');
573: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
574: hr_utility.set_message_token (801, 'LINE', l_line_read);
575: hr_utility.set_location (l_proc, 120);
576:
569: retcode := c_warning;
570:
571: -- Set the application error
572: hr_utility.set_message (801, 'PAY_376824_NO_ASSG_NOT_FOUND');
573: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
574: hr_utility.set_message_token (801, 'LINE', l_line_read);
575: hr_utility.set_location (l_proc, 120);
576:
577: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
570:
571: -- Set the application error
572: hr_utility.set_message (801, 'PAY_376824_NO_ASSG_NOT_FOUND');
573: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
574: hr_utility.set_message_token (801, 'LINE', l_line_read);
575: hr_utility.set_location (l_proc, 120);
576:
577: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
578:
571: -- Set the application error
572: hr_utility.set_message (801, 'PAY_376824_NO_ASSG_NOT_FOUND');
573: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
574: hr_utility.set_message_token (801, 'LINE', l_line_read);
575: hr_utility.set_location (l_proc, 120);
576:
577: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
578:
579: -- for Bug Fix 4202359
573: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
574: hr_utility.set_message_token (801, 'LINE', l_line_read);
575: hr_utility.set_location (l_proc, 120);
576:
577: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
578:
579: -- for Bug Fix 4202359
580: WHEN e_active_assg_error
581: -- Active assignment found where table type is 'P' for given NI Number and Organization Number
587: -- Set retcode to 1, indicating a WARNING to the ConcMgr
588: retcode := c_warning;
589:
590: -- Set the application error
591: hr_utility.set_message (801, 'PAY_376834_NO_ACTIVE_ASG_ERR');
592: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
593: hr_utility.set_message_token (801, 'LINE', l_line_read);
594: hr_utility.set_location (l_proc, 120);
595:
588: retcode := c_warning;
589:
590: -- Set the application error
591: hr_utility.set_message (801, 'PAY_376834_NO_ACTIVE_ASG_ERR');
592: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
593: hr_utility.set_message_token (801, 'LINE', l_line_read);
594: hr_utility.set_location (l_proc, 120);
595:
596: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
589:
590: -- Set the application error
591: hr_utility.set_message (801, 'PAY_376834_NO_ACTIVE_ASG_ERR');
592: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
593: hr_utility.set_message_token (801, 'LINE', l_line_read);
594: hr_utility.set_location (l_proc, 120);
595:
596: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
597: -- end of Bug Fix 4202359
590: -- Set the application error
591: hr_utility.set_message (801, 'PAY_376834_NO_ACTIVE_ASG_ERR');
592: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
593: hr_utility.set_message_token (801, 'LINE', l_line_read);
594: hr_utility.set_location (l_proc, 120);
595:
596: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
597: -- end of Bug Fix 4202359
598:
592: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
593: hr_utility.set_message_token (801, 'LINE', l_line_read);
594: hr_utility.set_location (l_proc, 120);
595:
596: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
597: -- end of Bug Fix 4202359
598:
599: -- for Bug Fix 4202271
600: WHEN e_tax_table_type_err
603: -- Set retcode to 1, indicating a WARNING to the ConcMgr
604: retcode := c_warning;
605:
606: -- Set the application error
607: hr_utility.set_message (801, 'PAY_376835_NO_TAX_TAB_TYPE_ERR');
608: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
609: hr_utility.set_message_token (801, 'LINE', l_line_read);
610: hr_utility.set_location (l_proc, 120);
611:
604: retcode := c_warning;
605:
606: -- Set the application error
607: hr_utility.set_message (801, 'PAY_376835_NO_TAX_TAB_TYPE_ERR');
608: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
609: hr_utility.set_message_token (801, 'LINE', l_line_read);
610: hr_utility.set_location (l_proc, 120);
611:
612: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
605:
606: -- Set the application error
607: hr_utility.set_message (801, 'PAY_376835_NO_TAX_TAB_TYPE_ERR');
608: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
609: hr_utility.set_message_token (801, 'LINE', l_line_read);
610: hr_utility.set_location (l_proc, 120);
611:
612: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
613: -- end of Bug Fix 4202271
606: -- Set the application error
607: hr_utility.set_message (801, 'PAY_376835_NO_TAX_TAB_TYPE_ERR');
608: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
609: hr_utility.set_message_token (801, 'LINE', l_line_read);
610: hr_utility.set_location (l_proc, 120);
611:
612: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
613: -- end of Bug Fix 4202271
614:
608: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
609: hr_utility.set_message_token (801, 'LINE', l_line_read);
610: hr_utility.set_location (l_proc, 120);
611:
612: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
613: -- end of Bug Fix 4202271
614:
615:
616:
623: -- Set retcode to 1, indicating a WARNING to the ConcMgr
624: retcode := c_warning;
625:
626: -- Set the application error
627: hr_utility.set_message (801, 'PAY_376827_NO_UNLOGIC_NI_NUM');
628: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
629: hr_utility.set_message_token (801, 'LINE', l_line_read);
630: hr_utility.set_location (l_proc, 120);
631:
624: retcode := c_warning;
625:
626: -- Set the application error
627: hr_utility.set_message (801, 'PAY_376827_NO_UNLOGIC_NI_NUM');
628: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
629: hr_utility.set_message_token (801, 'LINE', l_line_read);
630: hr_utility.set_location (l_proc, 120);
631:
632: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
625:
626: -- Set the application error
627: hr_utility.set_message (801, 'PAY_376827_NO_UNLOGIC_NI_NUM');
628: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
629: hr_utility.set_message_token (801, 'LINE', l_line_read);
630: hr_utility.set_location (l_proc, 120);
631:
632: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
633:
626: -- Set the application error
627: hr_utility.set_message (801, 'PAY_376827_NO_UNLOGIC_NI_NUM');
628: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
629: hr_utility.set_message_token (801, 'LINE', l_line_read);
630: hr_utility.set_location (l_proc, 120);
631:
632: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
633:
634: WHEN e_invalid_signal
628: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
629: hr_utility.set_message_token (801, 'LINE', l_line_read);
630: hr_utility.set_location (l_proc, 120);
631:
632: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
633:
634: WHEN e_invalid_signal
635: -- Invalid SIGNAL Reply from Tax Authority
636: THEN
638: -- Set retcode to 1, indicating a WARNING to the ConcMgr
639: retcode := c_warning;
640:
641: -- Set the application error
642: hr_utility.set_message (801, 'PAY_376832_NO_INVALID_SIGNAL');
643: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
644: hr_utility.set_message_token (801, 'LINE', l_line_read);
645: hr_utility.set_location (l_proc, 120);
646:
639: retcode := c_warning;
640:
641: -- Set the application error
642: hr_utility.set_message (801, 'PAY_376832_NO_INVALID_SIGNAL');
643: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
644: hr_utility.set_message_token (801, 'LINE', l_line_read);
645: hr_utility.set_location (l_proc, 120);
646:
647: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
640:
641: -- Set the application error
642: hr_utility.set_message (801, 'PAY_376832_NO_INVALID_SIGNAL');
643: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
644: hr_utility.set_message_token (801, 'LINE', l_line_read);
645: hr_utility.set_location (l_proc, 120);
646:
647: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
648:
641: -- Set the application error
642: hr_utility.set_message (801, 'PAY_376832_NO_INVALID_SIGNAL');
643: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
644: hr_utility.set_message_token (801, 'LINE', l_line_read);
645: hr_utility.set_location (l_proc, 120);
646:
647: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
648:
649: WHEN e_invalid_percentage
643: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
644: hr_utility.set_message_token (801, 'LINE', l_line_read);
645: hr_utility.set_location (l_proc, 120);
646:
647: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
648:
649: WHEN e_invalid_percentage
650: -- Invalid Tax percentage Reply from Tax Authority
651: THEN
653: -- Set retcode to 1, indicating a WARNING to the ConcMgr
654: retcode := c_warning;
655:
656: -- Set the application error
657: hr_utility.set_message (801, 'PAY_376833_NO_INVALID_PERCENT');
658: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
659: hr_utility.set_message_token (801, 'LINE', l_line_read);
660: hr_utility.set_location (l_proc, 120);
661:
654: retcode := c_warning;
655:
656: -- Set the application error
657: hr_utility.set_message (801, 'PAY_376833_NO_INVALID_PERCENT');
658: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
659: hr_utility.set_message_token (801, 'LINE', l_line_read);
660: hr_utility.set_location (l_proc, 120);
661:
662: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
655:
656: -- Set the application error
657: hr_utility.set_message (801, 'PAY_376833_NO_INVALID_PERCENT');
658: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
659: hr_utility.set_message_token (801, 'LINE', l_line_read);
660: hr_utility.set_location (l_proc, 120);
661:
662: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
663:
656: -- Set the application error
657: hr_utility.set_message (801, 'PAY_376833_NO_INVALID_PERCENT');
658: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
659: hr_utility.set_message_token (801, 'LINE', l_line_read);
660: hr_utility.set_location (l_proc, 120);
661:
662: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
663:
664:
658: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
659: hr_utility.set_message_token (801, 'LINE', l_line_read);
660: hr_utility.set_location (l_proc, 120);
661:
662: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
663:
664:
665:
666:
670: -- Set retcode to 1, indicating a WARNING to the ConcMgr
671: retcode := c_warning;
672:
673: -- Set the application error
674: hr_utility.set_message (801, 'PAY_376825_NO_RECORD_TOO_LONG');
675: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
676: --hr_utility.set_message_token (801, 'LINE', l_line_read);
677: hr_utility.set_location (l_proc, 150);
678:
671: retcode := c_warning;
672:
673: -- Set the application error
674: hr_utility.set_message (801, 'PAY_376825_NO_RECORD_TOO_LONG');
675: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
676: --hr_utility.set_message_token (801, 'LINE', l_line_read);
677: hr_utility.set_location (l_proc, 150);
678:
679: -- Write the message to log file, do not raise an application error but continue
672:
673: -- Set the application error
674: hr_utility.set_message (801, 'PAY_376825_NO_RECORD_TOO_LONG');
675: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
676: --hr_utility.set_message_token (801, 'LINE', l_line_read);
677: hr_utility.set_location (l_proc, 150);
678:
679: -- Write the message to log file, do not raise an application error but continue
680: -- (with next line)
673: -- Set the application error
674: hr_utility.set_message (801, 'PAY_376825_NO_RECORD_TOO_LONG');
675: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
676: --hr_utility.set_message_token (801, 'LINE', l_line_read);
677: hr_utility.set_location (l_proc, 150);
678:
679: -- Write the message to log file, do not raise an application error but continue
680: -- (with next line)
681:
678:
679: -- Write the message to log file, do not raise an application error but continue
680: -- (with next line)
681:
682: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
683:
684: WHEN e_no_tax_link
685: -- Wrong CSR routine
686: THEN
687: -- Set retcode to 1, indicating a WARNING to the ConcMgr
688: retcode := c_warning;
689:
690: -- Set the application error
691: hr_utility.set_message (801, 'PAY_376831_NO_TAX_CARD_LINK');
692: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
693: hr_utility.set_message_token (801, 'LINE', l_line_read);
694: hr_utility.set_location (l_proc, 320);
695:
688: retcode := c_warning;
689:
690: -- Set the application error
691: hr_utility.set_message (801, 'PAY_376831_NO_TAX_CARD_LINK');
692: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
693: hr_utility.set_message_token (801, 'LINE', l_line_read);
694: hr_utility.set_location (l_proc, 320);
695:
696: -- Write the message to log file, do not raise an application error but continue
689:
690: -- Set the application error
691: hr_utility.set_message (801, 'PAY_376831_NO_TAX_CARD_LINK');
692: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
693: hr_utility.set_message_token (801, 'LINE', l_line_read);
694: hr_utility.set_location (l_proc, 320);
695:
696: -- Write the message to log file, do not raise an application error but continue
697: -- (with next line)
690: -- Set the application error
691: hr_utility.set_message (801, 'PAY_376831_NO_TAX_CARD_LINK');
692: hr_utility.set_message_token (801, 'LINE_NO', l_batch_seq);
693: hr_utility.set_message_token (801, 'LINE', l_line_read);
694: hr_utility.set_location (l_proc, 320);
695:
696: -- Write the message to log file, do not raise an application error but continue
697: -- (with next line)
698:
695:
696: -- Write the message to log file, do not raise an application error but continue
697: -- (with next line)
698:
699: fnd_file.put_line (fnd_file.LOG, hr_utility.get_message);
700:
701:
702: END;
703: END LOOP read_lines_in_file;
705: -- Commit the outstanding records
706: COMMIT;
707:
708: UTL_FILE.fclose (l_file_type);
709: hr_utility.set_location ( 'Leaving:'|| l_proc, 200);
710:
711: -- Most of these exceptions are not translated as they should not happen normally
712: -- If they do happen, something is seriously wrong and SysAdmin interference will be necessary.
713:
720: THEN
721: UTL_FILE.fclose (l_file_type);
722: END IF;
723:
724: hr_utility.set_location (l_proc, 210);
725:
726: -- Set retcode to 2, indicating an ERROR to the ConcMgr
727: retcode := c_error;
728:
726: -- Set retcode to 2, indicating an ERROR to the ConcMgr
727: retcode := c_error;
728:
729: -- Set the application error
730: hr_utility.set_message (801, 'PAY_376826_DATA_EXC_DIR_MIS');
731:
732: -- Return the message to the ConcMgr (This msg will appear in the log file)
733: errbuf := hr_utility.get_message;
734:
729: -- Set the application error
730: hr_utility.set_message (801, 'PAY_376826_DATA_EXC_DIR_MIS');
731:
732: -- Return the message to the ConcMgr (This msg will appear in the log file)
733: errbuf := hr_utility.get_message;
734:
735: WHEN UTL_FILE.invalid_operation
736: -- File could not be opened as requested, perhaps because of operating system permissions
737: -- Also raised when attempting a write operation on a file opened for read, or a read operation
742: THEN
743: UTL_FILE.fclose (l_file_type);
744: END IF;
745:
746: hr_utility.set_location (l_proc, 220);
747: retcode := c_error;
748: errbuf := 'Reading File ('||l_location ||' -> '
749: || l_filename
750: || ') - Invalid Operation.';
755: THEN
756: UTL_FILE.fclose (l_file_type);
757: END IF;
758:
759: hr_utility.set_location (l_proc, 230);
760: retcode := c_error;
761: errbuf := 'Reading File ('
762: || l_location
763: || ' -> '
771: THEN
772: UTL_FILE.fclose (l_file_type);
773: END IF;
774:
775: hr_utility.set_location (l_proc, 240);
776: retcode := c_error;
777: errbuf := 'Reading File ('
778: || l_location
779: || ' -> '
793: || l_location
794: || ' -> '
795: || l_filename
796: || ') - Invalid Path or Filename.';
797: hr_utility.set_location (l_proc, 250);
798:
799: WHEN UTL_FILE.invalid_filehandle
800: -- File type does not specify an open file
801: THEN
803: THEN
804: UTL_FILE.fclose (l_file_type);
805: END IF;
806:
807: hr_utility.set_location (l_proc, 260);
808: retcode := c_error;
809: errbuf := 'Reading File ('
810: || l_location
811: || ' -> '
819: THEN
820: UTL_FILE.fclose (l_file_type);
821: END IF;
822:
823: hr_utility.set_location (l_proc, 270);
824: retcode := c_error;
825: errbuf := 'Reading File ('
826: || l_location
827: || ' -> '
870: l_proc CONSTANT VARCHAR2 (72) := g_package|| '.read_record';
871:
872: BEGIN
873:
874: hr_utility.set_location ( 'Entering:'|| l_proc, 10);
875:
876:
877:
878: /* p_entry_value1 Method Of Receipt ( Not from file)
886: */
887:
888: --Set record length
889: l_record_length := 44;
890: hr_utility.set_location ( ' Record length:'|| l_record_length, 20);
891:
892:
893: p_entry_value1 := 'ET';
894:
961: end if;
962:
963: -- Error in record if it is too long according to given format
964: IF (length(p_line)> l_record_length) THEN
965: hr_utility.set_location ( ' Record too long', 50);
966: RAISE e_record_too_long;
967: END IF;
968:
969: /*
966: RAISE e_record_too_long;
967: END IF;
968:
969: /*
970: hr_utility.set_location ( ' Tax Municipality:'|| p_entry_value2, 65);
971: hr_utility.set_location ( ' Tax Table Number:'|| p_entry_value3, 66);
972: hr_utility.set_location ( ' Tax Table Type:'|| p_entry_value4, 67);
973: hr_utility.set_location ( ' Tax Percentage:'|| p_entry_value5, 68);
974: hr_utility.set_location ( ' Tax Card Type:'|| p_entry_value6, 69);
967: END IF;
968:
969: /*
970: hr_utility.set_location ( ' Tax Municipality:'|| p_entry_value2, 65);
971: hr_utility.set_location ( ' Tax Table Number:'|| p_entry_value3, 66);
972: hr_utility.set_location ( ' Tax Table Type:'|| p_entry_value4, 67);
973: hr_utility.set_location ( ' Tax Percentage:'|| p_entry_value5, 68);
974: hr_utility.set_location ( ' Tax Card Type:'|| p_entry_value6, 69);
975:
968:
969: /*
970: hr_utility.set_location ( ' Tax Municipality:'|| p_entry_value2, 65);
971: hr_utility.set_location ( ' Tax Table Number:'|| p_entry_value3, 66);
972: hr_utility.set_location ( ' Tax Table Type:'|| p_entry_value4, 67);
973: hr_utility.set_location ( ' Tax Percentage:'|| p_entry_value5, 68);
974: hr_utility.set_location ( ' Tax Card Type:'|| p_entry_value6, 69);
975:
976: */
969: /*
970: hr_utility.set_location ( ' Tax Municipality:'|| p_entry_value2, 65);
971: hr_utility.set_location ( ' Tax Table Number:'|| p_entry_value3, 66);
972: hr_utility.set_location ( ' Tax Table Type:'|| p_entry_value4, 67);
973: hr_utility.set_location ( ' Tax Percentage:'|| p_entry_value5, 68);
974: hr_utility.set_location ( ' Tax Card Type:'|| p_entry_value6, 69);
975:
976: */
977:
970: hr_utility.set_location ( ' Tax Municipality:'|| p_entry_value2, 65);
971: hr_utility.set_location ( ' Tax Table Number:'|| p_entry_value3, 66);
972: hr_utility.set_location ( ' Tax Table Type:'|| p_entry_value4, 67);
973: hr_utility.set_location ( ' Tax Percentage:'|| p_entry_value5, 68);
974: hr_utility.set_location ( ' Tax Card Type:'|| p_entry_value6, 69);
975:
976: */
977:
978:
975:
976: */
977:
978:
979: hr_utility.set_location ( 'Leaving:'|| l_proc, 100);
980:
981: END read_record;
982:
983: