6601: PROCEDURE cel_init(p_payroll_action_id IN NUMBER) IS
6602: BEGIN
6603: fnd_file.put_line(fnd_file.log,fnd_date.date_to_canonical(SYSDATE) || ' FND :: Initializing the profile option ');
6604: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' HR :: Initializing the profile option ');
6605: g_payroll_mode := NVL(FND_PROFILE.VALUE('PSP_USING_ORACLE_PAYROLL'),'Y'); -- 13566809
6606: -- spc_track_cel('Init', NULL, 'Start');
6607: NULL;
6608: -- spc_track_cel('Init', NULL, 'End');
6609: EXCEPTION
6645: l_last_update_date := SYSDATE;
6646: l_last_updated_by := NVL(FND_GLOBAL.USER_ID, -1);
6647: l_last_updated_login := NVL(FND_GLOBAL.LOGIN_ID, -1);
6648: l_request_id := fnd_global.conc_request_id;
6649: l_set_of_books_id := FND_PROFILE.VALUE('GL_SET_OF_BKS_ID');
6650: l_business_group_id := FND_PROFILE.VALUE('PER_BUSINESS_GROUP_ID');
6651:
6652: OPEN action_parameters_cur;
6653: FETCH action_parameters_cur INTO l_payroll_id, l_process_mode;
6646: l_last_updated_by := NVL(FND_GLOBAL.USER_ID, -1);
6647: l_last_updated_login := NVL(FND_GLOBAL.LOGIN_ID, -1);
6648: l_request_id := fnd_global.conc_request_id;
6649: l_set_of_books_id := FND_PROFILE.VALUE('GL_SET_OF_BKS_ID');
6650: l_business_group_id := FND_PROFILE.VALUE('PER_BUSINESS_GROUP_ID');
6651:
6652: OPEN action_parameters_cur;
6653: FETCH action_parameters_cur INTO l_payroll_id, l_process_mode;
6654: CLOSE action_parameters_cur;
7240: BEGIN
7241: SAVEPOINT CEL_ARCHIVE;
7242: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Entering CEL_ARCHIVE (payroll_action_id: ' || p_payroll_action_id || ' chunk_number: ' || p_chunk_number ||')');
7243:
7244: l_set_of_books_id := FND_PROFILE.VALUE('GL_SET_OF_BKS_ID');
7245: l_business_group_id := FND_PROFILE.VALUE('PER_BUSINESS_GROUP_ID');
7246: g_set_of_books_id := l_set_of_books_id;
7247: g_business_group_id := l_business_group_id;
7248: g_enc_line_type := 'U';
7241: SAVEPOINT CEL_ARCHIVE;
7242: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Entering CEL_ARCHIVE (payroll_action_id: ' || p_payroll_action_id || ' chunk_number: ' || p_chunk_number ||')');
7243:
7244: l_set_of_books_id := FND_PROFILE.VALUE('GL_SET_OF_BKS_ID');
7245: l_business_group_id := FND_PROFILE.VALUE('PER_BUSINESS_GROUP_ID');
7246: g_set_of_books_id := l_set_of_books_id;
7247: g_business_group_id := l_business_group_id;
7248: g_enc_line_type := 'U';
7249: g_package_name := 'PSP_ENC_CREATE_LINES.';
7792: CLOSE error_check_cur;
7793:
7794: IF (l_error_count > 0) THEN
7795: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Create and Update Encumbrance process has errors. Please review the Run Results Report for more details.');
7796: l_business_group_id := fnd_profile.value('PER_BUSINESS_GROUP_ID');
7797: l_set_of_books_id := fnd_profile.value('GL_SET_OF_BKS_ID');
7798: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Before submitting Encumbrance Run Results Report');
7799: l_xml_layout := fnd_request.add_layout('PSP','PSPENRSRTF','en','US','PDF');
7800: l_request_id := fnd_request.submit_request('PSP',
7793:
7794: IF (l_error_count > 0) THEN
7795: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Create and Update Encumbrance process has errors. Please review the Run Results Report for more details.');
7796: l_business_group_id := fnd_profile.value('PER_BUSINESS_GROUP_ID');
7797: l_set_of_books_id := fnd_profile.value('GL_SET_OF_BKS_ID');
7798: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Before submitting Encumbrance Run Results Report');
7799: l_xml_layout := fnd_request.add_layout('PSP','PSPENRSRTF','en','US','PDF');
7800: l_request_id := fnd_request.submit_request('PSP',
7801: 'PSPENRSLT',
7935: AND pesl.superceded_line_id is NOT NULL);
7936: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated process_phase in psp_enc_processes');
7937: END IF;
7938:
7939: l_business_group_id := fnd_profile.value('PER_BUSINESS_GROUP_ID');
7940: l_set_of_books_id := fnd_profile.value('GL_SET_OF_BKS_ID');
7941: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Before submitting Encumbrance Run Results Report');
7942: l_xml_layout := fnd_request.add_layout('PSP','PSPENRSRTF','en','US','PDF');
7943: l_request_id := fnd_request.submit_request('PSP',
7936: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Updated process_phase in psp_enc_processes');
7937: END IF;
7938:
7939: l_business_group_id := fnd_profile.value('PER_BUSINESS_GROUP_ID');
7940: l_set_of_books_id := fnd_profile.value('GL_SET_OF_BKS_ID');
7941: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Before submitting Encumbrance Run Results Report');
7942: l_xml_layout := fnd_request.add_layout('PSP','PSPENRSRTF','en','US','PDF');
7943: l_request_id := fnd_request.submit_request('PSP',
7944: 'PSPENRSLT',
7971: FETCH st_count_cur INTO l_st_count;
7972: CLOSE st_count_cur;
7973:
7974: IF (l_st_count > 0) THEN
7975: l_business_group_id := fnd_profile.value('PER_BUSINESS_GROUP_ID');
7976: l_set_of_books_id := fnd_profile.value('GL_SET_OF_BKS_ID');
7977:
7978: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Before submitting Encumbrance Summarize and Transfer');
7979: l_request_id := fnd_request.submit_request('PSP',
7972: CLOSE st_count_cur;
7973:
7974: IF (l_st_count > 0) THEN
7975: l_business_group_id := fnd_profile.value('PER_BUSINESS_GROUP_ID');
7976: l_set_of_books_id := fnd_profile.value('GL_SET_OF_BKS_ID');
7977:
7978: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Before submitting Encumbrance Summarize and Transfer');
7979: l_request_id := fnd_request.submit_request('PSP',
7980: 'PSPENSTR',
8987: p_payroll_id: ' || p_payroll_id || '
8988: p_process_mode: ' || p_process_mode);
8989:
8990: l_request_id := FND_GLOBAL. CONC_REQUEST_ID;
8991: l_set_of_books_id := FND_PROFILE.VALUE('GL_SET_OF_BKS_ID');
8992: l_business_group_id := FND_PROFILE.VALUE('PER_BUSINESS_GROUP_ID');
8993: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' l_request_id: ' || l_request_id ||'
8994: l_set_of_books_id: ' || l_set_of_books_id || '
8995: l_business_group_id: ' || l_business_group_id);
8988: p_process_mode: ' || p_process_mode);
8989:
8990: l_request_id := FND_GLOBAL. CONC_REQUEST_ID;
8991: l_set_of_books_id := FND_PROFILE.VALUE('GL_SET_OF_BKS_ID');
8992: l_business_group_id := FND_PROFILE.VALUE('PER_BUSINESS_GROUP_ID');
8993: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' l_request_id: ' || l_request_id ||'
8994: l_set_of_books_id: ' || l_set_of_books_id || '
8995: l_business_group_id: ' || l_business_group_id);
8996:
9051: and set_of_books_id = l_set_of_books_id
9052: and default_org_flag='Y';
9053: hr_utility.trace(fnd_date.date_to_canonical(SYSDATE) || ' l_prev_enc_end_date = ' || l_prev_enc_end_date);
9054:
9055: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Using Oracle Payroll Profile Value: '||FND_PROFILE.VALUE('PSP_USING_ORACLE_PAYROLL'));
9056:
9057: -- The following profile check is introduced and the insert statements are duplicated
9058: -- to take care of the performance issues caused by outer joins added for the custoemrs
9059: -- who are using Non-Oracle Payroll as in the bug 12769510
9057: -- The following profile check is introduced and the insert statements are duplicated
9058: -- to take care of the performance issues caused by outer joins added for the custoemrs
9059: -- who are using Non-Oracle Payroll as in the bug 12769510
9060:
9061: IF NVL(FND_PROFILE.VALUE('PSP_USING_ORACLE_PAYROLL'),'Y') = 'Y' -- Oracle Payroll Profile
9062: THEN
9063: fnd_file.put_line(fnd_file.log, fnd_date.date_to_canonical(SYSDATE) || ' Using Oracle Payroll');
9064:
9065: g_payroll_mode := 'Y'; --This helps to choose the query for oracle payroll in get_asg_pay_end_date function ----13566809